Problems connecting to Couchbase with SDK 3 - "Bucket does not exist"

Hello,

I’m new in using Couchbase and I’m trying to connect to an existing Couchbase cluster 6.6 within a docker container using CouchbaseNetClient 3.1.7 library.

This is the code I use:

var couchbaseCluster = await Cluster.ConnectAsync(hostname, username, password);

In this case, hostname is couchbase://[IP address of Couchbase], username and password are the credential of a user with Full_Admin permissions.

var usersBucket = await cluster.BucketAsync(Users);

As I try to execute this code, I get a BucketNotFoundException: Bucket with name Users does not exist.

I noticed however that even if I try to purposely use wrong credentials and even a wrong hostname, the error stays the same. I don’t get a “Unable to connect” error or something that says that the connection was not done.

So my question is: how do I know that I’m really connected to the Couchbase database?
Is there a way that I can diagnose connection problems to my couchbase cluster?

Thank you in advance

Luca

You could try SDK Doctor: SDK Doctor | Couchbase Docs - it will help you identify any network connectivity issues.