Uploaded image for project: 'Couchbase Java Client'
  1. Couchbase Java Client
  2. JCBC-218

CLONE - Client constructor blocks or deadlocks

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.0.2
    • Fix Version/s: 1.1.3
    • Component/s: Core
    • Security Level: Public
    • Labels:
      None
    • 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?

      No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

        Hide
        seand88 sean diamond added a comment -

        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.

        Show
        seand88 sean diamond added a comment - 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.
        Hide
        ingenthr Matt Ingenthron added a comment -

        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.

        Show
        ingenthr Matt Ingenthron added a comment - 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.
        Hide
        seand88 sean diamond added a comment -

        just updated to client version 1.1.1 and it has the same problem.

        Show
        seand88 sean diamond added a comment - just updated to client version 1.1.1 and it has the same problem.
        Hide
        daschl Michael Nitschinger added a comment -

        moving to 1.1.2 for more investigation.

        Show
        daschl Michael Nitschinger added a comment - moving to 1.1.2 for more investigation.
        Hide
        seand88 sean diamond added a comment - - edited

        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.

        Show
        seand88 sean diamond added a comment - - edited 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.
        Hide
        daschl Michael Nitschinger added a comment -

        Ok so I'm closing this. Thanks for updating us!

        Show
        daschl Michael Nitschinger added a comment - Ok so I'm closing this. Thanks for updating us!

          People

          • Assignee:
            daschl Michael Nitschinger
            Reporter:
            seand88 sean diamond
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes