Timeout error connecting to Couchbase

We had an odd behavior (happened just once) where during a deployment, our service failed to connect to Couchbase due to a timeout. Once this failed, it worked just fine on a retry.

This service is using v2.4.1 of the Couchbase Java client.

Exception in thread "main" java.lang.RuntimeException: java.util.concurrent.TimeoutException at com.couchbase.client.core.utils.Blocking.blockForSingle(Blocking.java:74) at com.couchbase.client.java.CouchbaseCluster.openBucket(CouchbaseCluster.java:310) at com.couchbase.client.java.CouchbaseCluster.openBucket(CouchbaseCluster.java:294) at com.couchbase.client.java.CouchbaseCluster.openBucket(CouchbaseCluster.java:283) at com.cvent.couch2.CouchbaseClientManager.lambda$initializeBuckets$3(CouchbaseClientManager.java:160) at java.util.Iterator.forEachRemaining(Iterator.java:116) at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580)
The calling method is internal code, but it’s doing:
bucket = c.openBucket(bucketEntry.getKey(), bc.getPassword());

Thanks - Howie

This is very hard to triage without more information - are you sure it wasn’t a network blip or something? The bucket open call is the one where we open all resources like sockets against the target cluster, so if something took longer it maybe ran over the 5s interval (and succeeded on a retry).