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

Using couchbase-cli to setup couchbase(cluster-init) on non default port returns error

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.0
    • Fix Version/s: bug-backlog
    • Component/s: tools
    • Security Level: Public
    • Environment:
      build#1965
    • Triage:
      Untriaged

      Description

      Using couchbase-cli to setup couchbase on non default port returns error. Though the cluster gets initialized, the cluster-init-ramsize is not used.

      Steps to reproduce:

      1. Install build 1965 on linux.

      2. Use couchbase-cli to init cluster - Returns error. Seems its still trying to connect to 8091 after init.
      root@ubuntu1104-64:/opt/couchbase/bin# ./couchbase-cli cluster-init -c 10.3.3.96:8091 --cluster-init-username=Administrator --cluster-init-password=password --cluster-init-port=8080 --cluster-init-ramsize=1024

      SUCCESS: init 10.3.3.96
      ERROR: command: cluster-init: 10.3.3.96:8091, [Errno 111] Connection refused

      3. Verify the ram quota. Incorrect Ram quota has been set.

      root@ubuntu1104-64:/opt/couchbase/bin# ./couchbase-cli server-info -c 10.3.3.96:8080 -u Administrator -p password

      "ram":

      { "quotaTotal": 3865051136, "quotaUsed": 0, "total": 6442450944, "used": 1599672320, "usedByData": 0 }

      Expected behavior when default port is used:

      1. Install build 1965 on linux.

      2. Use couchbase-cli to init cluster.

      root@ubuntu1104-64:/opt/couchbase/bin# ./couchbase-cli cluster-init -c 10.3.3.104:8091 --cluster-init-username=Administrator --cluster-init-password=password --cluster-init-port=8091 --cluster-init-ramsize=1024

      SUCCESS: init 10.3.3.104
      SUCCESS: init 10.3.3.104

      3. Verify the ram quota.

      root@ubuntu1104-64:/opt/couchbase/bin# ./couchbase-cli server-info -c 10.3.3.104:8091 -u Administrator -p password

      "ram":

      { "quotaTotal": 1073741824, "quotaUsed": 0, "total": 6442450944, "used": 1491410944, "usedByData": 0 }
      No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

        deepkaran.salooja Deepkaran Salooja created issue -
        deepkaran.salooja Deepkaran Salooja made changes -
        Field Original Value New Value
        Description
        Using couchbase-cli to setup couchbase on non default port returns error. Though the cluster gets initialized, the cluster-init-ramsize is not used.

        Steps to reproduce:

        1. Install build 1965 on linux.

        2. Use couchbase-cli to init cluster - Returns error. Seems its still trying to connect to 8091 after init.
        root@ubuntu1104-64:/opt/couchbase/bin# ./couchbase-cli cluster-init -c 10.3.3.96:8091 --cluster-init-username=Administrator --cluster-init-password=password --cluster-init-port=8080 --cluster-init-ramsize=1024

        SUCCESS: init 10.3.3.96
        ERROR: command: cluster-init: 10.3.3.96:8091, [Errno 111] Connection refused

        3. Verify the ram quota. Incorrect Ram quota has been set.

        root@ubuntu1104-64:/opt/couchbase/bin# ./couchbase-cli server-info -c 10.3.3.96:8080 -u Administrator -p password

            "ram": {
              "quotaTotal": 3865051136,
              "quotaUsed": 0,
              "total": 6442450944,
              "used": 1599672320,
              "usedByData": 0
            }

        Expected behavior when default port is used:

        1. Install build 1965 on linux.

        2. Use couchbase-cli to init cluster.

        root@ubuntu1104-64:/opt/couchbase/bin# ./couchbase-cli cluster-init -c 10.3.3.104:8091 --cluster-init-username=Administrator --cluster-init-password=password --cluster-init-port=8091 --cluster-init-ramsize=1024

        SUCCESS: init 10.3.3.104
        SUCCESS: init 10.3.3.104

        3. Verify the ram quota. Incorrect Ram quota has been set.

        root@ubuntu1104-64:/opt/couchbase/bin# ./couchbase-cli server-info -c 10.3.3.104:8091 -u Administrator -p password

            "ram": {
              "quotaTotal": 1073741824,
              "quotaUsed": 0,
              "total": 6442450944,
              "used": 1491410944,
              "usedByData": 0
            }

        Using couchbase-cli to setup couchbase on non default port returns error. Though the cluster gets initialized, the cluster-init-ramsize is not used.

        Steps to reproduce:

        1. Install build 1965 on linux.

        2. Use couchbase-cli to init cluster - Returns error. Seems its still trying to connect to 8091 after init.
        root@ubuntu1104-64:/opt/couchbase/bin# ./couchbase-cli cluster-init -c 10.3.3.96:8091 --cluster-init-username=Administrator --cluster-init-password=password --cluster-init-port=8080 --cluster-init-ramsize=1024

        SUCCESS: init 10.3.3.96
        ERROR: command: cluster-init: 10.3.3.96:8091, [Errno 111] Connection refused

        3. Verify the ram quota. Incorrect Ram quota has been set.

        root@ubuntu1104-64:/opt/couchbase/bin# ./couchbase-cli server-info -c 10.3.3.96:8080 -u Administrator -p password

            "ram": {
              "quotaTotal": 3865051136,
              "quotaUsed": 0,
              "total": 6442450944,
              "used": 1599672320,
              "usedByData": 0
            }

        Expected behavior when default port is used:

        1. Install build 1965 on linux.

        2. Use couchbase-cli to init cluster.

        root@ubuntu1104-64:/opt/couchbase/bin# ./couchbase-cli cluster-init -c 10.3.3.104:8091 --cluster-init-username=Administrator --cluster-init-password=password --cluster-init-port=8091 --cluster-init-ramsize=1024

        SUCCESS: init 10.3.3.104
        SUCCESS: init 10.3.3.104

        3. Verify the ram quota.

        root@ubuntu1104-64:/opt/couchbase/bin# ./couchbase-cli server-info -c 10.3.3.104:8091 -u Administrator -p password

            "ram": {
              "quotaTotal": 1073741824,
              "quotaUsed": 0,
              "total": 6442450944,
              "used": 1491410944,
              "usedByData": 0
            }
        Hide
        steve Steve Yen added a comment -

        need to diagnose

        Show
        steve Steve Yen added a comment - need to diagnose
        Hide
        steve Steve Yen added a comment -

        One workaround is that after user does their first cluster-init to setup the right port, they can do cluster-init again to setup the right ramsize. Here's example after a clean install...

        root@ubuntu1104-64:~# dpkg -i couchbase-server-community_x86_64_2.0.0-1965-rel.deb Selecting previously deselected package couchbase-server.
        (Reading database ... 129497 files and directories currently installed.)
        Unpacking couchbase-server (from couchbase-server-community_x86_64_2.0.0-1965-rel.deb) ...
        libssl0.9.8 is installed. Continue installing
        Setting up couchbase-server (2.0.0) ...

        • Started couchbase-server

        You have successfully installed Couchbase Server.
        Please browse to http://ubuntu1104-64:8091/ to configure your server.
        Please refer to http://couchbase.com for additional resources.

        Please note that you have to update your firewall configuration to
        allow connections to the following ports: 11211, 11210, 11209, 4369,
        8091 and from 21100 to 21299.

        By using this software you agree to the End User License Agreement.
        See /opt/couchbase/LICENSE.txt.

        Processing triggers for ureadahead ...

        root@ubuntu1104-64:~# /opt/couchbase/bin/couchbase-cli cluster-init -c 127.0.0.1:8091 --cluster-init-username=Administrator --cluster-init-password=password --cluster-init-port=8080
        SUCCESS: init 127.0.0.1

        root@ubuntu1104-64:~# /opt/couchbase/bin/couchbase-cli cluster-init -c 127.0.0.1:8080 -u Administrator -p password --cluster-init-ramsize=1024
        SUCCESS: init 127.0.0.1
        SUCCESS: init 127.0.0.1

        root@ubuntu1104-64:~# /opt/couchbase/bin/couchbase-cli server-info -c 127.0.0.1:8080 -u Administrator -p password
        {
        "availableStorage": {
        "hdd": [

        { "path": "/", "sizeKBytes": 13167336, "usagePercent": 78 }

        ,

        { "path": "/dev", "sizeKBytes": 2021356, "usagePercent": 1 }

        ,

        { "path": "/dev/shm", "sizeKBytes": 2029332, "usagePercent": 0 }

        ,

        { "path": "/var/run", "sizeKBytes": 2029332, "usagePercent": 1 }

        ,

        { "path": "/var/lock", "sizeKBytes": 2029332, "usagePercent": 0 }

        ,

        { "path": "/boot", "sizeKBytes": 233191, "usagePercent": 41 }

        ]
        },
        "clusterCompatibility": 131072,
        "clusterMembership": "active",
        "couchApiBase": "http://127.0.0.1:8092/",
        "hostname": "127.0.0.1:8080",
        "interestingStats": {},
        "mcdMemoryAllocated": 3170,
        "mcdMemoryReserved": 3170,
        "memoryFree": 1002487808,
        "memoryQuota": 1024,
        "memoryTotal": 4156071936,
        "os": "x86_64-unknown-linux-gnu",
        "otpCookie": "drnpibhajfnqhdbb",
        "otpNode": "ns_1@127.0.0.1",
        "ports":

        { "direct": 11210, "proxy": 11211 }

        ,
        "status": "healthy",
        "storage": {
        "hdd": [

        { "index_path": "/opt/couchbase/var/lib/couchbase/data/", "path": "/opt/couchbase/var/lib/couchbase/data/", "quotaMb": "none", "state": "ok" }

        ],
        "ssd": []
        },
        "storageTotals": {
        "hdd":

        { "free": 2966337455, "quotaTotal": 13483352064, "total": 13483352064, "used": 10517014609, "usedByData": 0 }

        ,
        "ram":

        { "quotaTotal": 1073741824, "quotaUsed": 0, "total": 4156071936, "used": 3153584128, "usedByData": 0 }

        },
        "systemStats":

        { "cpu_utilization_rate": 0.2544529262086514, "swap_total": 1073737728, "swap_used": 4435968 }

        ,
        "thisNode": true,
        "uptime": "67",
        "version": "2.0.0-1965-rel-community"
        }

        Show
        steve Steve Yen added a comment - One workaround is that after user does their first cluster-init to setup the right port, they can do cluster-init again to setup the right ramsize. Here's example after a clean install... root@ubuntu1104-64:~# dpkg -i couchbase-server-community_x86_64_2.0.0-1965-rel.deb Selecting previously deselected package couchbase-server. (Reading database ... 129497 files and directories currently installed.) Unpacking couchbase-server (from couchbase-server-community_x86_64_2.0.0-1965-rel.deb) ... libssl0.9.8 is installed. Continue installing Setting up couchbase-server (2.0.0) ... Started couchbase-server You have successfully installed Couchbase Server. Please browse to http://ubuntu1104-64:8091/ to configure your server. Please refer to http://couchbase.com for additional resources. Please note that you have to update your firewall configuration to allow connections to the following ports: 11211, 11210, 11209, 4369, 8091 and from 21100 to 21299. By using this software you agree to the End User License Agreement. See /opt/couchbase/LICENSE.txt. Processing triggers for ureadahead ... root@ubuntu1104-64:~# /opt/couchbase/bin/couchbase-cli cluster-init -c 127.0.0.1:8091 --cluster-init-username=Administrator --cluster-init-password=password --cluster-init-port=8080 SUCCESS: init 127.0.0.1 root@ubuntu1104-64:~# /opt/couchbase/bin/couchbase-cli cluster-init -c 127.0.0.1:8080 -u Administrator -p password --cluster-init-ramsize=1024 SUCCESS: init 127.0.0.1 SUCCESS: init 127.0.0.1 root@ubuntu1104-64:~# /opt/couchbase/bin/couchbase-cli server-info -c 127.0.0.1:8080 -u Administrator -p password { "availableStorage": { "hdd": [ { "path": "/", "sizeKBytes": 13167336, "usagePercent": 78 } , { "path": "/dev", "sizeKBytes": 2021356, "usagePercent": 1 } , { "path": "/dev/shm", "sizeKBytes": 2029332, "usagePercent": 0 } , { "path": "/var/run", "sizeKBytes": 2029332, "usagePercent": 1 } , { "path": "/var/lock", "sizeKBytes": 2029332, "usagePercent": 0 } , { "path": "/boot", "sizeKBytes": 233191, "usagePercent": 41 } ] }, "clusterCompatibility": 131072, "clusterMembership": "active", "couchApiBase": "http://127.0.0.1:8092/", "hostname": "127.0.0.1:8080", "interestingStats": {}, "mcdMemoryAllocated": 3170, "mcdMemoryReserved": 3170, "memoryFree": 1002487808, "memoryQuota": 1024, "memoryTotal": 4156071936, "os": "x86_64-unknown-linux-gnu", "otpCookie": "drnpibhajfnqhdbb", "otpNode": "ns_1@127.0.0.1", "ports": { "direct": 11210, "proxy": 11211 } , "status": "healthy", "storage": { "hdd": [ { "index_path": "/opt/couchbase/var/lib/couchbase/data/", "path": "/opt/couchbase/var/lib/couchbase/data/", "quotaMb": "none", "state": "ok" } ], "ssd": [] }, "storageTotals": { "hdd": { "free": 2966337455, "quotaTotal": 13483352064, "total": 13483352064, "used": 10517014609, "usedByData": 0 } , "ram": { "quotaTotal": 1073741824, "quotaUsed": 0, "total": 4156071936, "used": 3153584128, "usedByData": 0 } }, "systemStats": { "cpu_utilization_rate": 0.2544529262086514, "swap_total": 1073737728, "swap_used": 4435968 } , "thisNode": true, "uptime": "67", "version": "2.0.0-1965-rel-community" }
        Hide
        steve Steve Yen added a comment -

        after discussing with Farshid, and with this as an edge case, moving this to fix after 2.0.0

        Show
        steve Steve Yen added a comment - after discussing with Farshid, and with this as an edge case, moving this to fix after 2.0.0
        steve Steve Yen made changes -
        Labels 2.0-release-notes
        Fix Version/s .next [ 10342 ]
        Fix Version/s 2.0 [ 10114 ]
        Hide
        kzeller kzeller added a comment -

        Added to RN:
        If you use <command>couchbase-cli</command> to setup a Couchbase node on a non-default port, you may
        receive an error. Although the cluster gets initialized, the initial RAM quota
        is not used and the server returns an error.

        Show
        kzeller kzeller added a comment - Added to RN: If you use <command>couchbase-cli</command> to setup a Couchbase node on a non-default port, you may receive an error. Although the cluster gets initialized, the initial RAM quota is not used and the server returns an error.
        maria Maria McDuff (Inactive) made changes -
        Fix Version/s bug-backlog [ 11600 ]
        Fix Version/s feature-backlog [ 10342 ]
        Triage Untriaged [ 10351 ]
        Hide
        mikew Mike Wiederhold added a comment -

        Closing as won't fix, too old.

        Show
        mikew Mike Wiederhold added a comment - Closing as won't fix, too old.
        mikew Mike Wiederhold made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Won't Fix [ 2 ]
        mikew Mike Wiederhold made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            steve Steve Yen
            Reporter:
            deepkaran.salooja Deepkaran Salooja
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes