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

[CX] Remote link with alternate address fails w/ internal error if kv[SSL] and mgmt[SSL] ports are not mapped

    XMLWordPrintable

Details

    • Untriaged
    • 1
    • Unknown

    Description

      Came across this while verifying MB-39278

      Steps
      Setup an EC2 instance and install couchbase in it
      Enabled Alternate address on it and configure kv to run on 9000:

      curl -v -X PUT -u Administrator:password \
      > http://localhost:8091/node/controller/setupAlternateAddresses/external \
      > -d hostname=ec2-3-237-24-39.compute-1.amazonaws.com \
      > -d kv=9000 \
      > -d n1ql=9050

      Installed couchbase in a vagrant box
      Set up remote link using alternate address of ec2 instance:

      [root@node2-mad-hatter-testing-centos7 bin]# ./couchbase-cli analytics-link-setup -c localhost:8091 -u Administrator -p password --create --name testAltLink --dataverse Default --type couchbase --hostname ec2-3-237-24-39.compute-1.amazonaws.com --link-username Administrator --link-password password --encryption none
      ERROR: Internal server error, please retry your request

      Works fine if kv runs on default port in the ec2 instance

      Attachments

        Issue Links

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

          Activity

            Note, this should be a 400 (i.e. Bad Request) as ec2-3-237-24-39.compute-1.amazonaws.com does not provide a mapping for the mgmt port, it is only a bug that this is returning an internal error.

            Both the mgmt and kv ports (or mgmtSSL and kvSSL) ports must be specified for each alternate host to be an acceptable remote cluster target.

            There is no functional outage due to this issue.

            michael.blow Michael Blow added a comment - Note, this should be a 400 (i.e. Bad Request) as ec2-3-237-24-39.compute-1.amazonaws.com does not provide a mapping for the mgmt port, it is only a bug that this is returning an internal error. Both the mgmt and kv ports (or mgmtSSL and kvSSL) ports must be specified for each alternate host to be an acceptable remote cluster target. There is no functional outage due to this issue.
            michael.blow Michael Blow added a comment -

            Consider to include in documentation for remote links:

            When using alternate addresses for remote links, at least one node in the remote cluster must have mgmt[SSL] port exposed, and ALL kv nodes have kv[SSL] port exposed. Failure to do so will result in a 400 (Bad Request) when creating / altering link.

            michael.blow Michael Blow added a comment - Consider to include in documentation for remote links: When using alternate addresses for remote links, at least one node in the remote cluster must have mgmt [SSL] port exposed, and ALL kv nodes have kv [SSL] port exposed. Failure to do so will result in a 400 (Bad Request) when creating / altering link.
            michael.blow Michael Blow added a comment -

            The internal error and requirement that ALL nodes expose management port was fixed as part of changes for MB-40596.

            michael.blow Michael Blow added a comment - The internal error and requirement that ALL nodes expose management port was fixed as part of changes for MB-40596 .

            Verified in 6.6.0-7899 - proper error returned now:

            [root@node1-mad-hatter-testing-centos7 bin]# ./couchbase-cli analytics-link-setup -c localhost:8091 -u Administrator -p password --create --name testAltLink --dataverse Default --type couchbase --hostname ec2-3-22-208-135.us-east-2.compute.amazonaws.com --link-username Administrator --link-password password --encryption none
            ERROR: CBAS0076: Link Default.testAltLink configured for alternate addresses but no nodes have port 'mgmt' alternatively bound

            [root@node1-mad-hatter-testing-centos7 bin]#

            arunkumar Arunkumar Senthilnathan (Inactive) added a comment - Verified in 6.6.0-7899 - proper error returned now: [root@node1-mad-hatter-testing-centos7 bin] # ./couchbase-cli analytics-link-setup -c localhost:8091 -u Administrator -p password --create --name testAltLink --dataverse Default --type couchbase --hostname ec2-3-22-208-135.us-east-2.compute.amazonaws.com --link-username Administrator --link-password password --encryption none ERROR: CBAS0076: Link Default.testAltLink configured for alternate addresses but no nodes have port 'mgmt' alternatively bound [root@node1-mad-hatter-testing-centos7 bin] #

            People

              arunkumar Arunkumar Senthilnathan (Inactive)
              arunkumar Arunkumar Senthilnathan (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty