zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From penguin <barry.barn...@wellsfargo.com>
Subject RE: New Zookeeper Installation - connection refused
Date Wed, 25 Feb 2015 13:54:22 GMT
Doesn’t appear to be any type of firewall rule or DNS name resolution after several tests.
 Let me ask this..

I unzipped/tar’d the 3.4.6 version of Zookeeper on our machines, created the zoo.cfg file
and the myid file for each ZK server (myid just has a 1, 2 or 3 in it, depending on the Server
instance).  I created the data directory where I stored the myid file as well.

Is there something missing in the steps I’ve taken?  When I start up all instances (3),
the first instance carrys the zookeeper.out log file, whereas the other two instances don’t
seem to throw any information to their zookeeper.out files (is this normal?).



From: Flavio Junqueira-2 [via zookeeper-user] [mailto:ml-node+s578899n7580878h66@n2.nabble.com]
Sent: Tuesday, February 24, 2015 6:53 PM
To: Barnett, Barry F
Subject: Re: New Zookeeper Installation - connection refused

It's hard to say what the problem is without more information. For leader election, the servers
will try to create a TCP connection with each other, so if you have tested separately and
your sample code worked for the same ports, the only thing I can think of is that there is
a problem with the server name resolution. Is it possible that the ZK servers aren't resolving
the names of your servers appropriately?

Perhaps you could also use tcpdump or some similar tool to inspect the network traffic. In
fact, I think someone here has written a tool to inspect the leader election traffic and display
it. Was it Raul?


> On 24 Feb 2015, at 16:31, penguin <[hidden email]</user/SendEmail.jtp?type=node&node=7580878&i=0>>
> Ok, I have tried various setups (5 and 3 ZK Server instances), and neither work, both
receiving the ‘connection refused’ error.
> I’m now at the 3 ZK ensemble, 1 ZK server instance per physical machine.
> Myid file is set to 1,2 and 3 respectively on the machines.
> Zoo.cfg has the following, and uses 2181 as its client port:
> server.1=servername:2888:3888
> server.2=servername:2888:3888
> server.3=servername:2888:3888
> Interestingly enough, when I start up the server1 instance, the zookeeper.out file receives
ongoing information on the connection refused to each server instance.  When I start up the
servers on machines 2 and 3, those zookeeper.out files do not receive any information.  Is
that normal?
> In any case, I’ve checked the ports by using nc –v hostname port, and connections
are successful.  So this is not a firewall issue or port block issue.  I’ve had my OSE’s
check the servers as well to ensure no communications issue.
> *Note, port 2181 is an eForward port.  Is this supposed to be used by Zookeeper?
> Same errors over and over:
> 2015-02-24 09:38:00,601 [myid:1] - INFO  [QuorumPeer[myid=1]/]
> 2015-02-24 09:38:00,603 [myid:1] - INFO  [QuorumPeer[myid=1]/]
- New e
> lection. My id =  1, proposed zxid=0x0
> 2015-02-24 09:38:00,605 [myid:1] - INFO  [WorkerReceiver[myid=1]:FastLeaderElection@597]
- Notification:
> 1 (message format version), 1 (n.leader), 0x0 (n.zxid), 0x1 (n.round), LOOKING (n.state),
1 (n.sid), 0x0
> (n.peerEpoch) LOOKING (my state)
> 2015-02-24 09:38:00,608 [myid:1] - WARN  [WorkerSender[myid=1]:QuorumCnxManager@382]
- Cannot open channe
> l to 2 at election address servername: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)
> Regards,
> Barry
> From: Flavio Junqueira-2 [via zookeeper-user] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=7580878&i=1>
<mailto:[hidden email]</user/SendEmail.jtp?type=node&node=7580878&i=2>>]
> Sent: Wednesday, February 04, 2015 4:17 PM
> To: Barnett, Barry F
> Subject: Re: New Zookeeper Installation - connection refused
> That's because some client is trying to connect to the server, but the server is looking
(not following or leading) and the result of the nc run confirms it. I think you still have
a connectivity problem. There is something preventing the servers from connecting to each
other and it seems to be something related to your environment.
> -Flavio
>> On 04 Feb 2015, at 17:51, penguin <[hidden email]</user/SendEmail.jtp?type=node&node=7580844&i=0>>
>> I now made this a 3 server ensemble as opposed to a 5 server ensemble.  Now getting
different messages in my out logs:P
>> 2015-02-04 11:48:29,851 [myid:1] - WARN  [NIOServerCxn.Factory:]
- Exception causing close of session 0x0 due to java.io.IOException: ZooKeeperServer not running
>> 2015-02-04 11:48:29,851 [myid:1] - INFO  [NIOServerCxn.Factory:]
- Closed socket connection for client /xxxxxxxx:64089 (no session established for client)
>> $ ./zkServer.sh status
>> JMX enabled by default
>> Using config: /opt/apps/current/bin/../conf/zoo.cfg
>> Error contacting service. It is probably not running.
>> $ echo mntr | nc localhost 2181
>> This ZooKeeper instance is not currently serving requests
>> Regards,
>> Barry
>> From: "Jürgen Wagner (DVT)" [via zookeeper-user] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=7580844&i=1>]
>> Sent: Wednesday, February 04, 2015 10:56 AM
>> To: Barnett, Barry F
>> Subject: Re: New Zookeeper Installation - connection refused
>> Barry,
>> looks like you want to go to the machine where Zk is running and check
>> with "netstat -an" or some other tool on which port Zk is really
>> running... unless this is a NAT issue ;-)
>> Cheers,
>> --Jürgen
>> On 04.02.2015 16:51, penguin wrote:
>>> $ nc -v remotehostname 2181
>>> nc: connect to remotehostname port 2181 (tcp) failed: Connection refused
>>> Regards,
>>> Barry
>> ________________________________
>> If you reply to this email, your message will be added to the discussion below:
>> http://zookeeper-user.578899.n2.nabble.com/New-Zookeeper-Installation-connection-refused-tp7580825p7580838.html
>> To unsubscribe from New Zookeeper Installation - connection refused, click here<
>> NAML<http://zookeeper-user.578899.n2.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>> --
>> View this message in context: http://zookeeper-user.578899.n2.nabble.com/New-Zookeeper-Installation-connection-refused-tp7580825p7580840.html
>> Sent from the zookeeper-user mailing list archive at Nabble.com.
> ________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://zookeeper-user.578899.n2.nabble.com/New-Zookeeper-Installation-connection-refused-tp7580825p7580844.html
> To unsubscribe from New Zookeeper Installation - connection refused, click here< href=""
target="_top" rel="nofollow" link="external">
> NAML<http://zookeeper-user.578899.n2.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> --
> View this message in context: http://zookeeper-user.578899.n2.nabble.com/New-Zookeeper-Installation-connection-refused-tp7580825p7580875.html
> Sent from the zookeeper-user mailing list archive at Nabble.com <http://nabble.com/>.

If you reply to this email, your message will be added to the discussion below:
To unsubscribe from New Zookeeper Installation - connection refused, click here<http://zookeeper-user.578899.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=7580825&code=YmFycnkuYmFybmV0dEB3ZWxsc2ZhcmdvLmNvbXw3NTgwODI1fC0xNDYzMjU3NTMx>.

View this message in context: http://zookeeper-user.578899.n2.nabble.com/New-Zookeeper-Installation-connection-refused-tp7580825p7580879.html
Sent from the zookeeper-user mailing list archive at Nabble.com.
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message