SDK v2.3.3 Authentication failed


This is similar to CouchbaseError: Authentication failed but I felt it was sufficiently different to warrant a new thread.

I am seeing this error when opening a password-protected bucket but only since upgrading from v2.3.2 to v.2.3.3.

I am doing the following:

  var cluster = new couchbase.Cluster('couchbase://localhost/');
  cluster.authenticate(<admin_user>, <admin_password>);
  var bucket = cluster.openBucket(<bucket_name>, <bucket_password>);

Note that I am supplying separate (different) passwords for bucket and couchbase, which was the accepted solution in the other thread.

If I run the above on v2.3.2 or below it works as expected. If I run it on v2.3.3 it fails with CouchbaseError: Authentication failed. You may have provided an invalid username/password combination. I am sure the password is correct. If I remove the password or downgrade to v2.3.2 it immediately works.

Looking at the release notes for v2.3.3 it states that it is only a minor release and, of the listed issues fixed, only JSCBC-356 looks vaguely relevant, although I wouldn’t expect it to break the current method.

Has anyone else seen this issue?


Hi Giles, what server version are you running and did you change that recently?

Hi Tyler,

I’m running Couchbase Server 4.5.1 Community edition. I did change versions recently - I was previously running v4.6.0 Developer Preview. I upgraded the SDK at about the same time.

I have cleared out my data and rebuilt my cluster/buckets since changing to 4.5.1. I haven’t tried SDK v2.3.3 with CS 4.6.0DP so don’t know if that will work. However, on 4.5.1, if I switch the SDK between 2.3.2 and 2.3.3 (with npm install couchbase@2.3.2 and npm install couchbase@2.3.3 I can immediately see the change in behaviour.


I have found out some more information…

If I remove the cluster.authenticate line then it works. The password still has a bucket and I am still specifying the bucket name and bucket password.
This is a change in behaviour from 2.3.2, where the authenticate call doesn’t affect the openBucket call.