You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by Rahul <ra...@incture.com> on 2015/06/20 07:22:09 UTC
Zookeeper error: Cannot open channel to X at election address
I have installed zookeeper in 3 different aws servers. The following is the configuration in all the servers
tickTime=2000
initLimit=10
syncLimit=5
dataDir=/var/zookeeper
clientPort=2181
server.1=x.x.x.x:2888:3888
server.2=x.x.x.x:2888:3888
server.3=x.x.x.x:2888:3888
All the three instance have a myid file at var/zookeeper with appropriate id in it. All the three servers have all ports open from the aws console. But when I run the zookeeper server, I get the following error in all the instances.
All the three instance have a myid file at var/zookeeper with appropriate id in it. All the three servers have all ports open from the aws console. But when I run the zookeeper server, I get the following error in all the instances.
2015-06-19 12:09:22,989 [myid:1] - WARN [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:QuorumCnxManager@382]
- Cannot open channel to 2 at election address /x.x.x.x:3888
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:368)
at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectAll(QuorumCnxManager.java:402)
at org.apache.zookeeper.server.quorum.FastLeaderElection.lookForLeader(FastLeaderElection.java:840)
at org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:762)
2015-06-19 12:09:23,170 [myid:1] - WARN [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:QuorumCnxManager@382]
- Cannot open channel to 3 at election address /x.x.x.x:3888
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:368)
at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectAll(QuorumCnxManager.java:402)
at org.apache.zookeeper.server.quorum.FastLeaderElection.lookForLeader(FastLeaderElection.java:840)
at org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:762)
2015-06-19 12:09:23,170 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:FastLeaderElection@849] - Notification time out: 25600
—
Rahul
Re: Zookeeper error: Cannot open channel to X at election
address
Posted by Rahul <ra...@incture.com>.
Hi Raúl,
I tried the command you suggested and I am not getting any response. I tried the same command for the port 2181 and that is bound to zookeeper, this was the result for port 2181
tcp6 0 0 :::2181 :::* LISTEN 0 63007 6778/java
Does this means zookeeper is not bound to the port 3888? The only place where I have mentioned port 3888 is in the config file at server.1=x.x.x.x:2888:3888. Should I make other configuration changes?
--
Rahul J
Technical Lead
Incture
On June 22, 2015 at 5:56:56 AM, Raúl Gutiérrez Segalés (rgs@itevenworks.net) wrote:
HI Rahul,
are you sure all servers are actually binding port 3888 on the right
interface (or on 0.0.0.0) and not on the loopback (127.0.0.1)? What does
netstat -apentu | grep -i listen | grep 3888 say?
-rgs
On 19 June 2015 at 22:22, Rahul <ra...@incture.com> wrote:
> I have installed zookeeper in 3 different aws servers. The following is
> the configuration in all the servers
>
> tickTime=2000
> initLimit=10
> syncLimit=5
> dataDir=/var/zookeeper
> clientPort=2181
> server.1=x.x.x.x:2888:3888
> server.2=x.x.x.x:2888:3888
> server.3=x.x.x.x:2888:3888
> All the three instance have a myid file at var/zookeeper with appropriate
> id in it. All the three servers have all ports open from the aws console.
> But when I run the zookeeper server, I get the following error in all the
> instances.
>
>
> All the three instance have a myid file at var/zookeeper with appropriate
> id in it. All the three servers have all ports open from the aws console.
> But when I run the zookeeper server, I get the following error in all the
> instances.
>
> 2015-06-19 12:09:22,989 [myid:1] - WARN
> [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:QuorumCnxManager@382]
> - Cannot open channel to 2 at election address /x.x.x.x:3888
> java.net.ConnectException: Connection refused
> at java.net.PlainSocketImpl.socketConnect(Native Method)
> at
> java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
> at
> java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
> at
> java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
> at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
> at java.net.Socket.connect(Socket.java:579)
> at
> org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:368)
> at
> org.apache.zookeeper.server.quorum.QuorumCnxManager.connectAll(QuorumCnxManager.java:402)
> at
> org.apache.zookeeper.server.quorum.FastLeaderElection.lookForLeader(FastLeaderElection.java:840)
> at org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:762)
> 2015-06-19 12:09:23,170 [myid:1] - WARN
> [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:QuorumCnxManager@382]
> - Cannot open channel to 3 at election address /x.x.x.x:3888
> java.net.ConnectException: Connection refused
> at java.net.PlainSocketImpl.socketConnect(Native Method)
> at
> java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
> at
> java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
> at
> java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
> at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
> at java.net.Socket.connect(Socket.java:579)
> at
> org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:368)
> at
> org.apache.zookeeper.server.quorum.QuorumCnxManager.connectAll(QuorumCnxManager.java:402)
> at
> org.apache.zookeeper.server.quorum.FastLeaderElection.lookForLeader(FastLeaderElection.java:840)
> at org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:762)
> 2015-06-19 12:09:23,170 [myid:1] - INFO
> [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:FastLeaderElection@849] -
> Notification time out: 25600
> —
> Rahul
Re: Zookeeper error: Cannot open channel to X at election address
Posted by Raúl Gutiérrez Segalés <rg...@itevenworks.net>.
HI Rahul,
are you sure all servers are actually binding port 3888 on the right
interface (or on 0.0.0.0) and not on the loopback (127.0.0.1)? What does
netstat -apentu | grep -i listen | grep 3888 say?
-rgs
On 19 June 2015 at 22:22, Rahul <ra...@incture.com> wrote:
> I have installed zookeeper in 3 different aws servers. The following is
> the configuration in all the servers
>
> tickTime=2000
> initLimit=10
> syncLimit=5
> dataDir=/var/zookeeper
> clientPort=2181
> server.1=x.x.x.x:2888:3888
> server.2=x.x.x.x:2888:3888
> server.3=x.x.x.x:2888:3888
> All the three instance have a myid file at var/zookeeper with appropriate
> id in it. All the three servers have all ports open from the aws console.
> But when I run the zookeeper server, I get the following error in all the
> instances.
>
>
> All the three instance have a myid file at var/zookeeper with appropriate
> id in it. All the three servers have all ports open from the aws console.
> But when I run the zookeeper server, I get the following error in all the
> instances.
>
> 2015-06-19 12:09:22,989 [myid:1] - WARN
> [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:QuorumCnxManager@382]
> - Cannot open channel to 2 at election address /x.x.x.x:3888
> java.net.ConnectException: Connection refused
> at java.net.PlainSocketImpl.socketConnect(Native Method)
> at
> java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
> at
> java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
> at
> java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
> at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
> at java.net.Socket.connect(Socket.java:579)
> at
> org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:368)
> at
> org.apache.zookeeper.server.quorum.QuorumCnxManager.connectAll(QuorumCnxManager.java:402)
> at
> org.apache.zookeeper.server.quorum.FastLeaderElection.lookForLeader(FastLeaderElection.java:840)
> at org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:762)
> 2015-06-19 12:09:23,170 [myid:1] - WARN
> [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:QuorumCnxManager@382]
> - Cannot open channel to 3 at election address /x.x.x.x:3888
> java.net.ConnectException: Connection refused
> at java.net.PlainSocketImpl.socketConnect(Native Method)
> at
> java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
> at
> java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
> at
> java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
> at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
> at java.net.Socket.connect(Socket.java:579)
> at
> org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:368)
> at
> org.apache.zookeeper.server.quorum.QuorumCnxManager.connectAll(QuorumCnxManager.java:402)
> at
> org.apache.zookeeper.server.quorum.FastLeaderElection.lookForLeader(FastLeaderElection.java:840)
> at org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:762)
> 2015-06-19 12:09:23,170 [myid:1] - INFO
> [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:FastLeaderElection@849] -
> Notification time out: 25600
> —
> Rahul