-1

I am trying to connect to Accumulo instance hosted on a remote Centos Virtual Box on a Windows host.

String instanceName="accumulo"
String zooservers = "ip:2181" //ip is the public ip of the Windows host system not the virtual box
ZooKeeperInstance inst = new ZooKeeperInstance(instanceName, zooServers);
Connector conn = inst.getConnector("user", new PasswordToken("pass"));

I am not adding the code written further as I don't get the conn instance and am unable to proceed further from here.

1 Answer 1

0

Is ZooKeeper actually running on the Windows host and not the Centos VM?

Assuming that you have everything running inside the VM, you would want to provide the hostname of your VM and not of the host machine. Using localhost:2181 is probably a safe bet instead of your ip:2181.

7
  • Hadoop , Zookeeper and Accumulo are running on the Centos VM on a Windows Machine A. I am trying to connect to it through my app from a Windows machine B, thats why I am using ip:2181
    – sashmi
    May 5, 2015 at 3:46
  • You could try saving the ip of windows machine A in the hosts file of windows machine B.
    – Vaibhav
    May 5, 2015 at 7:07
  • Is your VM actually set up to do pass through from the host to the guest? Vaibhav is probably right -- this sounds like a networking issue. Unless you forward ports from the VM to the host, you can use the host's address to access the guest.
    – elserj
    May 5, 2015 at 21:08
  • Vaibhav, I added the ip of the remote host in the hosts file of my machine. But that didnt help either Elserj, port forwarding is enabled from VM to host.
    – sashmi
    May 6, 2015 at 3:08
  • What ports did you actually forward? You'd need at least 2181, 9997 and 9999, 8020 most likely. You might want to look at host-only networking
    – elserj
    May 6, 2015 at 16:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.