Java DCP client could not reconnect to Couchbase hosted on Docker Container
Description
We are using Couchbase Docker image both to develop on laptop and on our DEV and QA environment.
We are developing on Mac OS and our DEV and QA environment work with OpenShift v3.7.1 (Kubernetes v1.7.6).
On preproduction and production environment, Couchbase is deployed on VM.
When using Java DCP client 0.17.0 or older version hosted in Docker, Java DCP client always failed to reconnect to Couchbase container once we restart the container.
When using Java DCP client 0.17.0 or older version hosted on a VM (or directly on laptop), Java DCP client always reconnect to Couchbase container once we restart Couchbase.
Step to reproduce
This issue occur both with Couchbase 4.6.5 and Couchbase 5.1.0 (and probably all others versions)
Init the Couchbase server and install the sample bucket "travel-sample"
Run the exemple described in the Readme on GitHub https://github.com/couchbase/java-dcp-client after increasing the sleep timeout to several minutes (see Main.java in attachement)
Make a mutation on a document in "travel-sample" bucket though the Couchbase administrator interface
The mutation is printed by the java program
Stop your Couchbase Docker container
Start your Couchbase Docker container few second later
Make a mutation on a document in travel-sample bucket though the Couchbase administrator interface
The mutation is not printed by the java program
When doing the same test without Couchbase on Docker container, step 9 print the mutation.
Thanks,
Environment
Couchbase Docker image on MacOS and Couchbase Docker image on Openshift platform
Can you please create a new Jira issue? In the issue description, please include as much information as possible about how to reproduce the issue.
Please also be aware that the Java DCP client is not an officially supported Couchbase product (although the Couchbase connectors that use it are supported).
Thanks, David
PRABU NARAYANAN May 11, 2022 at 6:23 PM
Hi Team i am still facing issue...if DCP client not reconnecting to Couchbase db and not receiving any mutation
Configuration
Java : JDK 11
DCP client version : 0.40.0
Couchbase version : 6
David Nault September 28, 2018 at 10:38 PM
ConnectInterceptingHandler is indeed the culprit. Netty is deactivating the channel before the handshake completes (or even begins, really). In this case, the original connect promise is left unfulfilled.
The fix is to respond to channel deactivation by failing the connect promise.
Fixed
Pinned fields
Click on the next to a field label to start pinning.
We are using Couchbase Docker image both to develop on laptop and on our DEV and QA environment.
We are developing on Mac OS and our DEV and QA environment work with OpenShift v3.7.1 (Kubernetes v1.7.6).
On preproduction and production environment, Couchbase is deployed on VM.
When using Java DCP client 0.17.0 or older version hosted in Docker, Java DCP client always failed to reconnect to Couchbase container once we restart the container.
When using Java DCP client 0.17.0 or older version hosted on a VM (or directly on laptop), Java DCP client always reconnect to Couchbase container once we restart Couchbase.
Step to reproduce
This issue occur both with Couchbase 4.6.5 and Couchbase 5.1.0 (and probably all others versions)
Run Couchbase in Docker container as described in configuration (https://developer.couchbase.com/documentation/server/current/install/getting-started-docker.html)
Init the Couchbase server and install the sample bucket "travel-sample"
Run the exemple described in the Readme on GitHub https://github.com/couchbase/java-dcp-client after increasing the sleep timeout to several minutes (see Main.java in attachement)
Make a mutation on a document in "travel-sample" bucket though the Couchbase administrator interface
The mutation is printed by the java program
Stop your Couchbase Docker container
Start your Couchbase Docker container few second later
Make a mutation on a document in travel-sample bucket though the Couchbase administrator interface
The mutation is not printed by the java program
When doing the same test without Couchbase on Docker container, step 9 print the mutation.
Thanks,