[ https://issues.apache.org/jira/browse/KAFKA-7721?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mickael Maison resolved KAFKA-7721. ----------------------------------- Resolution: Cannot Reproduce We are now removing ZooKeeper support so closing this issue. > Connection to zookeeper refused > ------------------------------- > > Key: KAFKA-7721 > URL: https://issues.apache.org/jira/browse/KAFKA-7721 > Project: Kafka > Issue Type: Bug > Affects Versions: 2.1.0 > Environment: Dockerized containers - kubernetes 1.9 > Reporter: Mohammad Etemad > Priority: Major > > Kafka throws exception when trying to connect to zookeeper. This happens when > zookeeper connection is lost and recovered. Kafka seems to be stuck in a loop > that cannot renew the connection. Here are the logs: > 2018-12-11 13:52:52,905] INFO Opening socket connection to server > zookeeper-0.zookeeper.logging.svc.cluster.local/10.38.128.12:2181. Will not > attempt to authenticate using SASL (unknown error) > (org.apache.zookeeper.ClientCnxn) > [2018-12-11 13:52:52,906] WARN Session 0x1001443ad77000f 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:717) > at > org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361) > at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1141) > On the zookeeper side it can be seen that kafka connection is established. > Here are the logs: > 2018-12-11 13:53:44,969 [myid:] - INFO > [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@215] - > Accepted socket connection from /10.38.128.8:46066 > 2018-12-11 13:53:44,976 [myid:] - INFO > [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:ZooKeeperServer@938] - Client > attempting to establish new session at /10.38.128.8:46066 > 2018-12-11 13:53:45,005 [myid:] - INFO [SyncThread:0:ZooKeeperServer@683] - > Established session 0x10060ff12a58dc0 with negotiated timeout 30000 for > client /10.38.128.8:46066 > 2018-12-11 13:53:45,071 [myid:] - INFO [ProcessThread(sid:0 > cport:2181)::PrepRequestProcessor@487] - Processed session termination for > sessionid: 0x10060ff12a58dc0 > 2018-12-11 13:53:45,077 [myid:] - INFO > [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1040] - Closed > socket connection for client /10.38.128.8:46066 which had sessionid > 0x10060ff12a58dc0 > 2018-12-11 13:53:47,119 [myid:] - INFO > [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@215] - > Accepted socket connection from /10.36.0.8:48798 > 2018-12-11 13:53:47,124 [myid:] - INFO > [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:ZooKeeperServer@938] - Client > attempting to establish new session at /10.36.0.8:48798 > 2018-12-11 13:53:47,134 [myid:] - INFO [SyncThread:0:ZooKeeperServer@683] - > Established session 0x10060ff12a58dc1 with negotiated timeout 30000 for > client /10.36.0.8:48798 > 2018-12-11 13:53:47,582 [myid:] - INFO [ProcessThread(sid:0 > cport:2181)::PrepRequestProcessor@487] - Processed session termination for > sessionid: 0x10060ff12a58dc1 > 2018-12-11 13:53:47,592 [myid:] - INFO > [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1040] - Closed > socket connection for client /10.36.0.8:48798 which had sessionid > 0x10060ff12a58dc1 -- This message was sent by Atlassian Jira (v8.20.10#820010)