I tried the 3.5.0 alpha build to see if it made any difference. It did not.
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: version="[3.2,4)" I suggest that if you want to name the JAR "3.50-alpha" that all the internals just use a version of 3.50. Chris IBM Tivoli Systems Research Triangle Park, NC (919) 224-2240 Internet: [email protected] From: Chris Barlock/Raleigh/IBM@IBMUS To: [email protected] 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 0.8.2.1 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 < MAX_ZK_CONNECT_ATTEMPTS) { try { Thread.sleep(ZK_CONNECT_WAIT); } catch (InterruptedException e) { // Ignore } connectAttempts++; } } 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 "localhost:2181" Chris
