You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Kerem Yazici (JIRA)" <ji...@apache.org> on 2016/07/19 14:59:20 UTC

[jira] [Comment Edited] (ZOOKEEPER-2480) Exhibitor and zookeeper, Cannot open channel to x at election address

    [ https://issues.apache.org/jira/browse/ZOOKEEPER-2480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15384284#comment-15384284 ] 

Kerem Yazici edited comment on ZOOKEEPER-2480 at 7/19/16 2:58 PM:
------------------------------------------------------------------

so I've took the code that opens a connection from the zookeeper source code and executed on our servers.

From server 2 to 3 which are on the same data centre, we don't see any issues.
{code:title=SocketMain.java}
Opening channel to server
All good: server3.dns.name/23.175.15.52:4882
{code}

but from server 2 to 1 which are on a different data centre, we get the bellow exception.

{code:title=SocketMain.java}
Cannot open channel to at election address server1.dns.name/192.168.4.4:4882=>java.net.ConnectException: Connection refused
{code}

I don't think this is really a zookeeper bug but I appreciate any pointers.

By the way, I don't get this issue if I use the same code to connect to one of our application servers on a different port.



was (Author: keremyzc):
so I've took the code that opens a connection from the zookeeper source code and executed on our servers.

From server 2 to 3 which are on the same data centre, we don't see any issues.
{code:title=SocketMain.java}
Opening channel to server
All good: server3.dns.name/23.175.15.52:4882
{code}

but from server 2 to 1 which are on a different data centre, we get the bellow exception.

{code:title=SocketMain.java}
Cannot open channel to at election address server1.dns.name/192.168.4.4:4882=>java.net.ConnectException: Connection refused
{code}

I don't think this is really a zookeeper bug but I appreciate any pointers.


> Exhibitor and zookeeper, Cannot open channel to x at election address
> ---------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-2480
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2480
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: quorum
>    Affects Versions: 3.4.8
>            Reporter: Kerem Yazici
>            Priority: Minor
>
> We have 5 node ensemble setup in our tst environment and we are seeing the error below on two of the nodes. We have 3 nodes on the first data centre and 2 nodes on the second data centre and all of them are managed by exhbitor.
> The problem is that the nodes from the same data centres cannot talk to the leader node on the same data centre but can talk to the other nodes without any issue. 
> If I bounce the leader node to force another node to get elected then the other nodes that are on the same data centre start throwing the below exception.
> I'm sure the problem is with the dns name resolution but I would like to understand how zookeeper resolves these dns names and what might be the issue here so I can go back to our unix team and get this fixed.
> {code}
> 2016-07-19 10:48:54,711 [myid:4] - WARN  [WorkerSender[myid=4]:QuorumCnxManager@400] - Cannot open channel to 5 at election address server1.dns.name/192.168.1.3:4882
> java.net.ConnectException: Connection refused
>         at java.net.PlainSocketImpl.socketConnect(Native Method)
>         at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
>         at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
>         at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
>         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
>         at java.net.Socket.connect(Socket.java:589)
>         at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:381)
>         at org.apache.zookeeper.server.quorum.QuorumCnxManager.toSend(QuorumCnxManager.java:354)
>         at org.apache.zookeeper.server.quorum.FastLeaderElection$Messenger$WorkerSender.process(Fast       LeaderElection.java:452)
>         at org.apache.zookeeper.server.quorum.FastLeaderElection$Messenger$WorkerSender.run(FastLead       erElection.java:433)
>         at java.lang.Thread.run(Thread.java:745)
> {code}
> {code:title=zoo.cfg|borderStyle=solid}
> #Auto-generated by Exhibitor - Fri Jul 15 11:30:52 BST 2016
> #Fri Jul 15 11:30:52 BST 2016
> server.2=server2.dns.name\:4881\:4882\:observer
> autopurge.purgeInterval=4
> server.1=server1.dns.name\:4881\:4882
> initLimit=50
> syncLimit=2
> clientPort=4880
> tickTime=2001
> server.5=server5.dns.name\:4881\:4882
> dataDir=/opt/app/datafabric/data/zookeeper
> server.4=server4.dns.name\:4881\:4882
> dataLogDir=/path/to/datalogdir
> server.3=server3.dns.name\:4881\:4882
> ~
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)