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

Couchbase-CLI should display the error message returned by ns_server

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 4.0.0
    • 4.0.0
    • tools
    • Security Level: Public
    • None
    • Untriaged
    • Unknown

    Description

      Issued graceful failover using couchbase-cli. Command failed as expected.
      Couchbase-cli displayed the error code returned by ns-server but not
      the error message.

      E.g.
      Error message displayed by couchbase-cli is "No JSON object could be decoded" where as the actual message returned by ns-server is "Rebalance running." If the command is issued using the REST interface, then it displays the correct error message. Same issue was seen with other failover errors as well.

      ------------ Command issued using CLI -----------------
      couchbase-cli failover --server-failover=127.0.0.1:9002 -c 127.0.0.1:9000
      ERROR: unable to failover n_2@127.0.0.1 (503) Service Unavailable
      ERROR: command: failover: 127.0.0.1:9000, No JSON object could be decoded

      ------------ Command issued using REST -----------------

      /Users/poonam/Workspace/Sherlock/couchbase-cli$ curl -v -X POST -u Administrator:asdasd http://127.0.0.1:9000/controller/startGracefulFailover -d otpNode=n_2@127.0.0.1

      • About to connect() to 127.0.0.1 port 9000 (#0)
      • Trying 127.0.0.1...
      • Adding handle: conn: 0x7f8599801a00
      • Adding handle: send: 0
      • Adding handle: recv: 0
      • Curl_addHandleToPipeline: length: 1
      • - Conn 0 (0x7f8599801a00) send_pipe: 1, recv_pipe: 0
      • Connected to 127.0.0.1 (127.0.0.1) port 9000 (#0)
      • Server auth using Basic with user 'Administrator'
        > POST /controller/startGracefulFailover HTTP/1.1
        > Authorization: Basic QWRtaW5pc3RyYXRvcjphc2Rhc2Q=
        > User-Agent: curl/7.30.0
        > Host: 127.0.0.1:9000
        > Accept: /
        > Content-Length: 21
        > Content-Type: application/x-www-form-urlencoded
        >
      • upload completely sent off: 21 out of 21 bytes
        < HTTP/1.1 503 Service Unavailable
      • Server Couchbase Server is not blacklisted
        < Server: Couchbase Server
        < Pragma: no-cache
        < Date: Wed, 25 Mar 2015 18:05:29 GMT
        < Content-Type: text/plain
        < Content-Length: 18
        < Cache-Control: no-cache
        <
      • Connection #0 to host 127.0.0.1 left intact
        Rebalance running.

      Attachments

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

        Activity

          People

            bcui Bin Cui (Inactive)
            poonam Poonam Dhavale
            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