Thanks @ingenthr, I ran SDK Doctor inside CouchBase container. I attached also the results of the analysis at the bottom. What I can tell so far is, that hostname ‘yeself-db.service.consul’ is resolved to the same IP from application and from inside DB container:
/opt/yeself-guide-server # ping yeself-db.service.consul
PING yeself-db.service.consul (10.0.11.8): 56 data bytes
64 bytes from 10.0.11.8: seq=0 ttl=64 time=0.805 ms
root@55cbc0433fdf:/tmp# ping yeself-db.service.consul
PING yeself-db.service.consul (10.0.11.8) 56(84) bytes of data.
64 bytes from 10.0.11.8: icmp_seq=1 ttl=64 time=0.062 ms
But what is weird is, that although port 11210 is opened and listening
root@55cbc0433fdf:/tmp# netstat -ntl|grep 11210
tcp 0 0 0.0.0.0:11210 0.0.0.0:* LISTEN
tcp6 0 0 :::11210 :::*
doctor’s analysis says it cannot connect to KV service at 11210 - I am pretty sure bucket name is correct, user and password as well. Although I am running version 4.5 without bucket passwords at the moment. My command to start doctor looks like this:
./sdk-doctor-linux diagnose couchbase://yeself-db.service.consul/guide -u admin -p TopSecretPassword
And btw. we use NodeJS SDK.
|====================================================================|
| ___ ___ _ __ ___ ___ ___ _____ ___ ___ |
| / __| \| |/ /__| \ / _ \ / __|_ _/ _ \| _ \ |
| \__ \ |) | ' <___| |) | (_) | (__ | || (_) | / |
| |___/___/|_|\_\ |___/ \___/ \___| |_| \___/|_|_\ |
| |
|====================================================================|
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.
08:05:54.865 INFO ▶ Parsing connection string `couchbase://yeself-db.service.consul/guide`
08:05:55.065 INFO ▶ Connection string identifies the following CCCP endpoints:
08:05:55.065 INFO ▶ 1. yeself-db.service.consul:11210
08:05:55.065 INFO ▶ Connection string identifies the following HTTP endpoints:
08:05:55.065 INFO ▶ 1. yeself-db.service.consul:8091
08:05:55.065 INFO ▶ Connection string specifies bucket `guide`
08:05:55.065 WARN ▶ 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
08:05:55.065 INFO ▶ Performing DNS lookup for host `yeself-db.service.consul`
08:05:55.067 INFO ▶ Bootstrap host `yeself-db.service.consul` refers to a server with the address `10.0.11.8`
08:05:55.067 INFO ▶ Attempting to connect to cluster via CCCP
08:05:55.068 INFO ▶ Attempting to fetch config via cccp from `yeself-db.service.consul:11210`
08:05:55.074 ERRO ▶ Failed to fetch configuration via cccp from `yeself-db.service.consul:11210` (error: invalid bucket name/password)
08:05:55.074 INFO ▶ Attempting to connect to cluster via HTTP (Terse)
08:05:55.074 INFO ▶ Attempting to fetch terse config via http from `yeself-db.service.consul:8091`
08:05:55.086 INFO ▶ Identified the following nodes:
08:05:55.086 INFO ▶ [0] yeself-db.service.consul
08:05:55.086 INFO ▶ fts: 8094, indexScan: 9101, indexStreamCatchup: 9104
08:05:55.086 INFO ▶ indexStreamMaint: 9105, capi: 8092, projector: 9999
08:05:55.086 INFO ▶ mgmt: 8091, indexAdmin: 9100, indexHttp: 9102
08:05:55.086 INFO ▶ indexStreamInit: 9103, kv: 11210, moxi: 11211
08:05:55.086 INFO ▶ n1ql: 8093
08:05:55.086 WARN ▶ Your configuration was fetched via a non-optimal path, you should update your connection string and/or cluster configuration to allow CCCP config fetch
08:05:55.086 INFO ▶ Fetching config from `yeself-db.service.consul:8091`
08:05:55.104 INFO ▶ Received cluster configuration, nodes list:
[
{
"clusterCompatibility": 262149,
"clusterMembership": "active",
"couchApiBase": "http://yeself-db.service.consul:8092/",
"hostname": "yeself-db.service.consul:8091",
"interestingStats": {
"cmd_get": 0,
"couch_docs_actual_disk_size": 5.3653476e+07,
"couch_docs_data_size": 5.3309869e+07,
"couch_spatial_data_size": 0,
"couch_spatial_disk_size": 0,
"couch_views_actual_disk_size": 1.8277813e+07,
"couch_views_data_size": 1.8248727e+07,
"curr_items": 378,
"curr_items_tot": 378,
"ep_bg_fetched": 0,
"get_hits": 0,
"mem_used": 1.6401404e+08,
"ops": 0,
"vb_replica_curr_items": 0
},
"mcdMemoryAllocated": 23559,
"mcdMemoryReserved": 23559,
"memoryFree": 1.577699328e+10,
"memoryTotal": 3.0880018432e+10,
"os": "x86_64-unknown-linux-gnu",
"otpNode": "ns_1@yeself-db.service.consul",
"ports": {
"direct": 11210,
"proxy": 11211
},
"recoveryType": "none",
"services": [
"fts",
"index",
"kv",
"n1ql"
],
"status": "healthy",
"systemStats": {
"cpu_utilization_rate": 78.1725888324873,
"mem_free": 1.577699328e+10,
"mem_total": 3.0880018432e+10,
"swap_total": 4.2949632e+09,
"swap_used": 1.24063744e+09
},
"thisNode": true,
"uptime": "252960",
"version": "4.5.1-2844-community"
}
]
08:05:55.107 ERRO ▶ Failed to connect to KV service at `yeself-db.service.consul:11210` (error: invalid bucket name/password)
08:05:55.118 INFO ▶ Successfully connected to MGMT service at `yeself-db.service.consul:8091`
08:05:55.122 INFO ▶ Successfully connected to CAPI service at `yeself-db.service.consul:8092`
08:05:55.130 INFO ▶ Successfully connected to N1QL service at `yeself-db.service.consul:8093`
08:05:55.132 INFO ▶ Successfully connected to FTS service at `yeself-db.service.consul:8094`
08:05:55.134 WARN ▶ Failed to perform KV connection performance analysis on `yeself-db.service.consul:11210` (error: %!d(string=invalid bucket name/password))
08:05:55.134 INFO ▶ Diagnostics completed
Summary:
[WARN] 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
[WARN] Your configuration was fetched via a non-optimal path, you should update your connection string and/or cluster configuration to allow CCCP config fetch
[WARN] Failed to perform KV connection performance analysis on `yeself-db.service.consul:11210` (error: %!d(string=invalid bucket name/password))
[ERRO] Failed to fetch configuration via cccp from `yeself-db.service.consul:11210` (error: invalid bucket name/password)
[ERRO] Failed to connect to KV service at `yeself-db.service.consul:11210` (error: invalid bucket name/password)
Found multiple issues, see listing above.