Hide
added a comment -
I think the problem is at server side which fails to authenticate the request
I create two buckets: default and test1. the flush request against default is sucessful while it fails when runs against test1.
c:\t2\bin>python couchbase-cli bucket-flush -c localhost -u Administrator -p password --bucket=default
/pools/default/buckets/default/controller/doFlush
{'Authorization': 'Basic QWRtaW5pc3RyYXRvcjpwYXNzd29yZA=='}
SUCCESS: bucket-flush
c:\t2\bin>python couchbase-cli bucket-flush -c localhost -u Administrator -p password --bucket=test1
/pools/default/buckets/test1/controller/doFlush
{'Authorization': 'Basic QWRtaW5pc3RyYXRvcjpwYXNzd29yZA=='}
ERROR: unable to bucket-flush; please check your username (-u) and password (-p)
; (503) Service Unavailable
Traceback (most recent call last):
File "couchbase-cli", line 117, in main
c.runCmd(cmd, server, port, user, password, opts)
File "c:\t2\bin\buckets.py", line 109, in runCmd
self.user, self.password, opts)
File "c:\t2\bin\restclient.py", line 163, in restCmd
return self.handleResponse(method, response, opts)
File "c:\t2\bin\restclient.py", line 71, in handleResponse
output_json = json.loads(response.read())
File "c:\t2\bin\simplejson\__init__.py", line 307, in loads
return _default_decoder.decode(s)
File "c:\t2\bin\simplejson\decoder.py", line 335, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "c:\t2\bin\simplejson\decoder.py", line 353, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
ERROR: command: bucket-flush: localhost:8091, No JSON object could be decoded
Show
added a comment - I think the problem is at server side which fails to authenticate the request
I create two buckets: default and test1. the flush request against default is sucessful while it fails when runs against test1.
c:\t2\bin>python couchbase-cli bucket-flush -c localhost -u Administrator -p password --bucket=default
/pools/default/buckets/default/controller/doFlush
{'Authorization': 'Basic QWRtaW5pc3RyYXRvcjpwYXNzd29yZA=='}
SUCCESS: bucket-flush
c:\t2\bin>python couchbase-cli bucket-flush -c localhost -u Administrator -p password --bucket=test1
/pools/default/buckets/test1/controller/doFlush
{'Authorization': 'Basic QWRtaW5pc3RyYXRvcjpwYXNzd29yZA=='}
ERROR: unable to bucket-flush; please check your username (-u) and password (-p)
; (503) Service Unavailable
Traceback (most recent call last):
File "couchbase-cli", line 117, in main
c.runCmd(cmd, server, port, user, password, opts)
File "c:\t2\bin\buckets.py", line 109, in runCmd
self.user, self.password, opts)
File "c:\t2\bin\restclient.py", line 163, in restCmd
return self.handleResponse(method, response, opts)
File "c:\t2\bin\restclient.py", line 71, in handleResponse
output_json = json.loads(response.read())
File "c:\t2\bin\simplejson\__init__.py", line 307, in loads
return _default_decoder.decode(s)
File "c:\t2\bin\simplejson\decoder.py", line 335, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "c:\t2\bin\simplejson\decoder.py", line 353, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
ERROR: command: bucket-flush: localhost:8091, No JSON object could be decoded