zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Barlock <barl...@us.ibm.com>
Subject Re: ZooKeeper Class Will Not Connect
Date Fri, 24 Jul 2015 01:33:45 GMT
I tried the 3.5.0 alpha build to see if it made any difference.  It did 

But, I had to hack the MANIFEST.MF file in the JAR because the 
"3.50-alpha" version fails tests in OSGi bundles that import the ZK 
classes which have something like:


I suggest that if you want to name the JAR "3.50-alpha" that all the 
internals just use a version of 3.50.


IBM Tivoli Systems
Research Triangle Park, NC
(919) 224-2240
Internet:  barlock@us.ibm.com

From:   Chris Barlock/Raleigh/IBM@IBMUS
To:     user@zookeeper.apache.org
Date:   07/23/2015 01:37 PM
Subject:        ZooKeeper Class Will Not Connect

We are attempting to upgrade from Kafka 0.8.0, which includes ZK 3.3.4 to 
Kafka with ZK 3.4.6.  My code which attempts to connect to ZK is 
pretty straightforward:

            try {
                ZooKeeper zk = new ZooKeeper(connectString, sessionTimeout
, this);
                int connectAttempts = 0;

                while (!zk.getState().isConnected() && connectAttempts < 
                    try {
                    } catch (InterruptedException e) {
                        // Ignore
            } catch (IOException e) {
                trace.exception(CLASS_NAME, methodName, e);

With some additional tracing, States is always CONNECTING.  Has something 
changed with 3.4.6 about how I should connect to the server?  I can 
connect just fine with the zookeeper-shell.sh that Kafka ships.  This code 

always runs on the same system as ZK, so the connectString is always 


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message