Couchbase setup using command line interface
Hello,
I want to set up couchbase server/cluster using command line interface.
Reason for not using the UI is we dont want the our end users (developers) of couchbase to play with the configuration, so we would like to set up the using command line. Some thing like silent installation.
i tried to use the couchbase-cli tool, but what should be the order to set up a cluster ?
I assume this order
1. node-init
2. cluster-init
3. bucket-create
Do steps in all nodes in cluster and after that from any one node
4. server-add
5. rebalance
Is what i assume is correct ?
But when i followed this order i get the following error when i run node-init....
[root@sai132 bin]# ./couchbase-cli node-init -c 10.58.116.132 --node-init-data-path /opt/couchbase/var/data -d
INFO: running command: node-init
INFO: servers {'add': {}, 'failover': {}, 'remove': {}}
ERROR: command: node-init: 10.58.116.132:8091, (111, 'Connection refused')
suggestions needed...
Thanks and regards,
Rajesh
thanks mikew, that worked for me.
appreciate if there more docs are put in the wiki related to configurations using command line interface.
Best Regards,
Rajesh
I was trying to add nodes to cluster and i am getting the following error.
I can add the server to cluster using UI, but from CLI it says username and password are incorrect...
Any clue on this..?
[root@sai132 couchbase]# bin/couchbase-cli server-add -c 10.58.116.87 -u Administrator -p sairoot -d --server-add=10.58.116.132 --server-add-username=Administator --server-add-password=sairoot
INFO: running command: server-add
INFO: servers {'add': {'10.58.116.132:8091': {'password': 'sairoot', 'user': 'Administator'}}, 'failover': {}, 'remove': {}}
METHOD: POST
PARAMS: {'password': 'sairoot', 'hostname': '10.58.116.132:8091', 'user': 'Administator'}
ENCODED_PARAMS: password=sairoot&hostname=10.58.116.132%3A8091&user=Administator
REST CMD: POST /controller/addNode
response.status: 400
ERROR: unable to server-add 10.58.116.132:8091 (400) Bad Request
[u'Prepare join failed. Authentication failed. Verify username and password. Got HTTP status 401 from REST call post to http://10.58.116.132:8091/engageCluster2. Body was: []']
ERROR: command: server-add: 10.58.116.87:8091, 2
BR,
Rajesh
i figured it..
i had miss spell the username ..!!!
BR,
Rajesh
Can you try specifying a username and password on the command line too? I think you can do a -u Administrator -p password.