You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by penguin <ba...@wellsfargo.com> on 2015/02/03 19:46:30 UTC

New Zookeeper Installation - connection refused

I have installed an instance of Zookeeper (v3.4.6) on 5 different servers
(Linux).  I have created my zoo.cfg file and listed the servers as follows:

server.1=hostname1:2888:3888
server.2=hostname2:2889:3889
server.3=hostname3:2890:3890
server.4=hostname4:2891:3891
server.5=hostname5:2892:3892

I have put this on each server in the conf directory.

When I startup the server on each using zkServer.sh start, and I look in
zookeeper.out, I see that zookeeper tries to connect, but the connection is
refused for each attempt to connect to any of the servers.

When I issue zkServer.sh status:
$ ./zkServer.sh status
JMX enabled by default
Using config: /opt/apps/current/bin/../conf/zoo.cfg
Error contacting service. It is probably not running.

This happens on all 5 servers.  Any idea what I'm missing.  I also have my
myid file for each, starting with '1' on the first, '2' on the second,
etc...






--
View this message in context: http://zookeeper-user.578899.n2.nabble.com/New-Zookeeper-Installation-connection-refused-tp7580825.html
Sent from the zookeeper-user mailing list archive at Nabble.com.

RE: New Zookeeper Installation - connection refused

Posted by penguin <ba...@wellsfargo.com>.
I don't have the leader serves parm set in my zoo.cfg. Do I need that? I also put the myid file in the zk home data directory I created. Is there something I may have missed?



Regards,

Barry Barnett
Enterprise Queuing Services | QS4U
Cell: 803-207-7452


-----Original Message-----
From: Flavio Junqueira-2 [via zookeeper-user] [ml-node+s578899n7580844h12@n2.nabble.com<ma...@n2.nabble.com>]
Sent: Wednesday, February 04, 2015 03:17 PM Central Standard Time
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>> wrote:
>
> 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:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@362] - 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:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1007] - 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<http://zookeeper-user.578899.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=7580825&code=YmFycnkuYmFybmV0dEB3ZWxsc2ZhcmdvLmNvbXw3NTgwODI1fC0xNDYzMjU3NTMx>.
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-tp7580825p7580845.html
Sent from the zookeeper-user mailing list archive at Nabble.com.

RE: New Zookeeper Installation - connection refused

Posted by penguin <ba...@wellsfargo.com>.
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?).

Regards,

Barry

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?

-Flavio

> On 24 Feb 2015, at 16:31, penguin <[hidden email]</user/SendEmail.jtp?type=node&node=7580878&i=0>> wrote:
>
> 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]/0.0.0.0:2181:QuorumPeer@714] - LOOKING
> 2015-02-24 09:38:00,603 [myid:1] - INFO  [QuorumPeer[myid=1]/0.0.0.0:2181:FastLeaderElection@815] - 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>> wrote:
>>
>> 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:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@362] - 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:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1007] - 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 <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 <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 <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 <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:
http://zookeeper-user.578899.n2.nabble.com/New-Zookeeper-Installation-connection-refused-tp7580825p7580878.html
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>.
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.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-tp7580825p7580880.html
Sent from the zookeeper-user mailing list archive at Nabble.com.

RE: New Zookeeper Installation - connection refused

Posted by penguin <ba...@wellsfargo.com>.
If I use the same zoo.cfg file that I use for the instances running on the same physical machine, for the remote physical machines zk servers, they fail with connection refused.  All these machines are in the same network, no firewalls between, no ports blocked.  Very confusing.

Regards,

Barry

From: Michi Mutsuzaki [via zookeeper-user] [mailto:ml-node+s578899n7580914h82@n2.nabble.com]
Sent: Friday, March 13, 2015 2:56 AM
To: Barnett, Barry F
Subject: Re: New Zookeeper Installation - connection refused

Hi Barry,

You don't need to use different client ports if you are running
ZooKeeper servers on separate machines.

On Thu, Mar 12, 2015 at 4:45 AM, penguin <[hidden email]</user/SendEmail.jtp?type=node&node=7580914&i=0>> wrote:

> Ok, the client port change worked for my connection refused issue with instances on the same server.  I now have 2 followers and 1 leader.  So I've determined that zk can run 3 instances on the same physical machine with no connection issues.  I was getting the same connection refused error when I had 3 separate machines running 1 instance of zk on each, trying to instantiate an ensemble.  Should I still have different client ports in that scenario?  I had the same client ports and it was failing miserably.  I am not familiar with zkconf, but I will look at it.
>
> Regards,
>
> Barry
>
> From: Michi Mutsuzaki [via zookeeper-user] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=7580914&i=1>]
> Sent: Thursday, March 12, 2015 1:26 AM
> To: Barnett, Barry F
> Subject: Re: New Zookeeper Installation - connection refused
>
> Yes that's even better :)
>
> On Wed, Mar 11, 2015 at 10:22 PM, Patrick Hunt <[hidden email]</user/SendEmail.jtp?type=node&node=7580909&i=0>> wrote:
>
>> Consider zkconf? https://github.com/phunt/zkconf
>>
>> Patrick
>>
>> On Wed, Mar 11, 2015 at 10:21 PM, Michi Mutsuzaki <[hidden email]</user/SendEmail.jtp?type=node&node=7580909&i=1>> wrote:
>>> The clientPort parameter needs to be different for each instance if
>>> you are running them on a same box. Something like this should work:
>>>
>>> https://paste.apache.org/n59c?action=download
>>>
>>> On Wed, Mar 11, 2015 at 8:02 AM, penguin <[hidden email]</user/SendEmail.jtp?type=node&node=7580909&i=2>> wrote:
>>>> Ok, I have setup my ZooKeeper ensemble on the same server.  I have 3 ZK instances setup on the same physical machine, so no need to worry about whether multiple physical machines can communicate from one to the other, right?
>>>> My setup on the Linux sever is as follows:
>>>>
>>>> Directory for instance 1: /home/zk1
>>>> Directory for instance 2: /home/zk2
>>>> Directory for instance 3: /home/zk3
>>>>
>>>> In my conf directory, I have my zoo.cfg file for each (replace zk1 with zk2, zk3 for the other instances):
>>>> # The number of milliseconds of each tick
>>>> tickTime=2000
>>>> # The number of ticks that the initial
>>>> # synchronization phase can take
>>>> initLimit=10
>>>> # The number of ticks that can pass between
>>>> # sending a request and getting an acknowledgement
>>>> syncLimit=5
>>>> # the directory where the snapshot is stored.
>>>> # do not use /tmp for storage, /tmp here is just
>>>> # example sakes.
>>>> dataDir=/home/zk1/zookeeper-3.4.6/data
>>>> dataLogDir=/home/zk1/zookeeper-3.4.6/data
>>>> # the port at which the clients will connect
>>>> clientPort=2181
>>>> # the maximum number of client connections.
>>>> maxClientCnxns=60
>>>> #
>>>> # Be sure to read the maintenance section of the
>>>> # administrator guide before turning on autopurge.
>>>> #
>>>> # http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
>>>> #
>>>> # The number of snapshots to retain in dataDir
>>>> #autopurge.snapRetainCount=3
>>>> # Purge task interval in hours
>>>> # Set to "0" to disable auto purge feature
>>>> #autopurge.purgeInterval=1
>>>> server.6=localhost:2888:3888
>>>> server.7=localhost:2889:3889
>>>> server.8=localhost:2890:3890
>>>>
>>>> the myid files are 6, 7 and 8 respectively for each instance.  Is there something I'm missing because I'm still getting the connection refused warning, and the status of the zk servers doesn't show anything but an error.
>>>>
>>>> Zookeeper.out shows:
>>>> 2015-03-11 08:59:22,238 [myid:6] - WARN  [WorkerSender[myid=6]:QuorumCnxManager@38
>>>> 2] - Cannot open channel to 8 at election address localhost/127.0.0.1:3890
>>>> 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(AbstractPlainSocketIm
>>>> pl.java:200)
>>>>         at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:1
>>>> 82)
>>>>         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
>>>>         at java.net.Socket.connect(Socket.java:579)
>>>>
>>>> zkServer.sh status shows:
>>>>
>>>> $ ./zkServer.sh status
>>>> JMX enabled by default
>>>> Using config: /opt/apps/zk1/zookeeper-3.4.6/bin/../conf/zoo.cfg
>>>> Error contacting service. It is probably not running.
>>>> $ ./zkServer.sh start
>>>> JMX enabled by default
>>>> Using config: /opt/apps/zk1/zookeeper-3.4.6/bin/../conf/zoo.cfg
>>>> Starting zookeeper ... already running as process 27102.
>>>>
>>>> Regards,
>>>>
>>>> Barry
>>>>
>>>> From: Flavio Junqueira-2 [via zookeeper-user] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=7580909&i=3>]
>>>> 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?
>>>>
>>>> -Flavio
>>>>
>>>>> On 24 Feb 2015, at 16:31, penguin <[hidden email]</user/SendEmail.jtp?type=node&node=7580878&i=0>> wrote:
>>>>>
>>>>> 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]/0.0.0.0:2181:QuorumPeer@714] - LOOKING
>>>>> 2015-02-24 09:38:00,603 [myid:1] - INFO  [QuorumPeer[myid=1]/0.0.0.0:2181:FastLeaderElection@815] - 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<mailto:[hidden%20email]%3c/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>> wrote:
>>>>>>
>>>>>> 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:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@362] - 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:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1007] - 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 <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 <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 <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 <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:
>>>> http://zookeeper-user.578899.n2.nabble.com/New-Zookeeper-Installation-connection-refused-tp7580825p7580878.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.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-tp7580825p7580904.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-tp7580825p7580909.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.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-tp7580825p7580912.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-tp7580825p7580914.html
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>.
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.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-tp7580825p7580921.html
Sent from the zookeeper-user mailing list archive at Nabble.com.

RE: New Zookeeper Installation - connection refused

Posted by penguin <ba...@wellsfargo.com>.
Ok, I tried 2888 for my client port, 3181 and 4181 for my other ports (Quorom, etc), and I just setup 2 instances, 1 on each physical machine.  I get the ‘connection refused’ error again.  Nothing is using any of the ports.  When I do a netstat –a|grep 2888 on the first instance, it shows the port has a listen on it now that I started up that instance, which is good.  When I do the same on the 2nd instance, I get nothing (odd right?).  In any case, I get the connection refused with the 1rst instance trying to connect to the second on port 4181, and neither show up in my netstat command as being used.

Regards,

Barry


From: Michi Mutsuzaki [via zookeeper-user] [mailto:ml-node+s578899n7580914h82@n2.nabble.com]
Sent: Friday, March 13, 2015 2:56 AM
To: Barnett, Barry F
Subject: Re: New Zookeeper Installation - connection refused

Hi Barry,

You don't need to use different client ports if you are running
ZooKeeper servers on separate machines.

On Thu, Mar 12, 2015 at 4:45 AM, penguin <[hidden email]</user/SendEmail.jtp?type=node&node=7580914&i=0>> wrote:

> Ok, the client port change worked for my connection refused issue with instances on the same server.  I now have 2 followers and 1 leader.  So I've determined that zk can run 3 instances on the same physical machine with no connection issues.  I was getting the same connection refused error when I had 3 separate machines running 1 instance of zk on each, trying to instantiate an ensemble.  Should I still have different client ports in that scenario?  I had the same client ports and it was failing miserably.  I am not familiar with zkconf, but I will look at it.
>
> Regards,
>
> Barry
>
> From: Michi Mutsuzaki [via zookeeper-user] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=7580914&i=1>]
> Sent: Thursday, March 12, 2015 1:26 AM
> To: Barnett, Barry F
> Subject: Re: New Zookeeper Installation - connection refused
>
> Yes that's even better :)
>
> On Wed, Mar 11, 2015 at 10:22 PM, Patrick Hunt <[hidden email]</user/SendEmail.jtp?type=node&node=7580909&i=0>> wrote:
>
>> Consider zkconf? https://github.com/phunt/zkconf
>>
>> Patrick
>>
>> On Wed, Mar 11, 2015 at 10:21 PM, Michi Mutsuzaki <[hidden email]</user/SendEmail.jtp?type=node&node=7580909&i=1>> wrote:
>>> The clientPort parameter needs to be different for each instance if
>>> you are running them on a same box. Something like this should work:
>>>
>>> https://paste.apache.org/n59c?action=download
>>>
>>> On Wed, Mar 11, 2015 at 8:02 AM, penguin <[hidden email]</user/SendEmail.jtp?type=node&node=7580909&i=2>> wrote:
>>>> Ok, I have setup my ZooKeeper ensemble on the same server.  I have 3 ZK instances setup on the same physical machine, so no need to worry about whether multiple physical machines can communicate from one to the other, right?
>>>> My setup on the Linux sever is as follows:
>>>>
>>>> Directory for instance 1: /home/zk1
>>>> Directory for instance 2: /home/zk2
>>>> Directory for instance 3: /home/zk3
>>>>
>>>> In my conf directory, I have my zoo.cfg file for each (replace zk1 with zk2, zk3 for the other instances):
>>>> # The number of milliseconds of each tick
>>>> tickTime=2000
>>>> # The number of ticks that the initial
>>>> # synchronization phase can take
>>>> initLimit=10
>>>> # The number of ticks that can pass between
>>>> # sending a request and getting an acknowledgement
>>>> syncLimit=5
>>>> # the directory where the snapshot is stored.
>>>> # do not use /tmp for storage, /tmp here is just
>>>> # example sakes.
>>>> dataDir=/home/zk1/zookeeper-3.4.6/data
>>>> dataLogDir=/home/zk1/zookeeper-3.4.6/data
>>>> # the port at which the clients will connect
>>>> clientPort=2181
>>>> # the maximum number of client connections.
>>>> maxClientCnxns=60
>>>> #
>>>> # Be sure to read the maintenance section of the
>>>> # administrator guide before turning on autopurge.
>>>> #
>>>> # http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
>>>> #
>>>> # The number of snapshots to retain in dataDir
>>>> #autopurge.snapRetainCount=3
>>>> # Purge task interval in hours
>>>> # Set to "0" to disable auto purge feature
>>>> #autopurge.purgeInterval=1
>>>> server.6=localhost:2888:3888
>>>> server.7=localhost:2889:3889
>>>> server.8=localhost:2890:3890
>>>>
>>>> the myid files are 6, 7 and 8 respectively for each instance.  Is there something I'm missing because I'm still getting the connection refused warning, and the status of the zk servers doesn't show anything but an error.
>>>>
>>>> Zookeeper.out shows:
>>>> 2015-03-11 08:59:22,238 [myid:6] - WARN  [WorkerSender[myid=6]:QuorumCnxManager@38
>>>> 2] - Cannot open channel to 8 at election address localhost/127.0.0.1:3890
>>>> 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(AbstractPlainSocketIm
>>>> pl.java:200)
>>>>         at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:1
>>>> 82)
>>>>         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
>>>>         at java.net.Socket.connect(Socket.java:579)
>>>>
>>>> zkServer.sh status shows:
>>>>
>>>> $ ./zkServer.sh status
>>>> JMX enabled by default
>>>> Using config: /opt/apps/zk1/zookeeper-3.4.6/bin/../conf/zoo.cfg
>>>> Error contacting service. It is probably not running.
>>>> $ ./zkServer.sh start
>>>> JMX enabled by default
>>>> Using config: /opt/apps/zk1/zookeeper-3.4.6/bin/../conf/zoo.cfg
>>>> Starting zookeeper ... already running as process 27102.
>>>>
>>>> Regards,
>>>>
>>>> Barry
>>>>
>>>> From: Flavio Junqueira-2 [via zookeeper-user] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=7580909&i=3>]
>>>> 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?
>>>>
>>>> -Flavio
>>>>
>>>>> On 24 Feb 2015, at 16:31, penguin <[hidden email]</user/SendEmail.jtp?type=node&node=7580878&i=0>> wrote:
>>>>>
>>>>> 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]/0.0.0.0:2181:QuorumPeer@714] - LOOKING
>>>>> 2015-02-24 09:38:00,603 [myid:1] - INFO  [QuorumPeer[myid=1]/0.0.0.0:2181:FastLeaderElection@815] - 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<mailto:[hidden%20email]%3c/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>> wrote:
>>>>>>
>>>>>> 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:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@362] - 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:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1007] - 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 <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 <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 <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 <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:
>>>> http://zookeeper-user.578899.n2.nabble.com/New-Zookeeper-Installation-connection-refused-tp7580825p7580878.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.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-tp7580825p7580904.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-tp7580825p7580909.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.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-tp7580825p7580912.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-tp7580825p7580914.html
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>.
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.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-tp7580825p7580915.html
Sent from the zookeeper-user mailing list archive at Nabble.com.

Re: New Zookeeper Installation - connection refused

Posted by Michi Mutsuzaki <mi...@cs.stanford.edu>.
Hi Barry,

You don't need to use different client ports if you are running
ZooKeeper servers on separate machines.

On Thu, Mar 12, 2015 at 4:45 AM, penguin <ba...@wellsfargo.com> wrote:
> Ok, the client port change worked for my connection refused issue with instances on the same server.  I now have 2 followers and 1 leader.  So I've determined that zk can run 3 instances on the same physical machine with no connection issues.  I was getting the same connection refused error when I had 3 separate machines running 1 instance of zk on each, trying to instantiate an ensemble.  Should I still have different client ports in that scenario?  I had the same client ports and it was failing miserably.  I am not familiar with zkconf, but I will look at it.
>
> Regards,
>
> Barry
>
> From: Michi Mutsuzaki [via zookeeper-user] [mailto:ml-node+s578899n7580909h27@n2.nabble.com]
> Sent: Thursday, March 12, 2015 1:26 AM
> To: Barnett, Barry F
> Subject: Re: New Zookeeper Installation - connection refused
>
> Yes that's even better :)
>
> On Wed, Mar 11, 2015 at 10:22 PM, Patrick Hunt <[hidden email]</user/SendEmail.jtp?type=node&node=7580909&i=0>> wrote:
>
>> Consider zkconf? https://github.com/phunt/zkconf
>>
>> Patrick
>>
>> On Wed, Mar 11, 2015 at 10:21 PM, Michi Mutsuzaki <[hidden email]</user/SendEmail.jtp?type=node&node=7580909&i=1>> wrote:
>>> The clientPort parameter needs to be different for each instance if
>>> you are running them on a same box. Something like this should work:
>>>
>>> https://paste.apache.org/n59c?action=download
>>>
>>> On Wed, Mar 11, 2015 at 8:02 AM, penguin <[hidden email]</user/SendEmail.jtp?type=node&node=7580909&i=2>> wrote:
>>>> Ok, I have setup my ZooKeeper ensemble on the same server.  I have 3 ZK instances setup on the same physical machine, so no need to worry about whether multiple physical machines can communicate from one to the other, right?
>>>> My setup on the Linux sever is as follows:
>>>>
>>>> Directory for instance 1: /home/zk1
>>>> Directory for instance 2: /home/zk2
>>>> Directory for instance 3: /home/zk3
>>>>
>>>> In my conf directory, I have my zoo.cfg file for each (replace zk1 with zk2, zk3 for the other instances):
>>>> # The number of milliseconds of each tick
>>>> tickTime=2000
>>>> # The number of ticks that the initial
>>>> # synchronization phase can take
>>>> initLimit=10
>>>> # The number of ticks that can pass between
>>>> # sending a request and getting an acknowledgement
>>>> syncLimit=5
>>>> # the directory where the snapshot is stored.
>>>> # do not use /tmp for storage, /tmp here is just
>>>> # example sakes.
>>>> dataDir=/home/zk1/zookeeper-3.4.6/data
>>>> dataLogDir=/home/zk1/zookeeper-3.4.6/data
>>>> # the port at which the clients will connect
>>>> clientPort=2181
>>>> # the maximum number of client connections.
>>>> maxClientCnxns=60
>>>> #
>>>> # Be sure to read the maintenance section of the
>>>> # administrator guide before turning on autopurge.
>>>> #
>>>> # http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
>>>> #
>>>> # The number of snapshots to retain in dataDir
>>>> #autopurge.snapRetainCount=3
>>>> # Purge task interval in hours
>>>> # Set to "0" to disable auto purge feature
>>>> #autopurge.purgeInterval=1
>>>> server.6=localhost:2888:3888
>>>> server.7=localhost:2889:3889
>>>> server.8=localhost:2890:3890
>>>>
>>>> the myid files are 6, 7 and 8 respectively for each instance.  Is there something I'm missing because I'm still getting the connection refused warning, and the status of the zk servers doesn't show anything but an error.
>>>>
>>>> Zookeeper.out shows:
>>>> 2015-03-11 08:59:22,238 [myid:6] - WARN  [WorkerSender[myid=6]:QuorumCnxManager@38
>>>> 2] - Cannot open channel to 8 at election address localhost/127.0.0.1:3890
>>>> 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(AbstractPlainSocketIm
>>>> pl.java:200)
>>>>         at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:1
>>>> 82)
>>>>         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
>>>>         at java.net.Socket.connect(Socket.java:579)
>>>>
>>>> zkServer.sh status shows:
>>>>
>>>> $ ./zkServer.sh status
>>>> JMX enabled by default
>>>> Using config: /opt/apps/zk1/zookeeper-3.4.6/bin/../conf/zoo.cfg
>>>> Error contacting service. It is probably not running.
>>>> $ ./zkServer.sh start
>>>> JMX enabled by default
>>>> Using config: /opt/apps/zk1/zookeeper-3.4.6/bin/../conf/zoo.cfg
>>>> Starting zookeeper ... already running as process 27102.
>>>>
>>>> Regards,
>>>>
>>>> Barry
>>>>
>>>> From: Flavio Junqueira-2 [via zookeeper-user] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=7580909&i=3>]
>>>> 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?
>>>>
>>>> -Flavio
>>>>
>>>>> On 24 Feb 2015, at 16:31, penguin <[hidden email]</user/SendEmail.jtp?type=node&node=7580878&i=0>> wrote:
>>>>>
>>>>> 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]/0.0.0.0:2181:QuorumPeer@714] - LOOKING
>>>>> 2015-02-24 09:38:00,603 [myid:1] - INFO  [QuorumPeer[myid=1]/0.0.0.0:2181:FastLeaderElection@815] - 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>> wrote:
>>>>>>
>>>>>> 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:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@362] - 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:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1007] - 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 <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 <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 <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 <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:
>>>> http://zookeeper-user.578899.n2.nabble.com/New-Zookeeper-Installation-connection-refused-tp7580825p7580878.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.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-tp7580825p7580904.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-tp7580825p7580909.html
> 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>.
> 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.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-tp7580825p7580912.html
> Sent from the zookeeper-user mailing list archive at Nabble.com.

RE: New Zookeeper Installation - connection refused

Posted by penguin <ba...@wellsfargo.com>.
Ok, the client port change worked for my connection refused issue with instances on the same server.  I now have 2 followers and 1 leader.  So I’ve determined that zk can run 3 instances on the same physical machine with no connection issues.  I was getting the same connection refused error when I had 3 separate machines running 1 instance of zk on each, trying to instantiate an ensemble.  Should I still have different client ports in that scenario?  I had the same client ports and it was failing miserably.  I am not familiar with zkconf, but I will look at it.

Regards,

Barry

From: Michi Mutsuzaki [via zookeeper-user] [mailto:ml-node+s578899n7580909h27@n2.nabble.com]
Sent: Thursday, March 12, 2015 1:26 AM
To: Barnett, Barry F
Subject: Re: New Zookeeper Installation - connection refused

Yes that's even better :)

On Wed, Mar 11, 2015 at 10:22 PM, Patrick Hunt <[hidden email]</user/SendEmail.jtp?type=node&node=7580909&i=0>> wrote:

> Consider zkconf? https://github.com/phunt/zkconf
>
> Patrick
>
> On Wed, Mar 11, 2015 at 10:21 PM, Michi Mutsuzaki <[hidden email]</user/SendEmail.jtp?type=node&node=7580909&i=1>> wrote:
>> The clientPort parameter needs to be different for each instance if
>> you are running them on a same box. Something like this should work:
>>
>> https://paste.apache.org/n59c?action=download
>>
>> On Wed, Mar 11, 2015 at 8:02 AM, penguin <[hidden email]</user/SendEmail.jtp?type=node&node=7580909&i=2>> wrote:
>>> Ok, I have setup my ZooKeeper ensemble on the same server.  I have 3 ZK instances setup on the same physical machine, so no need to worry about whether multiple physical machines can communicate from one to the other, right?
>>> My setup on the Linux sever is as follows:
>>>
>>> Directory for instance 1: /home/zk1
>>> Directory for instance 2: /home/zk2
>>> Directory for instance 3: /home/zk3
>>>
>>> In my conf directory, I have my zoo.cfg file for each (replace zk1 with zk2, zk3 for the other instances):
>>> # The number of milliseconds of each tick
>>> tickTime=2000
>>> # The number of ticks that the initial
>>> # synchronization phase can take
>>> initLimit=10
>>> # The number of ticks that can pass between
>>> # sending a request and getting an acknowledgement
>>> syncLimit=5
>>> # the directory where the snapshot is stored.
>>> # do not use /tmp for storage, /tmp here is just
>>> # example sakes.
>>> dataDir=/home/zk1/zookeeper-3.4.6/data
>>> dataLogDir=/home/zk1/zookeeper-3.4.6/data
>>> # the port at which the clients will connect
>>> clientPort=2181
>>> # the maximum number of client connections.
>>> maxClientCnxns=60
>>> #
>>> # Be sure to read the maintenance section of the
>>> # administrator guide before turning on autopurge.
>>> #
>>> # http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
>>> #
>>> # The number of snapshots to retain in dataDir
>>> #autopurge.snapRetainCount=3
>>> # Purge task interval in hours
>>> # Set to "0" to disable auto purge feature
>>> #autopurge.purgeInterval=1
>>> server.6=localhost:2888:3888
>>> server.7=localhost:2889:3889
>>> server.8=localhost:2890:3890
>>>
>>> the myid files are 6, 7 and 8 respectively for each instance.  Is there something I'm missing because I'm still getting the connection refused warning, and the status of the zk servers doesn't show anything but an error.
>>>
>>> Zookeeper.out shows:
>>> 2015-03-11 08:59:22,238 [myid:6] - WARN  [WorkerSender[myid=6]:QuorumCnxManager@38
>>> 2] - Cannot open channel to 8 at election address localhost/127.0.0.1:3890
>>> 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(AbstractPlainSocketIm
>>> pl.java:200)
>>>         at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:1
>>> 82)
>>>         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
>>>         at java.net.Socket.connect(Socket.java:579)
>>>
>>> zkServer.sh status shows:
>>>
>>> $ ./zkServer.sh status
>>> JMX enabled by default
>>> Using config: /opt/apps/zk1/zookeeper-3.4.6/bin/../conf/zoo.cfg
>>> Error contacting service. It is probably not running.
>>> $ ./zkServer.sh start
>>> JMX enabled by default
>>> Using config: /opt/apps/zk1/zookeeper-3.4.6/bin/../conf/zoo.cfg
>>> Starting zookeeper ... already running as process 27102.
>>>
>>> Regards,
>>>
>>> Barry
>>>
>>> From: Flavio Junqueira-2 [via zookeeper-user] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=7580909&i=3>]
>>> 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?
>>>
>>> -Flavio
>>>
>>>> On 24 Feb 2015, at 16:31, penguin <[hidden email]</user/SendEmail.jtp?type=node&node=7580878&i=0>> wrote:
>>>>
>>>> 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]/0.0.0.0:2181:QuorumPeer@714] - LOOKING
>>>> 2015-02-24 09:38:00,603 [myid:1] - INFO  [QuorumPeer[myid=1]/0.0.0.0:2181:FastLeaderElection@815] - 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>> wrote:
>>>>>
>>>>> 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:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@362] - 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:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1007] - 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 <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 <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 <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 <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:
>>> http://zookeeper-user.578899.n2.nabble.com/New-Zookeeper-Installation-connection-refused-tp7580825p7580878.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.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-tp7580825p7580904.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-tp7580825p7580909.html
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>.
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.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-tp7580825p7580912.html
Sent from the zookeeper-user mailing list archive at Nabble.com.

Re: New Zookeeper Installation - connection refused

Posted by Michi Mutsuzaki <mi...@cs.stanford.edu>.
Yes that's even better :)

On Wed, Mar 11, 2015 at 10:22 PM, Patrick Hunt <ph...@apache.org> wrote:
> Consider zkconf? https://github.com/phunt/zkconf
>
> Patrick
>
> On Wed, Mar 11, 2015 at 10:21 PM, Michi Mutsuzaki <mi...@cs.stanford.edu> wrote:
>> The clientPort parameter needs to be different for each instance if
>> you are running them on a same box. Something like this should work:
>>
>> https://paste.apache.org/n59c?action=download
>>
>> On Wed, Mar 11, 2015 at 8:02 AM, penguin <ba...@wellsfargo.com> wrote:
>>> Ok, I have setup my ZooKeeper ensemble on the same server.  I have 3 ZK instances setup on the same physical machine, so no need to worry about whether multiple physical machines can communicate from one to the other, right?
>>> My setup on the Linux sever is as follows:
>>>
>>> Directory for instance 1: /home/zk1
>>> Directory for instance 2: /home/zk2
>>> Directory for instance 3: /home/zk3
>>>
>>> In my conf directory, I have my zoo.cfg file for each (replace zk1 with zk2, zk3 for the other instances):
>>> # The number of milliseconds of each tick
>>> tickTime=2000
>>> # The number of ticks that the initial
>>> # synchronization phase can take
>>> initLimit=10
>>> # The number of ticks that can pass between
>>> # sending a request and getting an acknowledgement
>>> syncLimit=5
>>> # the directory where the snapshot is stored.
>>> # do not use /tmp for storage, /tmp here is just
>>> # example sakes.
>>> dataDir=/home/zk1/zookeeper-3.4.6/data
>>> dataLogDir=/home/zk1/zookeeper-3.4.6/data
>>> # the port at which the clients will connect
>>> clientPort=2181
>>> # the maximum number of client connections.
>>> maxClientCnxns=60
>>> #
>>> # Be sure to read the maintenance section of the
>>> # administrator guide before turning on autopurge.
>>> #
>>> # http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
>>> #
>>> # The number of snapshots to retain in dataDir
>>> #autopurge.snapRetainCount=3
>>> # Purge task interval in hours
>>> # Set to "0" to disable auto purge feature
>>> #autopurge.purgeInterval=1
>>> server.6=localhost:2888:3888
>>> server.7=localhost:2889:3889
>>> server.8=localhost:2890:3890
>>>
>>> the myid files are 6, 7 and 8 respectively for each instance.  Is there something I'm missing because I'm still getting the connection refused warning, and the status of the zk servers doesn't show anything but an error.
>>>
>>> Zookeeper.out shows:
>>> 2015-03-11 08:59:22,238 [myid:6] - WARN  [WorkerSender[myid=6]:QuorumCnxManager@38
>>> 2] - Cannot open channel to 8 at election address localhost/127.0.0.1:3890
>>> 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(AbstractPlainSocketIm
>>> pl.java:200)
>>>         at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:1
>>> 82)
>>>         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
>>>         at java.net.Socket.connect(Socket.java:579)
>>>
>>> zkServer.sh status shows:
>>>
>>> $ ./zkServer.sh status
>>> JMX enabled by default
>>> Using config: /opt/apps/zk1/zookeeper-3.4.6/bin/../conf/zoo.cfg
>>> Error contacting service. It is probably not running.
>>> $ ./zkServer.sh start
>>> JMX enabled by default
>>> Using config: /opt/apps/zk1/zookeeper-3.4.6/bin/../conf/zoo.cfg
>>> Starting zookeeper ... already running as process 27102.
>>>
>>> Regards,
>>>
>>> Barry
>>>
>>> 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?
>>>
>>> -Flavio
>>>
>>>> On 24 Feb 2015, at 16:31, penguin <[hidden email]</user/SendEmail.jtp?type=node&node=7580878&i=0>> wrote:
>>>>
>>>> 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]/0.0.0.0:2181:QuorumPeer@714] - LOOKING
>>>> 2015-02-24 09:38:00,603 [myid:1] - INFO  [QuorumPeer[myid=1]/0.0.0.0:2181:FastLeaderElection@815] - 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>> wrote:
>>>>>
>>>>> 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:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@362] - 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:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1007] - 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 <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 <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 <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 <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:
>>> http://zookeeper-user.578899.n2.nabble.com/New-Zookeeper-Installation-connection-refused-tp7580825p7580878.html
>>> 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>.
>>> 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.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-tp7580825p7580904.html
>>> Sent from the zookeeper-user mailing list archive at Nabble.com.

Re: New Zookeeper Installation - connection refused

Posted by Patrick Hunt <ph...@apache.org>.
Consider zkconf? https://github.com/phunt/zkconf

Patrick

On Wed, Mar 11, 2015 at 10:21 PM, Michi Mutsuzaki <mi...@cs.stanford.edu> wrote:
> The clientPort parameter needs to be different for each instance if
> you are running them on a same box. Something like this should work:
>
> https://paste.apache.org/n59c?action=download
>
> On Wed, Mar 11, 2015 at 8:02 AM, penguin <ba...@wellsfargo.com> wrote:
>> Ok, I have setup my ZooKeeper ensemble on the same server.  I have 3 ZK instances setup on the same physical machine, so no need to worry about whether multiple physical machines can communicate from one to the other, right?
>> My setup on the Linux sever is as follows:
>>
>> Directory for instance 1: /home/zk1
>> Directory for instance 2: /home/zk2
>> Directory for instance 3: /home/zk3
>>
>> In my conf directory, I have my zoo.cfg file for each (replace zk1 with zk2, zk3 for the other instances):
>> # The number of milliseconds of each tick
>> tickTime=2000
>> # The number of ticks that the initial
>> # synchronization phase can take
>> initLimit=10
>> # The number of ticks that can pass between
>> # sending a request and getting an acknowledgement
>> syncLimit=5
>> # the directory where the snapshot is stored.
>> # do not use /tmp for storage, /tmp here is just
>> # example sakes.
>> dataDir=/home/zk1/zookeeper-3.4.6/data
>> dataLogDir=/home/zk1/zookeeper-3.4.6/data
>> # the port at which the clients will connect
>> clientPort=2181
>> # the maximum number of client connections.
>> maxClientCnxns=60
>> #
>> # Be sure to read the maintenance section of the
>> # administrator guide before turning on autopurge.
>> #
>> # http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
>> #
>> # The number of snapshots to retain in dataDir
>> #autopurge.snapRetainCount=3
>> # Purge task interval in hours
>> # Set to "0" to disable auto purge feature
>> #autopurge.purgeInterval=1
>> server.6=localhost:2888:3888
>> server.7=localhost:2889:3889
>> server.8=localhost:2890:3890
>>
>> the myid files are 6, 7 and 8 respectively for each instance.  Is there something I'm missing because I'm still getting the connection refused warning, and the status of the zk servers doesn't show anything but an error.
>>
>> Zookeeper.out shows:
>> 2015-03-11 08:59:22,238 [myid:6] - WARN  [WorkerSender[myid=6]:QuorumCnxManager@38
>> 2] - Cannot open channel to 8 at election address localhost/127.0.0.1:3890
>> 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(AbstractPlainSocketIm
>> pl.java:200)
>>         at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:1
>> 82)
>>         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
>>         at java.net.Socket.connect(Socket.java:579)
>>
>> zkServer.sh status shows:
>>
>> $ ./zkServer.sh status
>> JMX enabled by default
>> Using config: /opt/apps/zk1/zookeeper-3.4.6/bin/../conf/zoo.cfg
>> Error contacting service. It is probably not running.
>> $ ./zkServer.sh start
>> JMX enabled by default
>> Using config: /opt/apps/zk1/zookeeper-3.4.6/bin/../conf/zoo.cfg
>> Starting zookeeper ... already running as process 27102.
>>
>> Regards,
>>
>> Barry
>>
>> 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?
>>
>> -Flavio
>>
>>> On 24 Feb 2015, at 16:31, penguin <[hidden email]</user/SendEmail.jtp?type=node&node=7580878&i=0>> wrote:
>>>
>>> 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]/0.0.0.0:2181:QuorumPeer@714] - LOOKING
>>> 2015-02-24 09:38:00,603 [myid:1] - INFO  [QuorumPeer[myid=1]/0.0.0.0:2181:FastLeaderElection@815] - 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>> wrote:
>>>>
>>>> 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:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@362] - 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:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1007] - 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 <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 <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 <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 <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:
>> http://zookeeper-user.578899.n2.nabble.com/New-Zookeeper-Installation-connection-refused-tp7580825p7580878.html
>> 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>.
>> 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.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-tp7580825p7580904.html
>> Sent from the zookeeper-user mailing list archive at Nabble.com.

Re: New Zookeeper Installation - connection refused

Posted by Michi Mutsuzaki <mi...@cs.stanford.edu>.
The clientPort parameter needs to be different for each instance if
you are running them on a same box. Something like this should work:

https://paste.apache.org/n59c?action=download

On Wed, Mar 11, 2015 at 8:02 AM, penguin <ba...@wellsfargo.com> wrote:
> Ok, I have setup my ZooKeeper ensemble on the same server.  I have 3 ZK instances setup on the same physical machine, so no need to worry about whether multiple physical machines can communicate from one to the other, right?
> My setup on the Linux sever is as follows:
>
> Directory for instance 1: /home/zk1
> Directory for instance 2: /home/zk2
> Directory for instance 3: /home/zk3
>
> In my conf directory, I have my zoo.cfg file for each (replace zk1 with zk2, zk3 for the other instances):
> # The number of milliseconds of each tick
> tickTime=2000
> # The number of ticks that the initial
> # synchronization phase can take
> initLimit=10
> # The number of ticks that can pass between
> # sending a request and getting an acknowledgement
> syncLimit=5
> # the directory where the snapshot is stored.
> # do not use /tmp for storage, /tmp here is just
> # example sakes.
> dataDir=/home/zk1/zookeeper-3.4.6/data
> dataLogDir=/home/zk1/zookeeper-3.4.6/data
> # the port at which the clients will connect
> clientPort=2181
> # the maximum number of client connections.
> maxClientCnxns=60
> #
> # Be sure to read the maintenance section of the
> # administrator guide before turning on autopurge.
> #
> # http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
> #
> # The number of snapshots to retain in dataDir
> #autopurge.snapRetainCount=3
> # Purge task interval in hours
> # Set to "0" to disable auto purge feature
> #autopurge.purgeInterval=1
> server.6=localhost:2888:3888
> server.7=localhost:2889:3889
> server.8=localhost:2890:3890
>
> the myid files are 6, 7 and 8 respectively for each instance.  Is there something I'm missing because I'm still getting the connection refused warning, and the status of the zk servers doesn't show anything but an error.
>
> Zookeeper.out shows:
> 2015-03-11 08:59:22,238 [myid:6] - WARN  [WorkerSender[myid=6]:QuorumCnxManager@38
> 2] - Cannot open channel to 8 at election address localhost/127.0.0.1:3890
> 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(AbstractPlainSocketIm
> pl.java:200)
>         at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:1
> 82)
>         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
>         at java.net.Socket.connect(Socket.java:579)
>
> zkServer.sh status shows:
>
> $ ./zkServer.sh status
> JMX enabled by default
> Using config: /opt/apps/zk1/zookeeper-3.4.6/bin/../conf/zoo.cfg
> Error contacting service. It is probably not running.
> $ ./zkServer.sh start
> JMX enabled by default
> Using config: /opt/apps/zk1/zookeeper-3.4.6/bin/../conf/zoo.cfg
> Starting zookeeper ... already running as process 27102.
>
> Regards,
>
> Barry
>
> 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?
>
> -Flavio
>
>> On 24 Feb 2015, at 16:31, penguin <[hidden email]</user/SendEmail.jtp?type=node&node=7580878&i=0>> wrote:
>>
>> 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]/0.0.0.0:2181:QuorumPeer@714] - LOOKING
>> 2015-02-24 09:38:00,603 [myid:1] - INFO  [QuorumPeer[myid=1]/0.0.0.0:2181:FastLeaderElection@815] - 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>> wrote:
>>>
>>> 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:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@362] - 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:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1007] - 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 <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 <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 <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 <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:
> http://zookeeper-user.578899.n2.nabble.com/New-Zookeeper-Installation-connection-refused-tp7580825p7580878.html
> 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>.
> 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.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-tp7580825p7580904.html
> Sent from the zookeeper-user mailing list archive at Nabble.com.

RE: New Zookeeper Installation - connection refused

Posted by penguin <ba...@wellsfargo.com>.
Ok, I have setup my ZooKeeper ensemble on the same server.  I have 3 ZK instances setup on the same physical machine, so no need to worry about whether multiple physical machines can communicate from one to the other, right?
My setup on the Linux sever is as follows:

Directory for instance 1: /home/zk1
Directory for instance 2: /home/zk2
Directory for instance 3: /home/zk3

In my conf directory, I have my zoo.cfg file for each (replace zk1 with zk2, zk3 for the other instances):
# The number of milliseconds of each tick
tickTime=2000
# The number of ticks that the initial
# synchronization phase can take
initLimit=10
# The number of ticks that can pass between
# sending a request and getting an acknowledgement
syncLimit=5
# the directory where the snapshot is stored.
# do not use /tmp for storage, /tmp here is just
# example sakes.
dataDir=/home/zk1/zookeeper-3.4.6/data
dataLogDir=/home/zk1/zookeeper-3.4.6/data
# the port at which the clients will connect
clientPort=2181
# the maximum number of client connections.
maxClientCnxns=60
#
# Be sure to read the maintenance section of the
# administrator guide before turning on autopurge.
#
# http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
#
# The number of snapshots to retain in dataDir
#autopurge.snapRetainCount=3
# Purge task interval in hours
# Set to "0" to disable auto purge feature
#autopurge.purgeInterval=1
server.6=localhost:2888:3888
server.7=localhost:2889:3889
server.8=localhost:2890:3890

the myid files are 6, 7 and 8 respectively for each instance.  Is there something I’m missing because I’m still getting the connection refused warning, and the status of the zk servers doesn’t show anything but an error.

Zookeeper.out shows:
2015-03-11 08:59:22,238 [myid:6] - WARN  [WorkerSender[myid=6]:QuorumCnxManager@38
2] - Cannot open channel to 8 at election address localhost/127.0.0.1:3890
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(AbstractPlainSocketIm
pl.java:200)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:1
82)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:579)

zkServer.sh status shows:

$ ./zkServer.sh status
JMX enabled by default
Using config: /opt/apps/zk1/zookeeper-3.4.6/bin/../conf/zoo.cfg
Error contacting service. It is probably not running.
$ ./zkServer.sh start
JMX enabled by default
Using config: /opt/apps/zk1/zookeeper-3.4.6/bin/../conf/zoo.cfg
Starting zookeeper ... already running as process 27102.

Regards,

Barry

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?

-Flavio

> On 24 Feb 2015, at 16:31, penguin <[hidden email]</user/SendEmail.jtp?type=node&node=7580878&i=0>> wrote:
>
> 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]/0.0.0.0:2181:QuorumPeer@714] - LOOKING
> 2015-02-24 09:38:00,603 [myid:1] - INFO  [QuorumPeer[myid=1]/0.0.0.0:2181:FastLeaderElection@815] - 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>> wrote:
>>
>> 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:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@362] - 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:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1007] - 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 <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 <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 <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 <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:
http://zookeeper-user.578899.n2.nabble.com/New-Zookeeper-Installation-connection-refused-tp7580825p7580878.html
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>.
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.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-tp7580825p7580904.html
Sent from the zookeeper-user mailing list archive at Nabble.com.

RE: New Zookeeper Installation - connection refused

Posted by penguin <ba...@wellsfargo.com>.
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?).

Regards,

Barry

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?

-Flavio

> On 24 Feb 2015, at 16:31, penguin <[hidden email]</user/SendEmail.jtp?type=node&node=7580878&i=0>> wrote:
>
> 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]/0.0.0.0:2181:QuorumPeer@714] - LOOKING
> 2015-02-24 09:38:00,603 [myid:1] - INFO  [QuorumPeer[myid=1]/0.0.0.0:2181:FastLeaderElection@815] - 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>> wrote:
>>
>> 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:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@362] - 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:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1007] - 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 <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 <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 <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 <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:
http://zookeeper-user.578899.n2.nabble.com/New-Zookeeper-Installation-connection-refused-tp7580825p7580878.html
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>.
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.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-tp7580825p7580879.html
Sent from the zookeeper-user mailing list archive at Nabble.com.

Re: New Zookeeper Installation - connection refused

Posted by Flavio Junqueira <fp...@yahoo.com.INVALID>.
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?

-Flavio

> On 24 Feb 2015, at 16:31, penguin <ba...@wellsfargo.com> wrote:
> 
> 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]/0.0.0.0:2181:QuorumPeer@714] - LOOKING
> 2015-02-24 09:38:00,603 [myid:1] - INFO  [QuorumPeer[myid=1]/0.0.0.0:2181:FastLeaderElection@815] - 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:ml-node+s578899n7580844h12@n2.nabble.com <ma...@n2.nabble.com>]
> 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>> wrote:
>> 
>> 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:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@362] - 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:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1007] - 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 <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 <http://zookeeper-user.578899.n2.nabble.com/New-Zookeeper-Installation-connection-refused-tp7580825p7580844.html>
> 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 <http://zookeeper-user.578899.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=7580825&code=YmFycnkuYmFybmV0dEB3ZWxsc2ZhcmdvLmNvbXw3NTgwODI1fC0xNDYzMjU3NTMx>>.
> 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 <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 <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/>.


RE: New Zookeeper Installation - connection refused

Posted by penguin <ba...@wellsfargo.com>.
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]/0.0.0.0:2181:QuorumPeer@714] - LOOKING
2015-02-24 09:38:00,603 [myid:1] - INFO  [QuorumPeer[myid=1]/0.0.0.0:2181:FastLeaderElection@815] - 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:ml-node+s578899n7580844h12@n2.nabble.com]
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>> wrote:
>
> 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:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@362] - 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:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1007] - 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<http://zookeeper-user.578899.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=7580825&code=YmFycnkuYmFybmV0dEB3ZWxsc2ZhcmdvLmNvbXw3NTgwODI1fC0xNDYzMjU3NTMx>.
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.

RE: New Zookeeper Installation - connection refused

Posted by penguin <ba...@wellsfargo.com>.
Ok, my network folks and system engineers took alook at the connectivity, and there are no issues with firewalls, or any other potential connectivity obstacle.  Therefore, not sure what the next step would be.  I tried to change my config for just 3 instances of zk on 3 separate VMs.  Still getting the connection refused error.  Anything I can provide in my setup to help resolve this?

Regards,

Barry

From: Flavio Junqueira-2 [via zookeeper-user] [mailto:ml-node+s578899n7580844h12@n2.nabble.com]
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>> wrote:
>
> 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:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@362] - 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:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1007] - 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<http://zookeeper-user.578899.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=7580825&code=YmFycnkuYmFybmV0dEB3ZWxsc2ZhcmdvLmNvbXw3NTgwODI1fC0xNDYzMjU3NTMx>.
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-tp7580825p7580847.html
Sent from the zookeeper-user mailing list archive at Nabble.com.

Re: New Zookeeper Installation - connection refused

Posted by Flavio Junqueira <fp...@yahoo.com.INVALID>.
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 <ba...@wellsfargo.com> wrote:
> 
> 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:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@362] - 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:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1007] - 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:ml-node+s578899n7580838h26@n2.nabble.com]
> 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<http://zookeeper-user.578899.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=7580825&code=YmFycnkuYmFybmV0dEB3ZWxsc2ZhcmdvLmNvbXw3NTgwODI1fC0xNDYzMjU3NTMx>.
> 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.


RE: New Zookeeper Installation - connection refused

Posted by penguin <ba...@wellsfargo.com>.
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:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@362] - 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:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1007] - 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:ml-node+s578899n7580838h26@n2.nabble.com]
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<http://zookeeper-user.578899.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=7580825&code=YmFycnkuYmFybmV0dEB3ZWxsc2ZhcmdvLmNvbXw3NTgwODI1fC0xNDYzMjU3NTMx>.
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.

Re: New Zookeeper Installation - connection refused

Posted by "Jürgen Wagner (DVT)" <ju...@devoteam.com>.
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
>


Re: New Zookeeper Installation - connection refused

Posted by Ludwig Pummer <lu...@chip-web.com>.
If you run both 'nc -l -v 2181' and 'nc -v remotehostname 2181' on 
remotehostname (different terminals), does it work?

It is really looking like you've got some sort of firewall. I know you 
say you don't, but that's getting to be the only explanation that makes 
sense. You should look into general firewall/network troubleshooting, as 
you do not have a ZooKeeper issue. You have a networking issue.

On 2/4/2015 7:51 AM, penguin wrote:
> $ nc -v remotehostname 2181
> nc: connect to remotehostname port 2181 (tcp) failed: Connection refused
>
> Regards,
>
> Barry
>
> From: Ludwig Pummer [via zookeeper-user] [mailto:ml-node+s578899n7580835h33@n2.nabble.com]
> Sent: Wednesday, February 04, 2015 10:45 AM
> To: Barnett, Barry F
> Subject: Re: New Zookeeper Installation - connection refused
>
> At this point, I would eliminate ZooKeeper from the equation and see if
> you can talk to each other on the ZK ports using something primitive
> like netcat.
>
> On hostname1, nc -v -l 2181
> On hostname2, nc -v hostname1 2181
>
> Repeat with 2888, 3888 or whatever ports you give in the zoo.cfg for
> each host and for each host as the listening server. If you get
> Connection Refused, then you have something like a firewall blocking
> your ports. If you don't, then the issue is with ZK. Try running a
> standalone ZK and connecting with just zkCli.sh to port 2181. Then move
> up to a 3-server quorum and then 5.
>
> On 2/4/2015 7:31 AM, penguin wrote:
>
>> No firewalls involved.  When I tried the zkCli.sh server hostname:port from one server to another, I got connection refused SASL authentication (unknown error).  Any ideas as to if something is configured incorrectly with some type of authentication?
>>
>> Regards,
>>
>> Barry
>>
>> From: Flavio Junqueira-2 [via zookeeper-user] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=7580835&i=0>]
>> Sent: Wednesday, February 04, 2015 8:35 AM
>> To: Barnett, Barry F
>> Subject: Re: New Zookeeper Installation - connection refused
>>
>> I'm assuming you're seeing those messages in all servers. Those messages indicate that the servers aren't being able to connect to each other to elect a leader. Could you make sure you don't any kind of filtering, like a firewall, preventing those servers from talking to each other.
>> I'd also suggest to start with an ensemble of 3 servers, and starting only two initially to debug.
>> -Flavio
>>
>>        On Wednesday, February 4, 2015 12:52 PM, penguin <[hidden email]</user/SendEmail.jtp?type=node&node=7580833&i=0>> wrote:
>>
>>
>>
>>    2015-02-03 12:31:58,118 [myid:1] - INFO  [QuorumPeer[myid=1]/0.0.0.0:2181:FastLeaderElection@815] - New election. My id =  1, proposed zxid=0x02015-02-03 12:31:58,120 [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-03 12:31:58,123 [myid:1] - WARN  [WorkerSender[myid=1]:QuorumCnxManager@382] - Cannot open channel to 2 at election address hostname.xxxx.com/IPadress here:3889java.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)
>>
>> This same message appears as it tries to connect to all the other servers over and over.
>>
>>
>> Regards,
>>
>> Barry
>>
>> From: Flavio Junqueira-2 [via zookeeper-user] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=7580833&i=1>]
>> Sent: Wednesday, February 04, 2015 4:27 AM
>> To: Barnett, Barry F
>> Subject: Re: New Zookeeper Installation - connection refused
>>
>> Hi Barry,
>> I get that you have tried to anonymize the host names, but not using the same ports is what I'd do if I were to run locally. To run across machines, I'd use the same ports to keep the utilization of ports uniform across machines. It isn't strictly wrong to do the way you're doing, though.
>> If you still need help, you'll need to provide some more detail on what you're seeing in your logs.
>> -Flavio
>>
>>       On Wednesday, February 4, 2015 3:59 AM, Ibrahim El-sanosi (PGR) <[hidden email]</user/SendEmail.jtp?type=node&node=7580830&i=0>> wrote:
>>
>>
>>
>>    If you want to run ZK in five machines, then you should list the servers in zoo.cfg file  as follows:
>>
>> server.1=host1:2888:3888
>> server.2=host2:2888:3888
>> server.3=host3:2888:3888
>> server.4=host4:2888:3888
>> server.5=host5:2888:3888
>>
>> You should change the host name with the name of your machines or IPs (for each 5 machines), and leave the ports the same. This how I do when I run 5 ZK servers.
>>
>> Ibrahim
>>
>> -----Original Message-----
>> From: penguin [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=7580830&i=1>]
>> Sent: Tuesday, February 03, 2015 06:47 م
>> To: [hidden email]</user/SendEmail.jtp?type=node&node=7580830&i=2>
>> Subject: New Zookeeper Installation - connection refused
>>
>> I have installed an instance of Zookeeper (v3.4.6) on 5 different servers (Linux).  I have created my zoo.cfg file and listed the servers as follows:
>>
>> server.1=hostname1:2888:3888
>> server.2=hostname2:2889:3889
>> server.3=hostname3:2890:3890
>> server.4=hostname4:2891:3891
>> server.5=hostname5:2892:3892
>>
>> I have put this on each server in the conf directory.
>>
>> When I startup the server on each using zkServer.sh start, and I look in zookeeper.out, I see that zookeeper tries to connect, but the connection is refused for each attempt to connect to any of the servers.
>>
>> When I issue zkServer.sh status:
>> $ ./zkServer.sh status
>> JMX enabled by default
>> Using config: /opt/apps/current/bin/../conf/zoo.cfg
>> Error contacting service. It is probably not running.
>>
>> This happens on all 5 servers.  Any idea what I'm missing.  I also have my myid file for each, starting with '1' on the first, '2' on the second, etc...
>>
>>
>> --
>> View this message in context: http://zookeeper-user.578899.n2.nabble.com/New-Zookeeper-Installation-connection-refused-tp7580825p7580834.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-tp7580825p7580835.html
> 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>.
> 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-tp7580825p7580837.html
> Sent from the zookeeper-user mailing list archive at Nabble.com.
>


RE: New Zookeeper Installation - connection refused

Posted by penguin <ba...@wellsfargo.com>.
$ nc -v remotehostname 2181
nc: connect to remotehostname port 2181 (tcp) failed: Connection refused

Regards,

Barry

From: Ludwig Pummer [via zookeeper-user] [mailto:ml-node+s578899n7580835h33@n2.nabble.com]
Sent: Wednesday, February 04, 2015 10:45 AM
To: Barnett, Barry F
Subject: Re: New Zookeeper Installation - connection refused

At this point, I would eliminate ZooKeeper from the equation and see if
you can talk to each other on the ZK ports using something primitive
like netcat.

On hostname1, nc -v -l 2181
On hostname2, nc -v hostname1 2181

Repeat with 2888, 3888 or whatever ports you give in the zoo.cfg for
each host and for each host as the listening server. If you get
Connection Refused, then you have something like a firewall blocking
your ports. If you don't, then the issue is with ZK. Try running a
standalone ZK and connecting with just zkCli.sh to port 2181. Then move
up to a 3-server quorum and then 5.

On 2/4/2015 7:31 AM, penguin wrote:

> No firewalls involved.  When I tried the zkCli.sh server hostname:port from one server to another, I got connection refused SASL authentication (unknown error).  Any ideas as to if something is configured incorrectly with some type of authentication?
>
> Regards,
>
> Barry
>
> From: Flavio Junqueira-2 [via zookeeper-user] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=7580835&i=0>]
> Sent: Wednesday, February 04, 2015 8:35 AM
> To: Barnett, Barry F
> Subject: Re: New Zookeeper Installation - connection refused
>
> I'm assuming you're seeing those messages in all servers. Those messages indicate that the servers aren't being able to connect to each other to elect a leader. Could you make sure you don't any kind of filtering, like a firewall, preventing those servers from talking to each other.
> I'd also suggest to start with an ensemble of 3 servers, and starting only two initially to debug.
> -Flavio
>
>       On Wednesday, February 4, 2015 12:52 PM, penguin <[hidden email]</user/SendEmail.jtp?type=node&node=7580833&i=0>> wrote:
>
>
>
>   2015-02-03 12:31:58,118 [myid:1] - INFO  [QuorumPeer[myid=1]/0.0.0.0:2181:FastLeaderElection@815] - New election. My id =  1, proposed zxid=0x02015-02-03 12:31:58,120 [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-03 12:31:58,123 [myid:1] - WARN  [WorkerSender[myid=1]:QuorumCnxManager@382] - Cannot open channel to 2 at election address hostname.xxxx.com/IPadress here:3889java.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)
>
> This same message appears as it tries to connect to all the other servers over and over.
>
>
> Regards,
>
> Barry
>
> From: Flavio Junqueira-2 [via zookeeper-user] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=7580833&i=1>]
> Sent: Wednesday, February 04, 2015 4:27 AM
> To: Barnett, Barry F
> Subject: Re: New Zookeeper Installation - connection refused
>
> Hi Barry,
> I get that you have tried to anonymize the host names, but not using the same ports is what I'd do if I were to run locally. To run across machines, I'd use the same ports to keep the utilization of ports uniform across machines. It isn't strictly wrong to do the way you're doing, though.
> If you still need help, you'll need to provide some more detail on what you're seeing in your logs.
> -Flavio
>
>      On Wednesday, February 4, 2015 3:59 AM, Ibrahim El-sanosi (PGR) <[hidden email]</user/SendEmail.jtp?type=node&node=7580830&i=0>> wrote:
>
>
>
>   If you want to run ZK in five machines, then you should list the servers in zoo.cfg file  as follows:
>
> server.1=host1:2888:3888
> server.2=host2:2888:3888
> server.3=host3:2888:3888
> server.4=host4:2888:3888
> server.5=host5:2888:3888
>
> You should change the host name with the name of your machines or IPs (for each 5 machines), and leave the ports the same. This how I do when I run 5 ZK servers.
>
> Ibrahim
>
> -----Original Message-----
> From: penguin [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=7580830&i=1>]
> Sent: Tuesday, February 03, 2015 06:47 م
> To: [hidden email]</user/SendEmail.jtp?type=node&node=7580830&i=2>
> Subject: New Zookeeper Installation - connection refused
>
> I have installed an instance of Zookeeper (v3.4.6) on 5 different servers (Linux).  I have created my zoo.cfg file and listed the servers as follows:
>
> server.1=hostname1:2888:3888
> server.2=hostname2:2889:3889
> server.3=hostname3:2890:3890
> server.4=hostname4:2891:3891
> server.5=hostname5:2892:3892
>
> I have put this on each server in the conf directory.
>
> When I startup the server on each using zkServer.sh start, and I look in zookeeper.out, I see that zookeeper tries to connect, but the connection is refused for each attempt to connect to any of the servers.
>
> When I issue zkServer.sh status:
> $ ./zkServer.sh status
> JMX enabled by default
> Using config: /opt/apps/current/bin/../conf/zoo.cfg
> Error contacting service. It is probably not running.
>
> This happens on all 5 servers.  Any idea what I'm missing.  I also have my myid file for each, starting with '1' on the first, '2' on the second, etc...
>
>
> --
> View this message in context: http://zookeeper-user.578899.n2.nabble.com/New-Zookeeper-Installation-connection-refused-tp7580825p7580834.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-tp7580825p7580835.html
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>.
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-tp7580825p7580837.html
Sent from the zookeeper-user mailing list archive at Nabble.com.

Re: New Zookeeper Installation - connection refused

Posted by Ludwig Pummer <lu...@chip-web.com>.
At this point, I would eliminate ZooKeeper from the equation and see if 
you can talk to each other on the ZK ports using something primitive 
like netcat.

On hostname1, nc -v -l 2181
On hostname2, nc -v hostname1 2181

Repeat with 2888, 3888 or whatever ports you give in the zoo.cfg for 
each host and for each host as the listening server. If you get 
Connection Refused, then you have something like a firewall blocking 
your ports. If you don't, then the issue is with ZK. Try running a 
standalone ZK and connecting with just zkCli.sh to port 2181. Then move 
up to a 3-server quorum and then 5.

On 2/4/2015 7:31 AM, penguin wrote:
> No firewalls involved.  When I tried the zkCli.sh server hostname:port from one server to another, I got connection refused SASL authentication (unknown error).  Any ideas as to if something is configured incorrectly with some type of authentication?
>
> Regards,
>
> Barry
>
> From: Flavio Junqueira-2 [via zookeeper-user] [mailto:ml-node+s578899n7580833h71@n2.nabble.com]
> Sent: Wednesday, February 04, 2015 8:35 AM
> To: Barnett, Barry F
> Subject: Re: New Zookeeper Installation - connection refused
>
> I'm assuming you're seeing those messages in all servers. Those messages indicate that the servers aren't being able to connect to each other to elect a leader. Could you make sure you don't any kind of filtering, like a firewall, preventing those servers from talking to each other.
> I'd also suggest to start with an ensemble of 3 servers, and starting only two initially to debug.
> -Flavio
>
>       On Wednesday, February 4, 2015 12:52 PM, penguin <[hidden email]</user/SendEmail.jtp?type=node&node=7580833&i=0>> wrote:
>
>
>
>   2015-02-03 12:31:58,118 [myid:1] - INFO  [QuorumPeer[myid=1]/0.0.0.0:2181:FastLeaderElection@815] - New election. My id =  1, proposed zxid=0x02015-02-03 12:31:58,120 [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-03 12:31:58,123 [myid:1] - WARN  [WorkerSender[myid=1]:QuorumCnxManager@382] - Cannot open channel to 2 at election address hostname.xxxx.com/IPadress here:3889java.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)
>
> This same message appears as it tries to connect to all the other servers over and over.
>
>
> Regards,
>
> Barry
>
> From: Flavio Junqueira-2 [via zookeeper-user] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=7580833&i=1>]
> Sent: Wednesday, February 04, 2015 4:27 AM
> To: Barnett, Barry F
> Subject: Re: New Zookeeper Installation - connection refused
>
> Hi Barry,
> I get that you have tried to anonymize the host names, but not using the same ports is what I'd do if I were to run locally. To run across machines, I'd use the same ports to keep the utilization of ports uniform across machines. It isn't strictly wrong to do the way you're doing, though.
> If you still need help, you'll need to provide some more detail on what you're seeing in your logs.
> -Flavio
>
>      On Wednesday, February 4, 2015 3:59 AM, Ibrahim El-sanosi (PGR) <[hidden email]</user/SendEmail.jtp?type=node&node=7580830&i=0>> wrote:
>
>
>
>   If you want to run ZK in five machines, then you should list the servers in zoo.cfg file  as follows:
>
> server.1=host1:2888:3888
> server.2=host2:2888:3888
> server.3=host3:2888:3888
> server.4=host4:2888:3888
> server.5=host5:2888:3888
>
> You should change the host name with the name of your machines or IPs (for each 5 machines), and leave the ports the same. This how I do when I run 5 ZK servers.
>
> Ibrahim
>
> -----Original Message-----
> From: penguin [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=7580830&i=1>]
> Sent: Tuesday, February 03, 2015 06:47 م
> To: [hidden email]</user/SendEmail.jtp?type=node&node=7580830&i=2>
> Subject: New Zookeeper Installation - connection refused
>
> I have installed an instance of Zookeeper (v3.4.6) on 5 different servers (Linux).  I have created my zoo.cfg file and listed the servers as follows:
>
> server.1=hostname1:2888:3888
> server.2=hostname2:2889:3889
> server.3=hostname3:2890:3890
> server.4=hostname4:2891:3891
> server.5=hostname5:2892:3892
>
> I have put this on each server in the conf directory.
>
> When I startup the server on each using zkServer.sh start, and I look in zookeeper.out, I see that zookeeper tries to connect, but the connection is refused for each attempt to connect to any of the servers.
>
> When I issue zkServer.sh status:
> $ ./zkServer.sh status
> JMX enabled by default
> Using config: /opt/apps/current/bin/../conf/zoo.cfg
> Error contacting service. It is probably not running.
>
> This happens on all 5 servers.  Any idea what I'm missing.  I also have my myid file for each, starting with '1' on the first, '2' on the second, etc...
>
>
> --
> View this message in context: http://zookeeper-user.578899.n2.nabble.com/New-Zookeeper-Installation-connection-refused-tp7580825p7580834.html
> Sent from the zookeeper-user mailing list archive at Nabble.com.
>


Re: New Zookeeper Installation - connection refused

Posted by "Jürgen Wagner (DVT)" <ju...@devoteam.com>.
Hello Barry,
  can there be some kind of weird NAT issue - unfortunately, you omitted
the IP addresses from your initial posting.

I would first verify reachability with telnet, nc or some other simple
program written in Java. Try a standalone Zk in one location first.

If that works, you have an application-level problem in Zookeeper and we
can go from there further.

Cheers,
--Jürgen





-- 

Mit freundlichen Grüßen/Kind regards/Cordialement vôtre/Atentamente/С
уважением
*i.A. Jürgen Wagner*
Head of Competence Center "Intelligence"
& Senior Cloud Consultant

Devoteam GmbH, Industriestr. 3, 70565 Stuttgart, Germany
Phone: +49 6151 868-8725, Fax: +49 711 13353-53, Mobile: +49 171 864 1543
E-Mail: juergen.wagner@devoteam.com
<ma...@devoteam.com>, URL: www.devoteam.de
<http://www.devoteam.de/>

------------------------------------------------------------------------
Managing Board: Jürgen Hatzipantelis (CEO)
Address of Record: 64331 Weiterstadt, Germany; Commercial Register:
Amtsgericht Darmstadt HRB 6450; Tax Number: DE 172 993 071



RE: New Zookeeper Installation - connection refused

Posted by penguin <ba...@wellsfargo.com>.
No firewalls involved.  When I tried the zkCli.sh server hostname:port from one server to another, I got connection refused SASL authentication (unknown error).  Any ideas as to if something is configured incorrectly with some type of authentication?

Regards,

Barry

From: Flavio Junqueira-2 [via zookeeper-user] [mailto:ml-node+s578899n7580833h71@n2.nabble.com]
Sent: Wednesday, February 04, 2015 8:35 AM
To: Barnett, Barry F
Subject: Re: New Zookeeper Installation - connection refused

I'm assuming you're seeing those messages in all servers. Those messages indicate that the servers aren't being able to connect to each other to elect a leader. Could you make sure you don't any kind of filtering, like a firewall, preventing those servers from talking to each other.
I'd also suggest to start with an ensemble of 3 servers, and starting only two initially to debug.
-Flavio

     On Wednesday, February 4, 2015 12:52 PM, penguin <[hidden email]</user/SendEmail.jtp?type=node&node=7580833&i=0>> wrote:



 2015-02-03 12:31:58,118 [myid:1] - INFO  [QuorumPeer[myid=1]/0.0.0.0:2181:FastLeaderElection@815] - New election. My id =  1, proposed zxid=0x02015-02-03 12:31:58,120 [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-03 12:31:58,123 [myid:1] - WARN  [WorkerSender[myid=1]:QuorumCnxManager@382] - Cannot open channel to 2 at election address hostname.xxxx.com/IPadress here:3889java.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)

This same message appears as it tries to connect to all the other servers over and over.


Regards,

Barry

From: Flavio Junqueira-2 [via zookeeper-user] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=7580833&i=1>]
Sent: Wednesday, February 04, 2015 4:27 AM
To: Barnett, Barry F
Subject: Re: New Zookeeper Installation - connection refused

Hi Barry,
I get that you have tried to anonymize the host names, but not using the same ports is what I'd do if I were to run locally. To run across machines, I'd use the same ports to keep the utilization of ports uniform across machines. It isn't strictly wrong to do the way you're doing, though.
If you still need help, you'll need to provide some more detail on what you're seeing in your logs.
-Flavio

    On Wednesday, February 4, 2015 3:59 AM, Ibrahim El-sanosi (PGR) <[hidden email]</user/SendEmail.jtp?type=node&node=7580830&i=0>> wrote:



 If you want to run ZK in five machines, then you should list the servers in zoo.cfg file  as follows:

server.1=host1:2888:3888
server.2=host2:2888:3888
server.3=host3:2888:3888
server.4=host4:2888:3888
server.5=host5:2888:3888

You should change the host name with the name of your machines or IPs (for each 5 machines), and leave the ports the same. This how I do when I run 5 ZK servers.

Ibrahim

-----Original Message-----
From: penguin [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=7580830&i=1>]
Sent: Tuesday, February 03, 2015 06:47 م
To: [hidden email]</user/SendEmail.jtp?type=node&node=7580830&i=2>
Subject: New Zookeeper Installation - connection refused

I have installed an instance of Zookeeper (v3.4.6) on 5 different servers (Linux).  I have created my zoo.cfg file and listed the servers as follows:

server.1=hostname1:2888:3888
server.2=hostname2:2889:3889
server.3=hostname3:2890:3890
server.4=hostname4:2891:3891
server.5=hostname5:2892:3892

I have put this on each server in the conf directory.

When I startup the server on each using zkServer.sh start, and I look in zookeeper.out, I see that zookeeper tries to connect, but the connection is refused for each attempt to connect to any of the servers.

When I issue zkServer.sh status:
$ ./zkServer.sh status
JMX enabled by default
Using config: /opt/apps/current/bin/../conf/zoo.cfg
Error contacting service. It is probably not running.

This happens on all 5 servers.  Any idea what I'm missing.  I also have my myid file for each, starting with '1' on the first, '2' on the second, etc...






--
View this message in context: http://zookeeper-user.578899.n2.nabble.com/New-Zookeeper-Installation-connection-refused-tp7580825.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-tp7580825p7580830.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-tp7580825p7580832.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-tp7580825p7580833.html
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>.
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-tp7580825p7580834.html
Sent from the zookeeper-user mailing list archive at Nabble.com.

Re: New Zookeeper Installation - connection refused

Posted by Flavio Junqueira <fp...@yahoo.com.INVALID>.
I'm assuming you're seeing those messages in all servers. Those messages indicate that the servers aren't being able to connect to each other to elect a leader. Could you make sure you don't any kind of filtering, like a firewall, preventing those servers from talking to each other.
I'd also suggest to start with an ensemble of 3 servers, and starting only two initially to debug.
-Flavio 

     On Wednesday, February 4, 2015 12:52 PM, penguin <ba...@wellsfargo.com> wrote:
   
 

 2015-02-03 12:31:58,118 [myid:1] - INFO  [QuorumPeer[myid=1]/0.0.0.0:2181:FastLeaderElection@815] - New election. My id =  1, proposed zxid=0x02015-02-03 12:31:58,120 [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-03 12:31:58,123 [myid:1] - WARN  [WorkerSender[myid=1]:QuorumCnxManager@382] - Cannot open channel to 2 at election address hostname.xxxx.com/IPadress here:3889java.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)

This same message appears as it tries to connect to all the other servers over and over.


Regards,

Barry

From: Flavio Junqueira-2 [via zookeeper-user] [mailto:ml-node+s578899n7580830h78@n2.nabble.com]
Sent: Wednesday, February 04, 2015 4:27 AM
To: Barnett, Barry F
Subject: Re: New Zookeeper Installation - connection refused

Hi Barry,
I get that you have tried to anonymize the host names, but not using the same ports is what I'd do if I were to run locally. To run across machines, I'd use the same ports to keep the utilization of ports uniform across machines. It isn't strictly wrong to do the way you're doing, though.
If you still need help, you'll need to provide some more detail on what you're seeing in your logs.
-Flavio

    On Wednesday, February 4, 2015 3:59 AM, Ibrahim El-sanosi (PGR) <[hidden email]</user/SendEmail.jtp?type=node&node=7580830&i=0>> wrote:



 If you want to run ZK in five machines, then you should list the servers in zoo.cfg file  as follows:

server.1=host1:2888:3888
server.2=host2:2888:3888
server.3=host3:2888:3888
server.4=host4:2888:3888
server.5=host5:2888:3888

You should change the host name with the name of your machines or IPs (for each 5 machines), and leave the ports the same. This how I do when I run 5 ZK servers.

Ibrahim

-----Original Message-----
From: penguin [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=7580830&i=1>]
Sent: Tuesday, February 03, 2015 06:47 م
To: [hidden email]</user/SendEmail.jtp?type=node&node=7580830&i=2>
Subject: New Zookeeper Installation - connection refused

I have installed an instance of Zookeeper (v3.4.6) on 5 different servers (Linux).  I have created my zoo.cfg file and listed the servers as follows:

server.1=hostname1:2888:3888
server.2=hostname2:2889:3889
server.3=hostname3:2890:3890
server.4=hostname4:2891:3891
server.5=hostname5:2892:3892

I have put this on each server in the conf directory.

When I startup the server on each using zkServer.sh start, and I look in zookeeper.out, I see that zookeeper tries to connect, but the connection is refused for each attempt to connect to any of the servers.

When I issue zkServer.sh status:
$ ./zkServer.sh status
JMX enabled by default
Using config: /opt/apps/current/bin/../conf/zoo.cfg
Error contacting service. It is probably not running.

This happens on all 5 servers.  Any idea what I'm missing.  I also have my myid file for each, starting with '1' on the first, '2' on the second, etc...






--
View this message in context: http://zookeeper-user.578899.n2.nabble.com/New-Zookeeper-Installation-connection-refused-tp7580825.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-tp7580825p7580830.html
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>.
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-tp7580825p7580832.html
Sent from the zookeeper-user mailing list archive at Nabble.com.

 
   

RE: New Zookeeper Installation - connection refused

Posted by penguin <ba...@wellsfargo.com>.
2015-02-03 12:31:58,118 [myid:1] - INFO  [QuorumPeer[myid=1]/0.0.0.0:2181:FastLeaderElection@815] - New election. My id =  1, proposed zxid=0x02015-02-03 12:31:58,120 [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-03 12:31:58,123 [myid:1] - WARN  [WorkerSender[myid=1]:QuorumCnxManager@382] - Cannot open channel to 2 at election address hostname.xxxx.com/IPadress here:3889java.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)

This same message appears as it tries to connect to all the other servers over and over.


Regards,

Barry

From: Flavio Junqueira-2 [via zookeeper-user] [mailto:ml-node+s578899n7580830h78@n2.nabble.com]
Sent: Wednesday, February 04, 2015 4:27 AM
To: Barnett, Barry F
Subject: Re: New Zookeeper Installation - connection refused

Hi Barry,
I get that you have tried to anonymize the host names, but not using the same ports is what I'd do if I were to run locally. To run across machines, I'd use the same ports to keep the utilization of ports uniform across machines. It isn't strictly wrong to do the way you're doing, though.
If you still need help, you'll need to provide some more detail on what you're seeing in your logs.
-Flavio

     On Wednesday, February 4, 2015 3:59 AM, Ibrahim El-sanosi (PGR) <[hidden email]</user/SendEmail.jtp?type=node&node=7580830&i=0>> wrote:



 If you want to run ZK in five machines, then you should list the servers in zoo.cfg file  as follows:

server.1=host1:2888:3888
server.2=host2:2888:3888
server.3=host3:2888:3888
server.4=host4:2888:3888
server.5=host5:2888:3888

You should change the host name with the name of your machines or IPs (for each 5 machines), and leave the ports the same. This how I do when I run 5 ZK servers.

Ibrahim

-----Original Message-----
From: penguin [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=7580830&i=1>]
Sent: Tuesday, February 03, 2015 06:47 م
To: [hidden email]</user/SendEmail.jtp?type=node&node=7580830&i=2>
Subject: New Zookeeper Installation - connection refused

I have installed an instance of Zookeeper (v3.4.6) on 5 different servers (Linux).  I have created my zoo.cfg file and listed the servers as follows:

server.1=hostname1:2888:3888
server.2=hostname2:2889:3889
server.3=hostname3:2890:3890
server.4=hostname4:2891:3891
server.5=hostname5:2892:3892

I have put this on each server in the conf directory.

When I startup the server on each using zkServer.sh start, and I look in zookeeper.out, I see that zookeeper tries to connect, but the connection is refused for each attempt to connect to any of the servers.

When I issue zkServer.sh status:
$ ./zkServer.sh status
JMX enabled by default
Using config: /opt/apps/current/bin/../conf/zoo.cfg
Error contacting service. It is probably not running.

This happens on all 5 servers.  Any idea what I'm missing.  I also have my myid file for each, starting with '1' on the first, '2' on the second, etc...






--
View this message in context: http://zookeeper-user.578899.n2.nabble.com/New-Zookeeper-Installation-connection-refused-tp7580825.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-tp7580825p7580830.html
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>.
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-tp7580825p7580832.html
Sent from the zookeeper-user mailing list archive at Nabble.com.

Re: New Zookeeper Installation - connection refused

Posted by Flavio Junqueira <fp...@yahoo.com.INVALID>.
Hi Barry,
I get that you have tried to anonymize the host names, but not using the same ports is what I'd do if I were to run locally. To run across machines, I'd use the same ports to keep the utilization of ports uniform across machines. It isn't strictly wrong to do the way you're doing, though.
If you still need help, you'll need to provide some more detail on what you're seeing in your logs.
-Flavio 

     On Wednesday, February 4, 2015 3:59 AM, Ibrahim El-sanosi (PGR) <i....@newcastle.ac.uk> wrote:
   
 

 If you want to run ZK in five machines, then you should list the servers in zoo.cfg file  as follows:

server.1=host1:2888:3888
server.2=host2:2888:3888
server.3=host3:2888:3888
server.4=host4:2888:3888
server.5=host5:2888:3888

You should change the host name with the name of your machines or IPs (for each 5 machines), and leave the ports the same. This how I do when I run 5 ZK servers.

Ibrahim

-----Original Message-----
From: penguin [mailto:barry.barnett@wellsfargo.com] 
Sent: Tuesday, February 03, 2015 06:47 م
To: zookeeper-user@hadoop.apache.org
Subject: New Zookeeper Installation - connection refused

I have installed an instance of Zookeeper (v3.4.6) on 5 different servers (Linux).  I have created my zoo.cfg file and listed the servers as follows:

server.1=hostname1:2888:3888
server.2=hostname2:2889:3889
server.3=hostname3:2890:3890
server.4=hostname4:2891:3891
server.5=hostname5:2892:3892

I have put this on each server in the conf directory.

When I startup the server on each using zkServer.sh start, and I look in zookeeper.out, I see that zookeeper tries to connect, but the connection is refused for each attempt to connect to any of the servers.

When I issue zkServer.sh status:
$ ./zkServer.sh status
JMX enabled by default
Using config: /opt/apps/current/bin/../conf/zoo.cfg
Error contacting service. It is probably not running.

This happens on all 5 servers.  Any idea what I'm missing.  I also have my myid file for each, starting with '1' on the first, '2' on the second, etc...






--
View this message in context: http://zookeeper-user.578899.n2.nabble.com/New-Zookeeper-Installation-connection-refused-tp7580825.html
Sent from the zookeeper-user mailing list archive at Nabble.com.

 
   

RE: New Zookeeper Installation - connection refused

Posted by "Ibrahim El-sanosi (PGR)" <i....@newcastle.ac.uk>.
If you want to run ZK in five machines, then you should list the servers in zoo.cfg file  as follows:

server.1=host1:2888:3888
server.2=host2:2888:3888
server.3=host3:2888:3888
server.4=host4:2888:3888
server.5=host5:2888:3888

You should change the host name with the name of your machines or IPs (for each 5 machines), and leave the ports the same. This how I do when I run 5 ZK servers.

Ibrahim

-----Original Message-----
From: penguin [mailto:barry.barnett@wellsfargo.com] 
Sent: Tuesday, February 03, 2015 06:47 م
To: zookeeper-user@hadoop.apache.org
Subject: New Zookeeper Installation - connection refused

I have installed an instance of Zookeeper (v3.4.6) on 5 different servers (Linux).  I have created my zoo.cfg file and listed the servers as follows:

server.1=hostname1:2888:3888
server.2=hostname2:2889:3889
server.3=hostname3:2890:3890
server.4=hostname4:2891:3891
server.5=hostname5:2892:3892

I have put this on each server in the conf directory.

When I startup the server on each using zkServer.sh start, and I look in zookeeper.out, I see that zookeeper tries to connect, but the connection is refused for each attempt to connect to any of the servers.

When I issue zkServer.sh status:
$ ./zkServer.sh status
JMX enabled by default
Using config: /opt/apps/current/bin/../conf/zoo.cfg
Error contacting service. It is probably not running.

This happens on all 5 servers.  Any idea what I'm missing.  I also have my myid file for each, starting with '1' on the first, '2' on the second, etc...






--
View this message in context: http://zookeeper-user.578899.n2.nabble.com/New-Zookeeper-Installation-connection-refused-tp7580825.html
Sent from the zookeeper-user mailing list archive at Nabble.com.

RE: New Zookeeper Installation - connection refused

Posted by penguin <ba...@wellsfargo.com>.
Where you see hostname would be the different server names. So five different servers with one zookeeper on each.



Regards,

Barry Barnett
Enterprise Queuing Services | QS4U
Cell: 803-207-7452


-----Original Message-----
From: Flavio Junqueira-2 [via zookeeper-user] [ml-node+s578899n7580826h54@n2.nabble.com<ma...@n2.nabble.com>]
Sent: Tuesday, February 03, 2015 03:19 PM Central Standard Time
To: Barnett, Barry F
Subject: Re: New Zookeeper Installation - connection refused

The way you're setting the ports makes it look like you're trying to run 5 servers on the same machine. Is it what you're trying to do and if so are you running the start script 5 times? Could you post a sample of the exceptions you're seeing in any case?

-Flavio

> On 03 Feb 2015, at 18:46, penguin <[hidden email]</user/SendEmail.jtp?type=node&node=7580826&i=0>> wrote:
>
> I have installed an instance of Zookeeper (v3.4.6) on 5 different servers
> (Linux).  I have created my zoo.cfg file and listed the servers as follows:
>
> server.1=hostname1:2888:3888
> server.2=hostname2:2889:3889
> server.3=hostname3:2890:3890
> server.4=hostname4:2891:3891
> server.5=hostname5:2892:3892
>
> I have put this on each server in the conf directory.
>
> When I startup the server on each using zkServer.sh start, and I look in
> zookeeper.out, I see that zookeeper tries to connect, but the connection is
> refused for each attempt to connect to any of the servers.
>
> When I issue zkServer.sh status:
> $ ./zkServer.sh status
> JMX enabled by default
> Using config: /opt/apps/current/bin/../conf/zoo.cfg
> Error contacting service. It is probably not running.
>
> This happens on all 5 servers.  Any idea what I'm missing.  I also have my
> myid file for each, starting with '1' on the first, '2' on the second,
> etc...
>
>
>
>
>
>
> --
> View this message in context: http://zookeeper-user.578899.n2.nabble.com/New-Zookeeper-Installation-connection-refused-tp7580825.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-tp7580825p7580826.html
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>.
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-tp7580825p7580827.html
Sent from the zookeeper-user mailing list archive at Nabble.com.

Re: New Zookeeper Installation - connection refused

Posted by Flavio Junqueira <fp...@yahoo.com.INVALID>.
The way you're setting the ports makes it look like you're trying to run 5 servers on the same machine. Is it what you're trying to do and if so are you running the start script 5 times? Could you post a sample of the exceptions you're seeing in any case?

-Flavio

> On 03 Feb 2015, at 18:46, penguin <ba...@wellsfargo.com> wrote:
> 
> I have installed an instance of Zookeeper (v3.4.6) on 5 different servers
> (Linux).  I have created my zoo.cfg file and listed the servers as follows:
> 
> server.1=hostname1:2888:3888
> server.2=hostname2:2889:3889
> server.3=hostname3:2890:3890
> server.4=hostname4:2891:3891
> server.5=hostname5:2892:3892
> 
> I have put this on each server in the conf directory.
> 
> When I startup the server on each using zkServer.sh start, and I look in
> zookeeper.out, I see that zookeeper tries to connect, but the connection is
> refused for each attempt to connect to any of the servers.
> 
> When I issue zkServer.sh status:
> $ ./zkServer.sh status
> JMX enabled by default
> Using config: /opt/apps/current/bin/../conf/zoo.cfg
> Error contacting service. It is probably not running.
> 
> This happens on all 5 servers.  Any idea what I'm missing.  I also have my
> myid file for each, starting with '1' on the first, '2' on the second,
> etc...
> 
> 
> 
> 
> 
> 
> --
> View this message in context: http://zookeeper-user.578899.n2.nabble.com/New-Zookeeper-Installation-connection-refused-tp7580825.html
> Sent from the zookeeper-user mailing list archive at Nabble.com.