Question

I'm using the MiniAccumuloCluster (MAC) 1.5 jar and attempting to even just instantiate a MAC object but can't seem to connect to it. I get a ton of errors akin to the following:

13/07/08 14:31:29 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:14060
13/07/08 14:31:29 WARN zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:692)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1143)

And ending with the following error:

Exception in thread "main" java.lang.RuntimeException: Failed to connect to zookeeper (localhost:14060) within 2x zookeeper timeout period 30000
at org.apache.accumulo.fate.zookeeper.ZooSession.connect(ZooSession.java:96)
at org.apache.accumulo.fate.zookeeper.ZooSession.getSession(ZooSession.java:146)
at org.apache.accumulo.fate.zookeeper.ZooReader.getSession(ZooReader.java:36)
at org.apache.accumulo.fate.zookeeper.ZooReader.getZooKeeper(ZooReader.java:40)
at org.apache.accumulo.fate.zookeeper.ZooCache.getZooKeeper(ZooCache.java:56)
at org.apache.accumulo.fate.zookeeper.ZooCache.retry(ZooCache.java:127)
at org.apache.accumulo.fate.zookeeper.ZooCache.get(ZooCache.java:233)
at org.apache.accumulo.fate.zookeeper.ZooCache.get(ZooCache.java:188)
at org.apache.accumulo.core.client.ZooKeeperInstance.getInstanceID(ZooKeeperInstance.java:143)
at org.apache.accumulo.core.client.ZooKeeperInstance.<init>(ZooKeeperInstance.java:104)
at org.apache.accumulo.core.client.ZooKeeperInstance.<init>(ZooKeeperInstance.java:85)
at Accumulo.Accumulo.connectToMiniCluster(Accumulo.java:454)
at Accumulo.Accumulo.<init>(Accumulo.java:140)
at Accumulo.FrontEnd.main(FrontEnd.java:56)

Accumulo.Accumulo.connectoToMiniCluster (line 454) is:

Instance inst = new ZooKeeperInstance(mac.getInstanceName(), mac.getZooKeepers());

Any suggestions? The Internet is wildly lacking documentation for a lot of the Accumulo framework, including MAC.

Was it helpful?

Solution 2

It turns out that I was missing a handful of JAR libraries and I discerned this by looking through the JUnit TemporaryFolder log files. After downloading all the appropriate libraries I resolved my issue.

Download all the dependency jars to get any java code that works with accumulo from here: http://mvnrepository.com/artifact/org.apache.accumulo/accumulo-core/1.5.0 and that should fix be a good starting point for addressing accumulo java code.

OTHER TIPS

Did you start your MiniAccumuloCluster instance before attempting to instantiate the ZooKeeperInstance?

Make sure you call mac.start().

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top