I am trying to connect to couchbase which is installed on linux server using Spring data 2.2.8 release. Our Couchbase
db is Enterprise Edition 5.0.0 build 2873.

There is cluster user id and password which i am not able to pass from AbstractCouchbaseConfiguration method and getting 401 error (Unknown ResponseStatus with Protocol HTTP: 401).

But when i tried with java sdk with below code i am able to connect successfully.

Cluster cluster = CouchbaseCluster.create(“servername”);
cluster.authenticate(“userid”, “password”);
Bucket bucket = cluster.openBucket(“bucket”);

Could you please help me to understand what i am doing wrong with Spring data.

i got the solution :). Just replace the java client with 2.5.x version and use the override the couchbaseCluster method. :slight_smile:

@Bean(destroyMethod = “disconnect”, name = BeanNames.COUCHBASE_CLUSTER)
public Cluster couchbaseCluster() throws Exception {
return CouchbaseCluster.create(couchbaseEnvironment(), getBootstrapHosts()).authenticate(“user”, “password”);