couchbase-cli bucket-flush not working on a cluster with more than 2 nodes.
For a single system, I got the following error.
/opt/couchbase/bin/couchbase-cli bucket-flush -c localhost:8091 --bucket=default -u Administrator -p password
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 following command solved the issue.
/opt/couchbase/bin/cbflushctl localhost:11211 set flushall_enabled true
Then added one more server to the cluster (and rebalanced) and fired the command again
/opt/couchbase/bin/cbflushctl localhost:11211 set flushall_enabled true ........... Worked.
Then added the 3rd server to the cluster (and rebalanced) and fired the command again
/opt/couchbase/bin/cbflushctl localhost:11211 set flushall_enabled true
But now we are getting the following error.
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
This is what we tried
1. We needed to add abt 5 servers in a cluster. We tried different combinations of servers. It works for any 2
servers in the cluster. 3rd server onwards, we get the error.
2. We have re-balanced all servers. Cache population works fine. But cache flushing not working when no of servers
in cluster is greater than 2.
3. Tried re-installing the environment too. Same error.
4. User name and password is fine. Works with 2 servers.
Can someone please suggest, whats going wrong?
Regards,
Pradeep.