Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AbstractCouchbaseConfiguration

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.

like image 946
Lalit Avatar asked Jul 01 '26 21:07

Lalit


1 Answers

Simply create a user with the same name as the bucket and set the password there, as I also answered in this other post.

As mentioned there, the docs should cover this and if there's anything confusing there, please click the "feedback" button and offer what could be improved!

https://developer.couchbase.com/documentation/server/5.0/security/security-authorization.html https://developer.couchbase.com/documentation/server/5.0/security/concepts-rba-for-apps.html https://developer.couchbase.com/documentation/server/5.0/security/security-resources-under-access-control.html

like image 154
Matt Ingenthron Avatar answered Jul 04 '26 06:07

Matt Ingenthron