Sorry in advance for the data dump here. I have two servers with Zookeeper. I want to run them as an ensemble. Here is what in my zoo.cfg for both.
tickTime=2000
initLimit=10
syncLimit=5
dataDir=/opt/zookeeper/data
server.1=solr1:2888:3888
server.2=solr2:2888:3888
clientPort=2181
Both servers have a myid file. Their names are in the / etc / hosts files, so they can definitely see each other. When I launch any of them using zkServer.sh, it says that zookeeper is running. However, when I run "zkServer.sh status", I see this message:
Using config: /opt/zookeeper/bin/../conf/zoo.cfg
Error contacting service. It is probably not running.
But the zookeeper java process seems to work, and using netstat shows the tcp ports 3888 and 2181 as listening. When I try to connect to the server using "sh zkCli.sh -server localhost: 2181", I see a bunch of environmental information, and then a whole bunch of these log entries:
2014-02-03 15:39:00,623 [myid:] - INFO [main-SendThread(localhost.localdomain:2181):ClientCnxn$SendThread@966] - Opening socket connection to server localhost.localdomain/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
2014-02-03 15:39:00,646 [myid:] - INFO [main-SendThread(localhost.localdomain:2181):ClientCnxn$SendThread@849] - Socket connection established to localhost.localdomain/127.0.0.1:2181, initiating session
JLine support is enable
2014-02-03 15:39:00,662 [myid:] - INFO [main-SendThread(localhost.localdomain:2181):ClientCnxn$SendThread@1085] - Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect
(sh zkCli.sh -server solr1: 2181), :
2014-02-03 15:40:42,390 [myid:] - WARN [main-SendThread(solr1:2181):ClientCnxn$SendThread@1089] - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.NoRouteToHostException: No route to host
Zookeeper, , , zkServer.sh, . - ? - RHEL 6.4, 64 .