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)

  1. Run Couchbase in Docker container as described in configuration (https://developer.couchbase.com/documentation/server/current/install/getting-started-docker.html) 

  2. Init the Couchbase server and install the sample bucket "travel-sample"

  3. 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)

  4. Make a mutation on a document in "travel-sample" bucket though the Couchbase administrator interface

  5. The mutation is printed by the java program

  6. Stop your Couchbase Docker container

  7. Start your Couchbase Docker container few second later 

  8. Make a mutation on a document in travel-sample bucket though the Couchbase administrator interface

  9. 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

Gerrit Reviews

None

Release Notes Description

None

Attachments

1

Activity

PRABU NARAYANAN May 12, 2022 at 12:44 PM
Edited

  I know you guys found root cause of the issue DCP client not reconnecting this issue creating so many issue in production.

 

Could you please do i need to do any settings 

PRABU NARAYANAN May 11, 2022 at 7:09 PM

David Nault May 11, 2022 at 6:29 PM

Hi  ,

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.

Details

Assignee

Reporter

Story Points

Fix versions

Affects versions

Priority

Instabug

Open Instabug

PagerDuty

Sentry

Zendesk Support

Created June 29, 2018 at 3:02 PM
Updated August 31, 2024 at 11:03 AM
Resolved October 9, 2018 at 6:42 PM
Instabug