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

Couchbase setup using command line interface

4 replies [Last post]
  • Login or register to post comments
Tue, 02/28/2012 - 00:07
nprajeshgowda
Offline
Joined: 02/02/2012
Groups: None

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

Top
  • Login or register to post comments
Fri, 03/02/2012 - 20:21
mikew
Offline
Joined: 03/14/2011
Groups:

Can you try specifying a username and password on the command line too? I think you can do a -u Administrator -p password.

Top
  • Login or register to post comments
Mon, 03/05/2012 - 01:43
nprajeshgowda
Offline
Joined: 02/02/2012
Groups: None

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

Top
  • Login or register to post comments
Mon, 03/05/2012 - 03:05
nprajeshgowda
Offline
Joined: 02/02/2012
Groups: None

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

Top
  • Login or register to post comments
Mon, 03/05/2012 - 07:18
nprajeshgowda
Offline
Joined: 02/02/2012
Groups: None

i figured it..
i had miss spell the username ..!!!

BR,
Rajesh

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