Exception - Bucket with name TEST does not exist or cannot be reached

I am using couchbase server community edition 7.0.2 and .NET SDK 3.2.5. Couchbase is up and credentials given are couchbase console login credentials and bucket is also created. Still getting “Bucket with name TEST does not exist or cannot be reached.” exception

Bucket Getter Method :

get{try{if (CouchbaseClient.Instance != null){if (_bucketInstance == null)

{lock (SyncRoot){if (_bucketInstance == null){

Task task = Task.Run(async () =>

{

try

{

_bucketInstance = await CouchbaseClientSingleton.Instance.BucketAsync(“TEST”);

}

catch (Exception ex)

{

Logger.LogCritical(" Task Exception : : " + ex.Message);

}

});

task.Wait();}}}}}

catch (Exception ex){

Logger.LogCritical("Exception : " + ex.Message);return null;}}

Sorry you’re running into trouble. If you have a look at the logs, maybe have the log level turned up a bit, does it give you any more info?

Also, if you run sdk-doctor (see documentation) from the same environment with the same credentials, does it work?

I ran sdk-doctor from the same environment and I am able to connect successfully but still getting that error “Bucket with name TEST does not exist or cannot be reached.”

Below is the result after running sdk-doctor

.\sdk-doctor-windows.exe diagnose couchbase://127.0.0.1/TEST -u Administrator -p password

|====================================================================|
| ___ ___ _ __ ___ ___ ___ _____ ___ ___ |
| / | | |/ /| \ / _ \ / | / _ | _ \ |
| _
\ |) | ’ <
| |) | () | (_ | || () | / |
| |
//||_\ |/ _/ _| || __/||_\ |
| |
|====================================================================|

Note: Diagnostics can only provide accurate results when your cluster
is in a stable state. Active rebalancing and other cluster configuration
changes can cause the output of the doctor to be inconsistent or in the
worst cases, completely incorrect.

09:18:06.323 INFO :arrow_forward: Parsing connection string couchbase://127.0.0.1/TEST
09:18:06.325 INFO :arrow_forward: Connection string identifies the following CCCP endpoints:
09:18:06.325 INFO :arrow_forward: 1. 127.0.0.1:11210
09:18:06.328 INFO :arrow_forward: Connection string identifies the following HTTP endpoints:
09:18:06.330 INFO :arrow_forward: 1. 127.0.0.1:8091
09:18:06.334 INFO :arrow_forward: Connection string specifies bucket TEST
09:18:06.339 WARN :arrow_forward: Your connection string specifies only a single host. You should consider adding additional static nodes from your cluster to this list to improve your applications fault-tolerance
09:18:06.342 INFO :arrow_forward: Performing DNS lookup for host 127.0.0.1
09:18:06.345 INFO :arrow_forward: Attempting to connect to cluster via CCCP
09:18:06.350 INFO :arrow_forward: Attempting to fetch config via cccp from 127.0.0.1:11210
09:18:06.362 INFO :arrow_forward: Selected the following network type: default
09:18:06.365 INFO :arrow_forward: Identified the following nodes:
09:18:06.367 INFO :arrow_forward: [0] 127.0.0.1
09:18:06.368 INFO :arrow_forward: indexStreamCatchup: 9104, indexStreamMaint: 9105, kv: 11210
09:18:06.368 INFO :arrow_forward: mgmt: 8091, projector: 9999, fts: 8094
09:18:06.368 INFO :arrow_forward: indexAdmin: 9100, indexScan: 9101, indexStreamInit: 9103
09:18:06.369 INFO :arrow_forward: n1ql: 8093, capi: 8092, ftsGRPC: 9130
09:18:06.371 INFO :arrow_forward: indexHttp: 9102

09:18:06.410 INFO :arrow_forward: Fetching config from http://127.0.0.1:8091
09:18:06.425 INFO :arrow_forward: Received cluster configuration, nodes list:
[
{
“addressFamily”: “inet”,
“addressFamilyOnly”: false,
“clusterCompatibility”: 458752,
“clusterMembership”: “active”,
“configuredHostname”: “127.0.0.1:8091”,
“couchApiBase”: “http://127.0.0.1:8092/”,
“cpuCount”: 8,
“externalListeners”: [
{
“afamily”: “inet”,
“nodeEncryption”: false
}
],
“hostname”: “127.0.0.1:8091”,
“interestingStats”: {
“cmd_get”: 0,
“couch_docs_actual_disk_size”: 77849590,
“couch_docs_data_size”: 0,
“couch_spatial_data_size”: 0,
“couch_spatial_disk_size”: 0,
“couch_views_actual_disk_size”: 0,
“couch_views_data_size”: 0,
“curr_items”: 0,
“curr_items_tot”: 0,
“ep_bg_fetched”: 0,
“get_hits”: 0,
“mem_used”: 83036896,
“ops”: 0,
“vb_active_num_non_resident”: 0,
“vb_replica_curr_items”: 0
},
“mcdMemoryAllocated”: 48226,
“mcdMemoryReserved”: 48226,
“memoryFree”: 61481209856,
“memoryTotal”: 63212089344,
“nodeEncryption”: false,
“nodeUUID”: “bh146e2835f6c62bdd4ea57127f1184f”,
“os”: “x86_64-unknown-linux-gnu”,
“otpNode”: “ns_1@127.0.0.1”,
“ports”: {
“direct”: 11210,
“distTCP”: 21100,
“distTLS”: 21150
},
“recoveryType”: “none”,
“services”: [
“fts”,
“index”,
“kv”,
“n1ql”
],
“status”: “healthy”,
“systemStats”: {
“allocstall”: 0,
“cpu_cores_available”: 8,
“cpu_stolen_rate”: 0.02508151492350138,
“cpu_utilization_rate”: 1.555053925257086,
“mem_free”: 61481209856,
“mem_limit”: 63212089344,
“mem_total”: 63212089344,
“swap_total”: 0,
“swap_used”: 0
},
“thisNode”: true,
“uptime”: “1554359”,
“version”: “7.0.2-6703-community”
}
]
09:18:06.425 INFO :arrow_forward: Successfully connected to Key Value service at 127.0.0.1:11210
09:18:06.425 INFO :arrow_forward: Successfully connected to Management service at 127.0.0.1:8091
09:18:06.441 INFO :arrow_forward: Successfully connected to Views service at 127.0.0.1:8092
09:18:06.484 INFO :arrow_forward: Successfully connected to Query service at 127.0.0.1:8093
09:18:06.486 INFO :arrow_forward: Successfully connected to Search service at 127.0.0.1:8094
09:18:06.486 WARN :arrow_forward: Could not test Analytics service on 127.0.0.1 as it was not in the config
09:18:06.586 INFO :arrow_forward: Memd Nop Pinged 127.0.0.1:11210 10 times, 0 errors, 0ms min, 1ms max, 0ms mean

Try enabling logging at the DEBUG level to determine exactly why your getting the error. That error is a very generic error in that it tells you that bootstrapping has fails, but doesn’t tell you the reason why it cannot be reached.