Details
Description
```
var cluster = new couchbase.Cluster(
'http://localhost:8091',
)
var bucket = cluster.bucket('beer-sample')
```
When connecting, there is an error https://github.com/couchbase/couchnode/blob/master/lib/connection.js#L101
"LCB_ERR_TIMEOUT (201): A request cannot be completed until the user-defined timeout fired"
And the connection is closed. Then when I query `cluster.query(sqlStr)` it returns `Error: parent cluster object has been closed` because the connection is closed.
The problem is that it fails randomly. If I use a debugger it has more chances to fail.
Using the `async` functions to wait for the cluster creation seems to work fine. Something link:
```
couchbase.Cluster.connect('http://localhost:8091',
)
.then((cluster) =>
);
```
Attachments
Issue Links
- is duplicated by
-
JSCBC-706 Client does not attempt to reconnect on bucket connect errors
- Resolved