Uploaded image for project: 'Couchbase C client library libcouchbase'
  1. Couchbase C client library libcouchbase
  2. CCBC-968

incorrect error message when connstr is missing bucket

    XMLWordPrintable

Details

    • New Feature
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.9.5
    • tools
    • None
    • 1

    Description

      I suspect this is an artifact of defaulting to defaults, but note that if I do not have a bucket name on the connstr, cbc says authentication fails:

      $ cbc stats key -U couchbase://centos7lx-55a.home.ingenthron.org -u bench -P -  green::1::10001874
      Bucket password: 
       
      Failed to bootstrap instance. libcouchbase error: Authentication failed. You may have provided an invalid username/password combination (0x2)
      

      The cluster log indicates the auth was successful, but it probably failed at bucket select because I left out the bucket name from the connstr. Would be great to make the error associated with the actual failure.

      Attachments

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

        Activity

          Missing bucket means, "default" bucket will be used. And your cluster seems not having it.

          This is documented behaviour:
          http://docs.couchbase.com/sdk-api/couchbase-c-client-2.9.3/group__lcb-init.html

          If a bucket is not specified it will revert to the default bucket

          When bucket_select requests the bucket, which does not exist, the server gives us EACCESS, which we interpret as authentication error and ask people to check credentials:
          https://github.com/couchbase/libcouchbase/blob/2.9.3/src/mcserver/negotiate.cc#L635-L636

          avsej Sergey Avseyev added a comment - Missing bucket means, "default" bucket will be used. And your cluster seems not having it. This is documented behaviour: http://docs.couchbase.com/sdk-api/couchbase-c-client-2.9.3/group__lcb-init.html If a bucket is not specified it will revert to the default bucket When bucket_select requests the bucket, which does not exist, the server gives us EACCESS, which we interpret as authentication error and ask people to check credentials: https://github.com/couchbase/libcouchbase/blob/2.9.3/src/mcserver/negotiate.cc#L635-L636

          I get why it defaulted to "default", but the message is confusing as it says my authentication failed, which it didn't. The select bucket failed. Can we add more to the error message to make that clear?

          ingenthr Matt Ingenthron added a comment - I get why it defaulted to "default", but the message is confusing as it says my authentication failed, which it didn't. The select bucket failed. Can we add more to the error message to make that clear?

          Build libcouchbase-2.8.5-241 contains libcouchbase commit 10d41f7 with commit message:
          CCBC-968: Improve log message for SELECT_BUCKET on EACCESS

          build-team Couchbase Build Team added a comment - Build libcouchbase-2.8.5-241 contains libcouchbase commit 10d41f7 with commit message: CCBC-968 : Improve log message for SELECT_BUCKET on EACCESS

          Build couchbase-server-6.5.0-1328 contains libcouchbase commit 10d41f7 with commit message:
          CCBC-968: Improve log message for SELECT_BUCKET on EACCESS

          build-team Couchbase Build Team added a comment - Build couchbase-server-6.5.0-1328 contains libcouchbase commit 10d41f7 with commit message: CCBC-968 : Improve log message for SELECT_BUCKET on EACCESS

          People

            avsej Sergey Avseyev
            ingenthr Matt Ingenthron
            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