Connect attempt 4724 failed because of TimeoutException

We are running a microservice (Java based) on a a kubernetese cluster. When the pods are started, the application starts normally and connects to the couchbase db on port 18091.

However, when we try to perform an REST call on the service which internally makes a db call, we encounter this exception:

025-04-04 05:51:05 WARN [cb-events] LoggingEventConsumer.java:567 - [com.couchbase.endpoint][EndpointConnectionFailedEvent][10s] Connect attempt 4724 failed because of TimeoutException: Did not observe any item or terminal signal within 10000ms in ‘source(MonoDefer)’ (and no fallback has been configured) {“circuitBreaker”:“DISABLED”,“coreId”:“0x1d5b8f1d00000001”,“remote”:“hostname:18093”,“type”:“QUERY”}
java.util.concurrent.TimeoutException: Did not observe any item or terminal signal within 10000ms in ‘source(MonoDefer)’ (and no fallback has been configured)
at reactor.core.publisher.FluxTimeout$TimeoutMainSubscriber.handleTimeout(FluxTimeout.java:295) ~[reactor-core-3.4.16.jar!/:3.4.16]
at reactor.core.publisher.FluxTimeout$TimeoutMainSubscriber.doTimeout(FluxTimeout.java:280) ~[reactor-core-3.4.16.jar!/:3.4.16]

It looks like the SDK cannot connect to hostname:18093.

Can I assume you’ve changed the real hostname to “hostname” in this log for security purposes?

the application starts normally and connects to the couchbase db on port 18091.

Note the Cluster.connect() call is async, so it will always return instantly and isn’t any indication of a successful connection.

Yeah, hostname is substituted with the actual hostname.

Okay you mean we will have to check if the port 18093 is also available to connect (probably firewal settings)

Yes that’s right, check if you can reach 18093.

It looks like the SDK has been able to fetch a cluster config so it does have a route to KV (port 11207 usually, for TLS connections). But the config has then pointed at node hostname running query (port 18093), that it cannot connect to.

The SDK Doctor | Couchbase Docs might be of help too (though will probably just confirm the networking problem).