Cluster disconnected automatically after open bucket


I am developing a java program that have to communicate with CB server.
Firstly, i built a new project with NetBeans and use Java SDK to connect CB server perfectly.
Secondly, i move all source code and Java SDK from NetBeans to a existing project that built with JBoss. After the first build and run, i saw a warning i have not seen that before in NetBeans. Then it create cluster normally but the connection was disconnected after open a bucket.

My code

cluster = CouchbaseCluster.create("my_ip");
bucket = cluster.openBucket("my_bucket");

Print out

14:46:27,101 INFO  [STDOUT] [INFO ] 3074 2015-04-27|<clinit>:Line 91):Your platform does not provide complete low-level API for accessing direct buffers reliably. Unless explicitly requested, heap buffer will always be preferred to avoid potential system unstability.

14:46:27,273 INFO  [STDOUT] [INFO ] 3246 2015-04-27 14:46:27273_com.couchbase.client.core.CouchbaseCore@(|<init>:Line 141):CoreEnvironment: {sslEnabled=false, sslKeystoreFile='null', sslKeystorePassword='null', queryEnabled=false, queryPort=8093, bootstrapHttpEnabled=true, bootstrapCarrierEnabled=true, bootstrapHttpDirectPort=8091, bootstrapHttpSslPort=18091, bootstrapCarrierDirectPort=11210, bootstrapCarrierSslPort=11207, ioPoolSize=4, computationPoolSize=4, responseBufferSize=16384, requestBufferSize=16384, kvServiceEndpoints=1, viewServiceEndpoints=1, queryServiceEndpoints=1, ioPool=NioEventLoopGroup, coreScheduler=CoreScheduler, eventBus=DefaultEventBus, packageNameAndVersion=couchbase-java-client/2.1.1 (git: 2.1.1), dcpEnabled=false, retryStrategy=BestEffort, maxRequestLifetime=75000, retryDelay=com.couchbase.client.core.time.ExponentialDelay@1a2782f7, reconnectDelay=com.couchbase.client.core.time.ExponentialDelay@1807338b, observeIntervalDelay=com.couchbase.client.core.time.ExponentialDelay@c8f700, keepAliveInterval=30000, autoreleaseAfter=2000}

14:46:28,867 INFO  [STDOUT] [INFO ] 4840 2015-04-27       14:46:28867_com.couchbase.client.core.node.CouchbaseNode$1@(|call:Line 121):Connected to Node HIM-IMAC

14:46:29,308 INFO  [STDOUT] [INFO ] 5281 2015-04-27 14:46:29308_com.couchbase.client.core.config.DefaultConfigurationProvider$6@(|call:Line 264):Opened bucket test_db_MOD

14:46:29,323 INFO  [STDOUT] [INFO ] 5296 2015-04-27 14:46:29323_com.couchbase.client.core.node.CouchbaseNode$1@(|call:Line 131):Disconnected from Node HIM-IMAC

Line 1 is the warning message i mentioned.
Line 2 is config
Line 3 Cluster connected
Line 4 Bucket Opened
Line 5 Cluster disconnected

I guess that warning message is the reason but i don’t know how to fix it.
Thanks for help

Can you please retry with the released 2.1.2 version and see if it fixes your issue? We had a regression in 2.1.1 that was addressed there. If not, let us know here and we’ll check further.

1 Like