<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Cannot  connect to zookeeper server from zookeeper-client node in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-connect-to-zookeeper-server-from-zookeeper-client/m-p/133125#M55964</link>
    <description>&lt;A rel="user" href="https://community.cloudera.com/users/505/dsharma.html" nodeid="505"&gt;@Deepak Sharma&lt;/A&gt;&lt;P&gt;Thank you, that command is worked.&lt;/P&gt;&lt;P&gt;I see in other node that I don't install ZK server and ZK client. I can use use command without any warning &lt;/P&gt;&lt;P&gt;/usr/hdp/current/zookeeper-client/bin/zookeeper-client &lt;/P&gt;&lt;P&gt;So Do you know why it happen ?&lt;/P&gt;</description>
    <pubDate>Thu, 02 Mar 2017 16:48:26 GMT</pubDate>
    <dc:creator>hoangletrung</dc:creator>
    <dc:date>2017-03-02T16:48:26Z</dc:date>
    <item>
      <title>Cannot  connect to zookeeper server from zookeeper-client node</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-connect-to-zookeeper-server-from-zookeeper-client/m-p/133122#M55961</link>
      <description>&lt;P&gt;
	In my HDP cluster, I install 3 zookeeper-servers on 3 nodes, other nodes I just only install zookeeper-client.&lt;/P&gt;&lt;P&gt;
	When I stand on Zookeeper-Server nodes, I can run &lt;STRONG&gt;zookeeper-client&lt;/STRONG&gt; command OK.&lt;/P&gt;&lt;P&gt;
	But when I stand on Zookeeper-Client nodes, I run &lt;STRONG&gt;zookeeper-client &lt;/STRONG&gt;and can not connect to zookeeper servers&lt;/P&gt;&lt;PRE&gt;2017-03-01 23:19:57,076 - INFO  [main:ZooKeeper@438] - Initiating client connection, connectString=localhost:2181 sessionTimeout=30000 watcher=org.apache.zookeeper.ZooKeeperMain$MyWatcher@23ab930d
Welcome to ZooKeeper!
2017-03-01 23:19:57,112 - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@1019] - Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
JLine support is enabled
2017-03-01 23:19:57,205 - WARN  [main-SendThread(localhost:2181):ClientCnxn$SendThread@1146] - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1125)
[zk: localhost:2181(CONNECTING) 0] 2017-03-01 23:19:58,312 - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@1019] - Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
2017-03-01 23:19:58,314 - WARN  [main-SendThread(localhost:2181):ClientCnxn$SendThread@1146] - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1125)
2017-03-01 23:19:59,415 - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@1019] - Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
2017-03-01 23:19:59,416 - WARN  [main-SendThread(localhost:2181):ClientCnxn$SendThread@1146] - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1125)
2017-03-01 23:20:00,517 - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@1019] - Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
2017-03-01 23:20:00,518 - WARN  [main-SendThread(localhost:2181):ClientCnxn$SendThread@1146] - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1125)


&lt;/PRE&gt;&lt;P&gt;So anyone can have solution for this problem&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 11:10:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-connect-to-zookeeper-server-from-zookeeper-client/m-p/133122#M55961</guid>
      <dc:creator>hoangletrung</dc:creator>
      <dc:date>2022-09-16T11:10:58Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot  connect to zookeeper server from zookeeper-client node</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-connect-to-zookeeper-server-from-zookeeper-client/m-p/133123#M55962</link>
      <description>&lt;P&gt;by default it is connecting to localhost:2181, since there is no zookeeper server running on client host so it fails,&lt;/P&gt;&lt;P&gt;please specify zookeeper server and port in your command then it will work. eg:&lt;/P&gt;&lt;P&gt;/usr/hdp/current/zookeeper-client/bin/zookeeper-client -server &amp;lt;ZK1&amp;gt;:2181,&amp;lt;ZK2&amp;gt;:2181&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2017 16:24:49 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-connect-to-zookeeper-server-from-zookeeper-client/m-p/133123#M55962</guid>
      <dc:creator>dsharma</dc:creator>
      <dc:date>2017-03-02T16:24:49Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot  connect to zookeeper server from zookeeper-client node</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-connect-to-zookeeper-server-from-zookeeper-client/m-p/133124#M55963</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/13042/hoangletrung.html" nodeid="13042"&gt;@Hoang Le&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Can you please confirm in the following file whatever host/port are mentioned those are accessible from the "Zookeeper Client" machine?&lt;/P&gt;&lt;PRE&gt;/etc/zookeeper/conf/zoo.cfg &lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;This file should show the ZK servers details that should be reachable properly from client. So please check the host/port details and try doing a "telnet" to verify if those are reachable or not?&lt;/P&gt;&lt;PRE&gt;clientPort=2181
initLimit=10
autopurge.purgeInterval=24
syncLimit=5
tickTime=2000
dataDir=/hadoop/zookeeper
autopurge.snapRetainCount=30
server.1=erie1.example.com:2888:3888
server.2=erie2.example.com:2888:3888
server.3=erie3.example.com:2888:3888
server.4=erie4.example.com:2888:3888&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2017 16:24:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-connect-to-zookeeper-server-from-zookeeper-client/m-p/133124#M55963</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2017-03-02T16:24:59Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot  connect to zookeeper server from zookeeper-client node</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-connect-to-zookeeper-server-from-zookeeper-client/m-p/133125#M55964</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/505/dsharma.html" nodeid="505"&gt;@Deepak Sharma&lt;/A&gt;&lt;P&gt;Thank you, that command is worked.&lt;/P&gt;&lt;P&gt;I see in other node that I don't install ZK server and ZK client. I can use use command without any warning &lt;/P&gt;&lt;P&gt;/usr/hdp/current/zookeeper-client/bin/zookeeper-client &lt;/P&gt;&lt;P&gt;So Do you know why it happen ?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2017 16:48:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-connect-to-zookeeper-server-from-zookeeper-client/m-p/133125#M55964</guid>
      <dc:creator>hoangletrung</dc:creator>
      <dc:date>2017-03-02T16:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot  connect to zookeeper server from zookeeper-client node</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-connect-to-zookeeper-server-from-zookeeper-client/m-p/133126#M55965</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/3418/jsensharma.html" nodeid="3418"&gt;@Jay SenSharma&lt;/A&gt; &lt;/P&gt;&lt;P&gt;/usr/hdp/current/zookeeper-client/bin/zookeeper-client -server &amp;lt;ZK1&amp;gt;:2181,&amp;lt;ZK2&amp;gt;:2181

that command work with all ZK server&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2017 16:49:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-connect-to-zookeeper-server-from-zookeeper-client/m-p/133126#M55965</guid>
      <dc:creator>hoangletrung</dc:creator>
      <dc:date>2017-03-02T16:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot  connect to zookeeper server from zookeeper-client node</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-connect-to-zookeeper-server-from-zookeeper-client/m-p/133127#M55966</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/13042/hoangletrung.html" nodeid="13042"&gt;@Hoang Le
&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The command "/usr/hdp/current/zookeeper-client/bin/zookeeper-client" should work becase it is able to locate the zookeeper conf directory as following:&lt;/P&gt;&lt;PRE&gt;# cat /usr/hdp/current/zookeeper-client/bin/zookeeper-client 
#!/bin/bash

export ZOOKEEPER_HOME=/usr/hdp/2.5.0.0-1245//zookeeper
export ZOOKEEPER_CONF=${ZOOKEEPER_HOME}/conf
export CLASSPATH=$CLASSPATH:$ZOOKEEPER_CONF:$ZOOKEEPER_HOME/*:$ZOOKEEPER_HOME/lib/*
export ZOOCFGDIR=${ZOOCFGDIR:-$ZOOKEEPER_CONF}
env CLASSPATH=$CLASSPATH ${ZOOKEEPER_HOME}/bin/zkCli.sh "$@"




&lt;/PRE&gt;&lt;P&gt;. &lt;/P&gt;&lt;P&gt;So as long as it is able to locate the correct "ZOOKEEPER_CONF" it should be able to connect to the local zookeeper. &lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2017 16:53:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-connect-to-zookeeper-server-from-zookeeper-client/m-p/133127#M55966</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2017-03-02T16:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot  connect to zookeeper server from zookeeper-client node</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-connect-to-zookeeper-server-from-zookeeper-client/m-p/133128#M55967</link>
      <description>&lt;P&gt;it happens because zookeeper-client command is connecting to the localhost so whenever you run it without specifying server on the node where zk server is installed , it works because localhost has zookeeper. but when you run it on other node then it does not work since there is no zookeeper installed on the localhost&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2017 16:54:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-connect-to-zookeeper-server-from-zookeeper-client/m-p/133128#M55967</guid>
      <dc:creator>dsharma</dc:creator>
      <dc:date>2017-03-02T16:54:23Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot  connect to zookeeper server from zookeeper-client node</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-connect-to-zookeeper-server-from-zookeeper-client/m-p/133129#M55968</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/505/dsharma.html" nodeid="505"&gt;@Deepak Sharma&lt;/A&gt;&lt;P&gt;in the command "/usr/hdp/current/zookeeper-client/bin/zookeeper-client -server &amp;lt;ZK1&amp;gt;:2181,&amp;lt;ZK2&amp;gt;:2181"&lt;/P&gt;&lt;P&gt;&amp;lt;ZK1&amp;gt;:2181,&amp;lt;ZK2&amp;gt;:2181 ---- I dint understand. Could you explain it.&lt;/P&gt;</description>
      <pubDate>Sun, 03 Dec 2017 01:40:07 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-connect-to-zookeeper-server-from-zookeeper-client/m-p/133129#M55968</guid>
      <dc:creator>saisandeepdevop</dc:creator>
      <dc:date>2017-12-03T01:40:07Z</dc:date>
    </item>
  </channel>
</rss>

