Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

unexpected error, closing socket connection and attempting reconnect..

avatar
Contributor

Hi,

It was running fine, but suddenly, I started getting below error, Does anyone know what can be the issue?

I restarted zookeepr from ambari as well.

[root@ttsv-lab-vmdb-01 ~]# /usr/hdp/current/kafka-broker/bin/kafka-console-consumer.sh --zookeepelocalhost:2081 --topic 56d4a92bb0073e537755b461 --from-beginning
[2016-03-01 16:37:13,249] WARN Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect (org.apache.zookeeper.ClientCnxn)
java.net.ConnectException: Connection refused
   at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
   at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
   at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
   at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1125)
[2016-03-01 16:37:13,354] WARN Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect (org.apache.zookeeper.ClientCnxn)
java.net.ConnectException: Connection refused
1 ACCEPTED SOLUTION

avatar
Master Mentor
@Vinti Maheshwari

Try this

./kafka-console-producer.sh --broker-list borkerhost:6667 --topic test

./kafka-console-consumer.sh --zookeeper localhost:2181 --topic test --from-beginning

View solution in original post

4 REPLIES 4

avatar
Master Mentor
@Vinti Maheshwari

Try this

./kafka-console-producer.sh --broker-list borkerhost:6667 --topic test

./kafka-console-consumer.sh --zookeeper localhost:2181 --topic test --from-beginning

avatar
Master Mentor

@Vinti Maheshwari

WARN Session0x0for server null, unexpected error, closing socket connection and attempting reconnect (org.apache.zookeeper.ClientCnxn)

java.net.ConnectException:Connection refused

Make sure that Broker and ZK is up.

avatar
Contributor

Thanks Neeraj, It's working now.

avatar
New Contributor

Hi Neeraj , why do we need to pass this parameter "borkerhost:6667"