Is There any approach can allow me reconnect when the Couchbase server reset?

Is There any approach can allow me re-connection when the Couchbase server reset?

I just create bucket once time when my Application was started, not create bucket every time.

So, the problem is: my application didn’t know if the Couchbase server was reset, it will still perform Query,
Delete,Update operations, but at that time Couchbase server was stopped, so my application cannot get
the documents by their key,(No exception was throw ) but those documents really existed in Couchbase.

Please let me know how can i re-connect?

Thank you.

Hi Everybody,

I found that Couchbase client can auto-reconnecte.

After I created bucket object, I use it to get document from CB, at this period I reset the Couchbase server,

But my client program didn’t re-start, then I got this message:

“The node 127.0.0.1:11210 that the key was mapped to is either down or unreachable. The SDK will continue to try to connect every 1000ms. Until it can connect every operation routed to it will fail with this exception.”

After few seconds, the connection was re-connected by Couchbase client side.

Thanks

1 Like

@windyliupei -

Indeed, the client will try to reconnect if a cluster node goes down. A cluster node (the representation within the client) may also reach this state if a number of errors occurs within a set timespan.

-Jeff