>>>>>> Any idea why does it try to connect to localhost on port 2181, since i >>>>>> have specified a different port as a client port?
Zookeeper has a default client port of 2181. You can connect to the server as follows $./zkCli.sh -server zk1:ClientPort Between what is the status of the zookeeper servers, whether they have started successfully? -Rakesh -----Original Message----- From: michael.boom [mailto:[email protected]] Sent: 20 November 2013 18:55 To: [email protected] Subject: Re: From standalone ZK instance to 3 instances Thanks German, I had a look and gave it a try on a test system. But I get into a problem: config server1 and 2 are the same: tickTime=2000 initLimit=10 syncLimit=5 dataDir=/data/zookeeper clientPort=9983 server.1=zk1:2888:3888 server.2=zk2:2888:2888 Both instances are stopped, then i started zk1 like this: ./zkServer.sh start zoo.cfg in zkCli i found following error: /opt/zookeeper/bin$ ./zkCli.sh Connecting to localhost:2181 2013-11-20 14:23:55,956 [myid:] - INFO [main:Environment@100] - Client environment:zookeeper.version=3.4.5-1392090, built on 09/30/2012 17:52 GMT 2013-11-20 14:23:55,962 [myid:] - INFO [main:Environment@100] - Client environment:host.name=solr1.productdb.internal 2013-11-20 14:23:55,963 [myid:] - INFO [main:Environment@100] - Client environment:java.version=1.7.0_25 2013-11-20 14:23:55,964 [myid:] - INFO [main:Environment@100] - Client environment:java.vendor=Oracle Corporation 2013-11-20 14:23:55,965 [myid:] - INFO [main:Environment@100] - Client environment:java.home=/usr/lib/jvm/java-7-openjdk-amd64/jre 2013-11-20 14:23:55,965 [myid:] - INFO [main:Environment@100] - Client environment:java.class.path=/opt/zookeeper/bin/../build/classes:/opt/zookeeper/bin/../build/lib/*.jar:/opt/zookeeper/bin/../lib/slf4j-log4j12-1.6.1.jar:/opt/zookeeper/bin/../lib/slf4j-api-1.6.1.jar:/opt/zookeeper/bin/../lib/netty-3.2.2.Final.jar:/opt/zookeeper/bin/../lib/log4j-1.2.15.jar:/opt/zookeeper/bin/../lib/jline-0.9.94.jar:/opt/zookeeper/bin/../zookeeper-3.4.5.jar:/opt/zookeeper/bin/../src/java/lib/*.jar:/opt/zookeeper/bin/../conf: 2013-11-20 14:23:55,966 [myid:] - INFO [main:Environment@100] - Client environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib/jni:/lib:/usr/lib 2013-11-20 14:23:55,967 [myid:] - INFO [main:Environment@100] - Client environment:java.io.tmpdir=/tmp 2013-11-20 14:23:55,968 [myid:] - INFO [main:Environment@100] - Client environment:java.compiler=<NA> 2013-11-20 14:23:55,968 [myid:] - INFO [main:Environment@100] - Client environment:os.name=Linux 2013-11-20 14:23:55,969 [myid:] - INFO [main:Environment@100] - Client environment:os.arch=amd64 2013-11-20 14:23:55,970 [myid:] - INFO [main:Environment@100] - Client environment:os.version=3.2.0-4-amd64 2013-11-20 14:23:55,970 [myid:] - INFO [main:Environment@100] - Client environment:user.name=solr 2013-11-20 14:23:55,971 [myid:] - INFO [main:Environment@100] - Client environment:user.home=/home/solr 2013-11-20 14:23:55,972 [myid:] - INFO [main:Environment@100] - Client environment:user.dir=/opt/zookeeper/bin 2013-11-20 14:23:55,974 [myid:] - INFO [main:ZooKeeper@438] - Initiating client connection, connectString=localhost:2181 sessionTimeout=30000 watcher=org.apache.zookeeper.ZooKeeperMain$MyWatcher@36bc7722 Welcome to ZooKeeper! 2013-11-20 14:23:56,018 [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) JLine support is enabled 2013-11-20 14:23:56,029 [myid:] - WARN [main-SendThread(localhost.localdomain:2181):ClientCnxn$SendThread@1089] - 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:708) at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:350) at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1068) Any idea why does it try to connect to localhost on port 2181, since i have specified a different port as a client port? Thanks! -- View this message in context: http://zookeeper-user.578899.n2.nabble.com/From-standalone-ZK-instance-to-3-instances-tp7579325p7579336.html Sent from the zookeeper-user mailing list archive at Nabble.com.
