Getting Error In Zookeeper : zkcli :Connection refused : Opening socket connection to server localhost/0:0:0:0:0:0:0:1:2181

ERROR SCREEN SHOT

Architecture

2 vm 's - linux os - 6
hadoop cluster (NO resource Manager HA,NO name Node HA)

Mentioned below is the Jps processes running
HDFS
YARN
NameNode,DataNode, Nodemanager

installed Zookeeper in the VM1
Started the Zkserver - 7378 QuorumPeerMain (client Server Port 2181)

When Trying to start the cli command line : getting the below error:

COMMAND
./zkCli.sh -server localhost:2181

ERROR

2019-12-20 10:02:41,625 - INFO [main:ZooKeeper@379] - Initiating client connection, connectString=localhost:2181 sessionTimeout=30000 watcher=org.apache.zookeeper.ZooKeeperMain$MyWatcher@76fb509a
2019-12-20 10:02:41,664 - INFO [main-SendThread():ClientCnxn$SendThread@1058] - Opening socket connection to server localhost/127.0.0.1:2181
Welcome to ZooKeeper!
JLine support is enabled
2019-12-20 10:02:41,786 - WARN [main-SendThread(localhost:2181):ClientCnxn$SendThread@1185] - 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.ClientCnxn$SendThread.run(ClientCnxn.java:1143)
[zk: localhost:2181(CONNECTING) 0] 2019-12-20 10:02:42,597 - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@1058] - Opening socket connection to server localhost/0:0:0:0:0:0:0:1:2181

Requesting team to please help me on this . your help is appreciated,

Sharing also the Hadoop Version :slight_smile:

[cloudera@linux01 bin]$ hadoop version
WARNING: HADOOP_PREFIX has been replaced by HADOOP_HOME. Using value of HADOOP_PREFIX.
Hadoop 3.1.2
Source code repository https://github.com/apache/hadoop.git -r 1019dde65bcf12e05ef48ac71e84550d589e5d9a
Compiled by sunilg on 2019-01-29T01:39Z
Compiled with protoc 2.5.0
From source with checksum 64b8bdd4ca6e77cce75a93eb09ab2a9
This command was run using /usr/local/hadoop/share/hadoop/common/hadoop-common-3.1.2.jar
[cloudera@linux01 bin]$
[cloudera@linux01 bin]$

@sgiri @abhinavsingh : Please help . Thanks.

It looks like your Zookeeper server is not running.

At the forum, the general focus is to help users who are using Hadoop/Spark/Jupyter at CloudxLab. It is very difficult to help in your own installation.

Even in the installation of CloudxLab, we use Ambari to install everything.

Thanks Sandeep. I have able to sort out the issues. There were 2 mistakes I was doing.
a) configuration of the zoo.cfg file .
b) allowing the ports via firewall and restarting the zookeeper in all the servers.

after starting the the ./zkserver , I can now connect the load balancer using ./zkcli -server 127.0.0.1: <client_port>

Sharing the Screenshot