Description
Tested on libcouchbase/2.8.4-njs couchnode/2.4.4
When running bucket.ping and if there is a node in the cluster that doesn't have the Data Service running on it, the ping result returns the correct nodes, plus an entry in the KV list with an error for nodes that don't have the Data Service running:
{
|
"config_rev":1068, |
"id":"0x38c72c0", |
"sdk":"libcouchbase/2.8.4-njs couchnode/2.4.4 (node/9.11.1; v8/6.2.414.46-node.23; ssl/1.0.2o)", |
"services":{ |
"kv":[ |
{
|
"details":"LCB_UNKNOWN_HOST (0x15): DNS/Hostname lookup failed", |
"latency_us":4048, |
"remote":":", |
"scope":"testB", |
"status":"error" |
},
|
{
|
"id":"0x385ed90", |
"latency_us":5172, |
"local":"10.0.2.15:50202", |
"remote":"10.111.151.101:11210", |
"scope":"testB", |
"status":"ok" |
},
|
{
|
"id":"0x38ea6f0", |
"latency_us":6312, |
"local":"10.0.2.15:57811", |
"remote":"10.111.151.102:11210", |
"scope":"testB", |
"status":"ok" |
}
|
],
|
"n1ql":[ |
{
|
"id":"0x394dad0", |
"latency_us":4093, |
"local":"10.0.2.15:51632", |
"remote":"10.111.151.103:8093", |
"status":"ok" |
}
|
],
|
"views":[ |
{
|
"id":"0x38a6cc0", |
"latency_us":5052, |
"local":"10.0.2.15:47853", |
"remote":"10.111.151.101:8092", |
"status":"ok" |
},
|
{
|
"id":"0x390a5f0", |
"latency_us":4812, |
"local":"10.0.2.15:48137", |
"remote":"10.111.151.102:8092", |
"status":"ok" |
}
|
]
|
},
|
"version":1 |
}
|
Code sample:
var couchbase = require('couchbase') |
var cluster = new couchbase.Cluster('couchbase://10.111.151.101/'); |
var bucket = cluster.openBucket('testB'); |
|
bucket.ping(["kv", "query", "view"], function(err, result) { |
if (err) throw err; |
console.log(JSON.stringify(result));
|
});
|