Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-7186

couchbase-cli server-add option fails now when adding a node even though user is passing the right credentials

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0
    • Component/s: tools
    • Security Level: Public
    • Labels:
      None

      Description

      steps to reproduce :

      install couchbase on node 1

      root@plum-016:~# /opt/couchbase/bin/couchbase-cli server-add -c localhost:8091 -u Administrator -p password --server-add=10.3.3.62:8091
      ERROR: unable to server-add 10.3.3.62: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.3.3.62:8091/engageCluster2. Body was: []']

      the same thing works from the UI so i think UI is passing some moe info.

      No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

        Hide
        farshid Farshid Ghods (Inactive) added a comment -

        looking at couchbase-cli source code : prioir to 2.0 user could add a node and rebalance without having to pass the credentials for the node that is joining the cluster

        in 2,0 user has to provide such info so we need to make these two fields required in couchbase-cli and update the readme section

        root@plum-016:~# /opt/couchbase/bin/couchbase-cli server-add -c localhost:8091 -u Administrator -p password --server-add=10.3.3.62:8091 --server-add-username=Administrator --server-add-password=password
        SUCCESS: server-add 10.3.3.62:8091

        help section which needs to be updated with --server-add-password and --server-add-username

        Add a node to a cluster, but do not rebalance:
        couchbase-cli server-add -c 192.168.0.1:8091 \
        --server-add=192.168.0.2:8091

        Add a node to a cluster and rebalance:
        couchbase-cli rebalance -c 192.168.0.1:8091 \
        --server-add=192.168.0.2:8091

        Remove a node from a cluster and rebalance:
        couchbase-cli rebalance -c 192.168.0.1:8091 \
        --server-remove=192.168.0.2:8091

        Show
        farshid Farshid Ghods (Inactive) added a comment - looking at couchbase-cli source code : prioir to 2.0 user could add a node and rebalance without having to pass the credentials for the node that is joining the cluster in 2,0 user has to provide such info so we need to make these two fields required in couchbase-cli and update the readme section root@plum-016:~# /opt/couchbase/bin/couchbase-cli server-add -c localhost:8091 -u Administrator -p password --server-add=10.3.3.62:8091 --server-add-username=Administrator --server-add-password=password SUCCESS: server-add 10.3.3.62:8091 help section which needs to be updated with --server-add-password and --server-add-username Add a node to a cluster, but do not rebalance: couchbase-cli server-add -c 192.168.0.1:8091 \ --server-add=192.168.0.2:8091 Add a node to a cluster and rebalance: couchbase-cli rebalance -c 192.168.0.1:8091 \ --server-add=192.168.0.2:8091 Remove a node from a cluster and rebalance: couchbase-cli rebalance -c 192.168.0.1:8091 \ --server-remove=192.168.0.2:8091
        Hide
        bcui Bin Cui (Inactive) added a comment -

        http://review.couchbase.org/#/c/22572/

        For --server-remove option, we still just use cluster admin/password to remove node. --server-add-username is not applicable.

        Show
        bcui Bin Cui (Inactive) added a comment - http://review.couchbase.org/#/c/22572/ For --server-remove option, we still just use cluster admin/password to remove node. --server-add-username is not applicable.
        Hide
        steve Steve Yen added a comment -

        Please just add the --server-add-username and --server-add-password to the help usage string.

        Show
        steve Steve Yen added a comment - Please just add the --server-add-username and --server-add-password to the help usage string.

          People

          • Assignee:
            bcui Bin Cui (Inactive)
            Reporter:
            farshid Farshid Ghods (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes