Hi,
The openBucket call fails with Error=LCB_ETIMEDOUT. But the same code works from windows/linux.
On LCB_LOGLEVEL=5 i am getting following logs:
This process is your pid 24870
0ms [I52bb4d77] {24870/307} [INFO] (instance - L:469) Version=2.10.6-njs, Changeset=61e274aae48b6edeecb081afec843dbe31d72790
0ms [I52bb4d77] {24870/307} [INFO] (instance - L:470) Effective connection string: http://<IP>:8091/<BucketName>?detailed_errcodes=1&operation_timeout=12000000000&config_node_timeout=200&enable_errmap=true&enable_tracing=true&client_string=couchnode%2F2.6.12%20(node%2F10.20.1%3B%20v8%2F6.8.275.32-node.56%3B%20ssl%2F1.1.1e). Bucket=<BucketName>
0ms [I52bb4d77] {24870/307} [DEBUG] (instance - L:318) Applying initial cntl detailed_errcodes=1
0ms [I52bb4d77] {24870/307} [DEBUG] (instance - L:318) Applying initial cntl operation_timeout=12000000000
0ms [I52bb4d77] {24870/307} [DEBUG] (instance - L:318) Applying initial cntl config_node_timeout=200
0ms [I52bb4d77] {24870/307} [DEBUG] (instance - L:318) Applying initial cntl enable_errmap=true
0ms [I52bb4d77] {24870/307} [DEBUG] (instance - L:318) Applying initial cntl enable_tracing=true
0ms [I52bb4d77] {24870/307} [DEBUG] (instance - L:318) Applying initial cntl client_string=couchnode/2.6.12 (node/10.20.1; v8/6.8.275.32-node.56; ssl/1.1.1e)
20044ms [I52bb4d77] {24870/307} [INFO] (instance - L:146) DNS SRV lookup failed: DNS/Hostname lookup failed. Ignore this if not relying on DNS SRV records
20044ms [I52bb4d77] {24870/307} [DEBUG] (instance - L:83) Adding host <IP>:8091 to initial HTTP bootstrap list
20045ms [I52bb4d77] {24870/307} [DEBUG] (instance - L:83) Adding host <IP>:11210 to initial CCCP bootstrap list
20045ms [I52bb4d77] {24870/307} [TRACE] (instance - L:126) Bootstrap hosts loaded (cccp:1, http:1)
bucket created
20047ms [I52bb4d77] {24870/307} [INFO] (bootstrap - L:218) Requested network configuration: heuristic
20047ms [I52bb4d77] {24870/307} [DEBUG] (confmon - L:81) Preparing providers (this may be called multiple times)
20047ms [I52bb4d77] {24870/307} [DEBUG] (confmon - L:88) Provider CCCP is ENABLED
20047ms [I52bb4d77] {24870/307} [DEBUG] (confmon - L:88) Provider HTTP is ENABLED
20047ms [I52bb4d77] {24870/307} [TRACE] (confmon - L:278) Refreshing current cluster map
20047ms [I52bb4d77] {24870/307} [TRACE] (confmon - L:265) Attempting to retrieve cluster map via CCCP
20047ms [I52bb4d77] {24870/307} [INFO] (cccp - L:151) Requesting connection to node <IP>:11210 for CCCP configuration
20047ms [I52bb4d77] {24870/307} [DEBUG] (lcbio_mgr - L:449) <<IP>:11210> (HE=0x105207b80) Creating new connection because none are available in the pool
20047ms [I52bb4d77] {24870/307} [TRACE] (lcbio_mgr - L:360) <<IP>:11210> (HE=0x105207b80) New pool entry: I=0x105205790
20047ms [I52bb4d77] {24870/307} [INFO] (connection - L:474) <<IP>:11210> (SOCK=0000000006daea10) Starting. Timeout=200000000us
20049ms [I52bb4d77] {24870/307} [ERROR] (bootstrap - L:170) Failed to bootstrap client=0x1052059e0. Error=LCB_ETIMEDOUT (0x17), Message=Failed to bootstrap in time
{ [CouchbaseError: Client-Side timeout exceeded for operation. Inspect network conditions or increase the timeout]
message:
'Client-Side timeout exceeded for operation. Inspect network conditions or increase the timeout',
code: 23 }
Can't open bucket
20052ms [I52bb4d77] {24870/307} [DEBUG] (lcbio_mgr - L:467) <<IP>:11210> (HE=0x105207b80) Request=0x105207cf0 has no connection.. yet
20096ms [I52bb4d77] {24870/307} [TRACE] (connection - L:367) <<IP>:11210> (SOCK=0000000006daea10) Received completion handler. Status=0. errno=0 [Undefined error: 0]
The code for the same is as follows:
var cluster = new cb.Cluster(
"http://<IP>:8091/?detailed_errcodes=1&operation_timeout=12000000000&config_node_timeout=200"
);
cluster.authenticate("<UserName>", "<password>");
var bucket = cluster.openBucket("<BucketName>", function (err) {
if (err) {
console.log("Can't open bucket");
// throw err;
} else {
console.log("Successfully opened bucket");
}
});
bucket.operationTimeout = 500 * 1000;
const query = `SELECT * FROM <BucketName> WHERE documentType = "COMPUTE_RULES" LIMIT 1`;
console.log("bucket created");
bucket.query(cb.N1qlQuery.fromString(query), {}, (err, rows) => {
if (err) {
console.log(err);
return;
}
console.log(rows);
});
Anything i am doing wrong? I am using a new mac book with macOS catalina v 10.15.4?
I am new to macbooks.