INFO Closed socket connection for client /127.0.0.1:48452 which had sessionid 0x15698f5ac360001 (org.apache.zookeeper.server.NIOServerCnxn)
Asked Answered
O

1

9

I installed fresh zookeeper & kafka both. I started them both. Then when I want to see the list of topics with this command:

bin/kafka-topics.sh --list --zookeeper localhost 2181

It gives me the socket connection closed. Here is the screen shot:

    darpanshah@darpan-ubuntu:/opt/Kafka$ bin/kafka-topics.sh --list --zookeeper localhost 2181 
2016-08-17 10:44:44,053] INFO Accepted socket connection from /127.0.0.1:48452 (org.apache.zookeeper.server.NIOServerCnxnFactory)
    [2016-08-17 10:44:44,059] INFO Client attempting to establish new session at /127.0.0.1:48452 (org.apache.zookeeper.server.ZooKeeperServer)
    [2016-08-17 10:44:44,069] INFO Established session 0x15698f5ac360001 with negotiated timeout 30000 for client /127.0.0.1:48452 (org.apache.zookeeper.server.ZooKeeperServer)
    [2016-08-17 10:44:44,095] INFO Processed session termination for sessionid: 0x15698f5ac360001 (org.apache.zookeeper.server.PrepRequestProcessor)
    [2016-08-17 10:44:44,105] INFO Closed socket connection for client /127.0.0.1:48452 which had sessionid 0x15698f5ac360001 (org.apache.zookeeper.server.NIOServerCnxn)
    darpanshah@darpan-ubuntu:/opt/Kafka$

Thanks in advance. Got stuck.

Olney answered 17/8, 2016 at 14:51 Comment(0)
M
16

That is not an error. The topic details are fetched from Zookeeper. Hence the client (invoked by kafka-topics.sh) first connects to Zookeeper, then establishes a session, gets the data and then disconnects at the end. This is the expected behavior of any clients that will get some data from Zookeeper.

Monolayer answered 18/8, 2016 at 5:0 Comment(2)
Yes. Correct. Later I realized the same thing. Only thing that got me stuck is lack of my knowledge with zookeeper-kafka communication. I am getting this message because there are no topics to display. Therefore, as you said, it established the session with zookeeper, and then it found no topics so, it just terminated the session. However, someone like me might have got stuck by assuming that it should say no topics found like that rather just terminating the session right away.Olney
Could you please guide here : #53784438Potentilla

© 2022 - 2024 — McMap. All rights reserved.