Problem on connecting couchbase server by Certificate

Currently I use Java SDK 3.1.4, Couchbase Server Enterprise Edition 6.6.2 and have a problem with java client authentication using java Keystore.
In development environment, I can successfully connect to couchbase server using java keystore file(JKS). But when I deploy code to the product environment, I get a WaitUntilReady timed out error when try to connect:

com.couchbase.client.core.error.UnambiguousTimeoutException: WaitUntilReady timed out

Sometime, in product environment, I can successfully connect to couchbase server.

I also asked once about this issue but unfortunately did not receive a response

Please help me! What happened to my product environment? Why sometimes have successful connection? Why sometimes have connection problems?

Is the version on the server the same in both cases?

There have been some recent improvements to WaitUntilReady. It’s hard to say for certain from the data at hand if the cause there is related to this. You might try getting the latest snapshot, which I believe is on the maven central snapshot repository.

If that doesn’t have an impact, I’d probably recommend running a very simple sample with the log level turned up as covered in the docs. You should be able to see the interaction as WaitUntilReady verifies system state across all the nodes.

I am also trying to use certificates to authenticate couchbase server via java client.

Can you share java code that is used to connect to server. I am facing some issue with my code and quiet new with couchbase.