Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Zookeeper >> mail # user >> Cannot Open Channel at Election Address


Copy link to this message
-
Cannot Open Channel at Election Address
Hi All,

I tried to set up a multi-server cluster in two machines, following the
instructions on the website.
I set up 5 servers (named 1~5) in two machines. The configuration is as
follows.

tickTime=2000
initLimit=10
syncLimit=5
clientPort=2181
dataDir=/var/zookeeper/1

server.1=testing.machine1:2900:3900
server.2=testing.machine1:2901:3901
server.3=testing.machine1:2902:3902
server.4=testing.machine2:2903:3903
server.5=testing.machine2:2904:3904
When I set up the cluster, there was a problem in all the five servers.
2012-10-05 17:51:43,555 [myid:1] - WARN
[QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:QuorumCnxManager@368] - Cannot
open channel to 2 at election address testing.machine1/192.168.0.101:3901
java.net.ConnectException: Connection refused
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at
java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:327)
    at
java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:193)
    at
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:180)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384)
    at java.net.Socket.connect(Socket.java:546)
    at
org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:354)
    at
org.apache.zookeeper.server.quorum.QuorumCnxManager.connectAll(QuorumCnxManager.java:388)
    at
org.apache.zookeeper.server.quorum.FastLeaderElection.lookForLeader(FastLeaderElection.java:765)
    at
org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:716)
2012-10-05 17:51:43,556 [myid:1] - WARN
[QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:QuorumCnxManager@368] - Cannot
open channel to 3 at election address testing.machine1/192.168.0.101:3902
java.net.ConnectException: Connection refused
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at
java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:327)
    at
java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:193)
    at
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:180)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384)
    at java.net.Socket.connect(Socket.java:546)
    at
org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:354)
    at
org.apache.zookeeper.server.quorum.QuorumCnxManager.connectAll(QuorumCnxManager.java:388)
    at
org.apache.zookeeper.server.quorum.FastLeaderElection.lookForLeader(FastLeaderElection.java:765)
    at
org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:716)
2012-10-05 17:51:43,557 [myid:1] - INFO
[QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:QuorumCnxManager@190] - Have
smaller server identifier, so dropping the connection: (4, 1)
2012-10-05 17:51:43,558 [myid:1] - INFO
[QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:FastLeaderElection@774] -
Notification time out: 60000
I tried in zookeeper-3.3.6 and zookeeper-3.4.4, and got the same problem.
Could anyone help me?

Thanks
Frank