Connecting Druid node to remote zookeeper

I’m trying to set up my first production druid cluster using AWS and have a zookeeper ensemble running, trying to start the coordinator node and getting the following error:

2016-01-21T18:04:33,198 INFO [main-SendThread(localhost:2181)] org.apache.zookeeper.ClientCnxn - Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)

2016-01-21T18:04:33,198 WARN [main-SendThread(localhost:2181)] org.apache.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) ~[?:1.7.0_91]

at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:744) ~[?:1.7.0_91]

at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361) ~[zookeeper-3.4.6.jar:3.4.6-1569965]

at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081) [zookeeper-3.4.6.jar:3.4.6-1569965]

It looks like its trying to connect to a local zookeeper as opposed to the ensemble paths as listed in my common.runtime.properties

Zookeeper

druid.zk.service.host=“zk1.example.com”,“zk2.example.com”,“zk3.example.com” //anonomyized domain name

Any clue what im missing?

You don’t need the quotes, so try doing just:

druid.zk.service.host=zk1.example.com,zk2.example.com,zk3.example.com

If that doesn’t work, then your Druid nodes are probably not reading the common.runtime.properties. Make sure that a directory containing it is on the classpath.

That did it! Appreciate the help. Now I just have to figure out the rest of my problems.

Hi

I wanna to know that is historical process get coordinator IP from zookeeper in a cluster?

In my cluster all nodes cant find Master server IP and use 127.0.0.1 for them.

This is my problem: https://groups.google.com/forum/#!msg/druid-user/iWmn1o42y_E/N0PQ7w5tBwAJ

Can you help to troubleshoot my cluster?

Hi,

Can you check these paths in your Zookeeper {druid.zk.paths.coordinatorPath}/_COORDINATOR or {druid.zk.paths.base}/_COORDINATOR.
You can find the value for druid.zk.paths.base in your common.runtime.properties.

Thanks,

Sashi

Thank you.

My problem solved. :slight_smile: This is my first druid installation and I have just one zookeeper running on Master server.

I started zookeeper on all nodes and the error gone.