Using Couchbase 5.0 and its Java client 2.0.3, I have the following error.
Just following these instructions to open a bucket:
https://developer.couchbase.co
In Couchbase Server 5.0, role-based access controls were introduced. You must now create a user with a name that matches the bucket name and use that user's password when opening the bucket. The user must have a role with access rights to the bucket.
Cluster cluster = CouchbaseCluster.create();
Bucket bucket = cluster.openBucket("hero", "password");
See this Couchbase forum post for more information: V5.0 - NEW Role-Based Authentication - Bucket Passwords, etc
SDK Users
- Continue to use your current SDK versions to access buckets where there is a user, with proper permissions, with the same name as the bucket.
- Upgrade to the latest SDK versions to access the newer Authentication and User Management functions that are now available.