Description
Problem
bucketManager.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 bucket if at least one of the healthy nodes is in the client bootstrap list.
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.2/Couchbase-Java-Client-2.3.2.zip
Unzip the file
Change directory to ./Couchbase-Java-Client-2.3.2
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.2.jar:rxjava-1.1.8.jar:couchbase-core-io-1.3.2.jar: App.java
java -cp .:couchbase-java-client-2.3.2.jar:rxjava-1.1.8.jar:couchbase-core-io-1.3.2.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 bucket if one of the bootstrap nodes is available.
Exception in thread "main" java.lang.RuntimeException: com.couchbase.client.deps.io.netty.channel.ConnectTimeoutException: connection timed out: /10.111.150.102:8091
at com.couchbase.client.java.util.Blocking.blockForSingle(Blocking.java:82)
at com.couchbase.client.java.bucket.DefaultBucketManager.info(DefaultBucketManager.java:122)
at App.main(App.java:45)
Caused by: com.couchbase.client.deps.io.netty.channel.ConnectTimeoutException: connection timed out: /10.111.150.102:8091
at com.couchbase.client.deps.io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe$1.run(AbstractNioChannel.java:216)
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:408)
at com.couchbase.client.deps.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:402)
at com.couchbase.client.deps.io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:140)
at com.couchbase.client.deps.io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)
at java.lang.Thread.run(Thread.java:745)
Attachments
For Gerrit Dashboard: JCBC-999 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
71897,2 | JCBC-999: Redispatch config messages if failed. | master | couchbase-java-client | Status: MERGED | +2 | +1 |
71967,2 | JCBC-999: Redispatch config messages if failed. | release23 | couchbase-java-client | Status: MERGED | +2 | +1 |