Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | Couchbase | Couchbase Server 1.8.x

503 error for bucket-flush

4 replies [Last post]
  • Login or register to post comments
Sun, 11/18/2012 - 18:51
dserodio
dserodio's picture
Offline
Joined: 11/18/2012
Groups: None

When I try to flush a Couchbase bucket using couchbase-cli, I get a 503 error:

$ bin/couchbase-cli bucket-flush -c localhost:8091 -u Administrator -p password --bucket=sessions

ERROR: unable to bucket-flush; please check your username (-u) and password (-p); (503) Service Unavailable
ERROR: command: bucket-flush: localhost:8091, No JSON object could be decoded

The error is not cause by an authentication failure; I double-checked using ngrep.

Can't I use couchbase-cli bucket-flush on Couchbase buckets? Thanks.

Top
  • Login or register to post comments
Sun, 11/18/2012 - 19:07
mikew
Offline
Joined: 03/14/2011
Groups:

Does this fail repeatedly? I have noticed that from time to time a command sent to the rest API will return this, but if I retry I will end up getting a success message. Also, we use the same rest API from the admin console so there is actually no difference from sending the rest call from the cli as long as you supply all of the correct parameters.

Top
  • Login or register to post comments
Sun, 11/18/2012 - 19:31
dserodio
dserodio's picture
Offline
Joined: 11/18/2012
Groups: None

Yes, it fails repeteadly. The REST request that fails is:

POST /pools/default/buckets/sessions/controller/doFlush HTTP/1.1.
Host: localhost:8091.
Accept-Encoding: identity.
Content-type: application/x-www-form-urlencoded.
Authorization: Basic QWRtaW5pc3RyYXRvcjoxMjM0NTY=.

Top
  • Login or register to post comments
Tue, 11/20/2012 - 14:41
mikew
Offline
Joined: 03/14/2011
Groups:

Are you able to access the admin console and flush the bucket using that? Also, can you run the following command and paste the output here.

/opt/couchbase/bin/cbstats localhost:11210 all | grep flush

Top
  • Login or register to post comments
Mon, 11/26/2012 - 08:42
dserodio
dserodio's picture
Offline
Joined: 11/18/2012
Groups: None

I'm confused. I checked the documentation to learn how to flush via admin console (which I couldn't find) and noticed this:

As of Couchbase 1.6 bucket flushing via REST API is not supported. Flushing via Couchbase SDKs as of Couchbase Server 1.8.1 is disabled by default.

couchbase-cli uses the REST API, doesn't it? If it's not supported, why is there a bucket-flush command in couchbase-cli?

Here's the output of cbstats localhost:11210 all | grep flush:

 cmd_flush:                      0
 ep_flush_all:                   false
 ep_flush_duration:              0
 ep_flush_duration_highwat:      0
 ep_flush_duration_total:        0
 ep_flush_preempts:              0
 ep_flusher_deduplication:       0
 ep_flusher_state:               running
 ep_flusher_todo:                0
 ep_item_flush_expired:          0
 ep_item_flush_failed:           0

Top
  • Login or register to post comments
  • Login or register to post comments
  • Login
  • Register

Company

  • About Us
  • Leadership
  • Customers
  • Partners
  • Contact Us

Product

  • Couchbase Server
  • Couchbase SDKs
  • Use Cases
  • Documentation
  • Forums

Open Source

  • Couchbase Project
  • Couchbase vs. CouchDB

Commercial

  • Subscriptions & Support
  • Training & Services

News

  • Blog
  • Newsletter
  • Press Releases
  • Buzz

Follow Us

    
  • Customer Login
  • Terms of Service
  • Privacy Policy
  • Trademark Policy
  • Site Map

© 2013 COUCHBASE All rights reserved.

Sign in to Couchbase Community

close
  • Create new account
  • Request new password
You are logging into the Forums, Wiki and Issue Tracker