[JCBC-218] CLONE - Client constructor blocks or deadlocks Created: 23/Jan/13  Updated: 27/Feb/13  Resolved: 27/Feb/13

Status: Resolved
Project: Couchbase Java Client
Component/s: Core
Affects Version/s: 1.0.2
Fix Version/s: 1.1.3
Security Level: Public

Type: Bug Priority: Major
Reporter: sean diamond Assignee: Michael Nitschinger
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment: OS: Windows 7 64bit
JDK: 1.6.0_31 also 1.6.0_33 64 bit
Couchbase enterprise edition running on 3 nodes all Ubuntu 10.04 64bit server (VMware images)


 Description   
I am evaluating the couchbase product and hit a brick wall immediately when running through the simple hello world example.

I have a 3 node cluster running couchbase enterprise 1.8.2 on ubuntu 10.04 64 bit VMware images. All three are running in VMWare player instances on Windows 7 64bit.

When I try to run the Main example on Windows 7 using Java6 (64 bit) the code blocks somewhere in the Client constructor. The result is the logging below.


2012-06-14 14:07:46.313 INFO com.couchbase.client.CouchbaseConnection: Added {QA sa=/192.168.186.150:11210, #Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=0} to connect queue
2012-06-14 14:07:46.316 INFO com.couchbase.client.CouchbaseConnection: Added {QA sa=/192.168.186.151:11210, #Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=0} to connect queue
2012-06-14 14:07:46.319 INFO com.couchbase.client.CouchbaseConnection: Added {QA sa=/192.168.186.152:11210, #Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=0} to connect queue
2012-06-14 14:07:59.843 INFO com.couchbase.client.CouchbaseConnection: Connection state changed for sun.nio.ch.SelectionKeyImpl@24a4e2e3
2012-06-14 14:08:52.983 INFO com.couchbase.client.CouchbaseConnection: Connection state changed for sun.nio.ch.SelectionKeyImpl@21ec6696
2012-06-14 14:08:52.987 INFO com.couchbase.client.CouchbaseConnection: Connection state changed for sun.nio.ch.SelectionKeyImpl@27431340

I have also tried debugging but the code blocks in the constructor at

client = new CouchbaseClient(uris, "default", "");

The program never completes.

This works fine in a Linux environment with the following output received

2012-06-14 04:58:50.693 INFO com.couchbase.client.CouchbaseConnection: Added {QA sa=/192.168.186.150:11210, #Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=0} to connect queue
2012-06-14 04:58:50.703 INFO com.couchbase.client.CouchbaseConnection: Added {QA sa=/192.168.186.151:11210, #Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=0} to connect queue
2012-06-14 04:58:50.708 INFO com.couchbase.client.CouchbaseConnection: Added {QA sa=/192.168.186.152:11210, #Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=0} to connect queue
2012-06-14 04:58:50.830 INFO com.couchbase.client.CouchbaseConnection: Connection state changed for sun.nio.ch.SelectionKeyImpl@1bc74f37
2012-06-14 04:58:50.834 INFO com.couchbase.client.CouchbaseConnection: Connection state changed for sun.nio.ch.SelectionKeyImpl@3a21b220
2012-06-14 04:58:50.843 INFO com.couchbase.client.CouchbaseConnection: Connection state changed for sun.nio.ch.SelectionKeyImpl@732b3d53
2012-06-14 04:58:51.135 INFO com.couchbase.client.CouchbaseConnection: Shut down Couchbase client
Set Succeeded
Synchronous Get failed
Asynchronous Get Succeeded: Hello World!

Is there a JDK for windows 7 or a configuration setting that can be used to prevent this?

 Comments   
Comment by sean diamond [ 23/Jan/13 ]
I am having this exact same issue with couchbase 2.0 community edition, and the latest java client 1.1

Only workaround is to not use the client on windows. If i connect to couchbase via linux with the same setup it works fine.
Deadlocking on windows during the constructor.
Comment by Matt Ingenthron [ 23/Jan/13 ]
Can you confirm you see this with 1.1.1? We just released it in the last 12 hours, and there was a fix in the ctor area.
Comment by sean diamond [ 23/Jan/13 ]
just updated to client version 1.1.1 and it has the same problem.
Comment by Michael Nitschinger [ 31/Jan/13 ]
moving to 1.1.2 for more investigation.
Comment by sean diamond [ 26/Feb/13 ]
I was able to figure out was was going on and fortunately it doesn't look like this is due to the couchbase client!

I am using avast antivirus which is appearing to forward the port.
Resolution can be found here in this post for a similar issue someone was having due to port forwarding.
Similar to this post here http://forum.avast.com/index.php?topic=95134.0

I am assuming the original poster of this issue is also using some kind of antivirus that may be messing with the port couchbase is trying to connect on.

Thanks for looking into this anyway.
Comment by Michael Nitschinger [ 27/Feb/13 ]
Ok so I'm closing this. Thanks for updating us!
Generated at Fri Sep 19 18:19:54 CDT 2014 using JIRA 5.2.4#845-sha1:c9f4cc41abe72fb236945343a1f485c2c844dac9.