The DB is up and running, the data is there, the credentials are correct. However, I’m getting “Error: cluster object was closed” error (see the screenshot below).
Please note, that the equivalent code with v2.x SDK works fine with the same credentials, network params and query.
@raju I just tried again with different Node versions, as well as with dockerized and non-dockerized Couchbase server instances, still getting the same error.
Can you please provide the versions you are using: Node, Couchbase server (with docker or not?), package version and OS. Thanks.
@raju can you please confirm that you’ve executed the same, which I’ve shared above? Or you used some other code?
@brett19@matthew.groves Guys can you please help me to resolve this? What am I doing wrong? Perhaps there’s something else which can make the app to throw this error? (idk, some connection issue, firewall, whatever)
Hey @brett19, thanks for the reply. The "test"s here are just for demonstrative purposes. I’m using admin user. I even created another user with full access but still getting the same isssue. Any more thoughts?
@brett19 I’m trying to debug the code inside the Couchbase package. The error I’m getting is “cluster object was closed” and it is being thrown from the “close” method of “Connection” class, but the thing is that I removed this line “cluster.close();” from my usage code. So I wonder, is it ok that it still calls the “connection.close()”?
Update: Ok, so connect is failing, that’s why the close is being called (in cluster._getConn)
Can you describe a bit more about the environment you are operating in, and could you try the newly release 3.0.6 SDK? Looking at the logs you posted, it appears that our underlying libcouchbase library set up a timeout for 2s, but that the 2s timer expired nearly immediately. I’ve seen this show up on the forums once before, but have never been able to reproduce it and I don’t believe the user ever posted what had resolved it.
Please note that the following code (which is pretty much the equivalent code for version 2.x) is working perfectly with the same host/credentials using Couchbase SDK v2.6.12.
Also I wonder, is it possible to see the exact (underlying) error, which causes the v3 to fail, instead of LCB_ERR_TIMEOUT? And what are some major differences of creating a connection between these 2 versions?