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

17,543

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.

Share:
17,543
Darpan27
Author by

Darpan27

Updated on July 31, 2022

Comments

  • Darpan27
    Darpan27 almost 2 years

    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.

  • Darpan27
    Darpan27 over 7 years
    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.
  • Jeff Cook
    Jeff Cook over 5 years
    Could you please guide here : stackoverflow.com/questions/53783938/…