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

couchbase analytics-link-setup doesn't work remotely with node name of 127.0.0.1

    XMLWordPrintable

    Details

    • Triage:
      Triaged
    • Story Points:
      1
    • Is this a Regression?:
      Unknown

      Description

      Problem
      Single node clusters are often configured with a node name of 127.0.0.1. When couchbase-cli is executed remotely it will resolve the host:port for specific services (e.g. CBAS_SERVICE), in this case that will be 127.0.0.1 and as a result it will fail.

      This breaks configuring analytics links on single node clusters with a name of 127.0.0.1.

      Suggested fix
      The address used to contact the cluster should be used on missing hostname and not 127.0.0.1, which it looks like is available as used_host in this function.

      Steps to reproduce
      1. Create single-node cluster, configure w/ KV + Analytics- ensure node name is '127.0.0.1' -
      2. From a separate machine that does not Couchbase w/ Analytics running, run

      $ couchbase-cli analytics-link-setup -c <server created in step 1> -u couchbase -p couchbase --list
      ERROR: Unable to connect to host at http://<server created in step 1>:8091: HTTPConnectionPool(host='127.0.0.1', port=8095): Max retries exceeded with url: /analytics/link (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7f1f454ee3c8>: Failed to establish a new connection: [Errno 111] Connection refused'))
      

      Workaround
      Define an external address on the node prior to executing the analytics-link-setup CLI command.

        Attachments

          Issue Links

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

            Activity

            Hide
            build-team Couchbase Build Team added a comment -

            Build couchbase-server-6.6.1-9093 contains couchbase-cli commit b1ca4a3 with commit message:
            MB-40209 Default to hostname specified

            Show
            build-team Couchbase Build Team added a comment - Build couchbase-server-6.6.1-9093 contains couchbase-cli commit b1ca4a3 with commit message: MB-40209 Default to hostname specified
            Hide
            build-team Couchbase Build Team added a comment -

            Build couchbase-server-7.0.0-3410 contains couchbase-cli commit b1ca4a3 with commit message:
            MB-40209 Default to hostname specified

            Show
            build-team Couchbase Build Team added a comment - Build couchbase-server-7.0.0-3410 contains couchbase-cli commit b1ca4a3 with commit message: MB-40209 Default to hostname specified
            Hide
            michael.blow Michael Blow added a comment -

            The workaround in our regression tests has been removed, and verifies this fix.

            Show
            michael.blow Michael Blow added a comment - The workaround in our regression tests has been removed, and verifies this fix.
            Hide
            pvarley Patrick Varley added a comment -

            Cheers Michael.

            Show
            pvarley Patrick Varley added a comment - Cheers Michael.
            Hide
            pvarley Patrick Varley added a comment -

            Description for release notes:

            couchbase-cli analytics-link-setup will fail on single node cluster configured to use loopback (127.0.0.1). This has now been fixed in 6.6.1.

            Workaround:
            Define an external address on the single node cluster prior to executing the analytics-link-setup command.

            Show
            pvarley Patrick Varley added a comment - Description for release notes: couchbase-cli analytics-link-setup will fail on single node cluster configured to use loopback (127.0.0.1). This has now been fixed in 6.6.1. Workaround: Define an external address on the single node cluster prior to executing the analytics-link-setup command.

              People

              Assignee:
              michael.blow Michael Blow
              Reporter:
              michael.blow Michael Blow
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes

                    PagerDuty