Details
-
Bug
-
Resolution: Won't Do
-
Major
-
None
-
2.3.0
-
None
-
Java SDK Client 2.3.0
Description
Problem
clusterManager.Info() consistently returns a timeout exception when one of the cluster nodes is down but not yet failed over.
Request
The method should return the information on the healthy nodes if at least one of the healthy nodes is in the client bootstrap list. Some Key/Value requests (to other nodes) by comparison still succeed when the cluster is in this state
Steps to Reproduce
- Create a test directory and make it the current working directory
- Get the latest Couchbase Java SDK:
wget http://packages.couchbase.com/clients/java/2.3.0/Couchbase-Java-Client-2.3.0.zip
- Unzip the file
- Change directory to ./Couchbase-Java-Client-2.3.0
- Copy the attached App.java to this location
- Edit App.java to include the required IP addresses for the Couchbase cluster
- Compile and run with the following:
javac -cp couchbase-java-client-2.3.0.jar:rxjava-1.1.5.jar:couchbase-core-io-1.3.0.jar: App.java
java -cp .:couchbase-java-client-2.3.0.jar:rxjava-1.1.5.jar:couchbase-core-io-1.3.0.jar: App
Note the timeout exception if one of the nodes is down (and not yet failed over). The expectation is that the call would return info on the available nodes if one of the bootstrap nodes is available.
Error:
Exception in thread "main" java.lang.RuntimeException: com.couchbase.client.deps.io.netty.channel.ConnectTimeoutException: connection timed out: /10.93.44.37:8091
at com.couchbase.client.java.util.Blocking.blockForSingle(Blocking.java:82)
at com.couchbase.client.java.cluster.DefaultClusterManager.info(DefaultClusterManager.java:56)
at com.couchbase.client.java.cluster.DefaultClusterManager.info(DefaultClusterManager.java:51)
at x.y.ConnectionTester.main(ConnectionTester.java:15)
Caused by: com.couchbase.client.deps.io.netty.channel.ConnectTimeoutException: connection timed out: /10.93.44.37:8091
at com.couchbase.client.deps.io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe$1.run(AbstractNioChannel.java:220)
at com.couchbase.client.deps.io.netty.util.concurrent.PromiseTask$RunnableAdapter.call(PromiseTask.java:38)
at com.couchbase.client.deps.io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:120)
at com.couchbase.client.deps.io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:358)
at com.couchbase.client.deps.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:374)
at com.couchbase.client.deps.io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)
at com.couchbase.client.deps.io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)
at java.lang.Thread.run(Thread.java:745)