Errors happen from time to time in a Cloud environment, Couchbase nodes come and go. When a Couchbase Pod is restarted on Kubernetes, the Elasticsearch Connector running on Kubernetes may not be able to access the bootstrap nodes (or any for that matter) when their IP changed.
Details:
Elasticsearch Conenctor uses Kubernetes internal DNS to access Couchbase nodes, namely couchbase-0.couchbase.production.svc.omega
, couchbase-1.couchbase.production.svc.omega
, and so on.
[couchbase]
hosts = ['couchbase-0.couchbase-server.production.svc.omega', 'couchbase-1.couchbase-server.production.svc.omega', 'couchbase-2.couchbase-server.production.svc.omega', 'couchbase-3.couchbase-server.production.svc.omega']
When an IP of such a node changes, the Java DCP client will not attempt to resolve the IP address again. In the Couchbase Client library for Java, we force DNS resolution with the following flag: com.couchbase.forceDnsLookupOnReconnect = "true"
It is crucial to have something similar for the DCP Java Client. If there is, we could not find it so far.
Thanks for the help!