Have you seen this thread (GC might be the cause for session time out) ? http://search-hadoop.com/m/Kafka/uyzND15d4h21yZnIZ?subj=Re+zookeeper+session+time+out
Please check zookeeper server logs when you have a chance. Please share the versions of Kafka and zookeeper. On Sat, Feb 24, 2018 at 12:03 AM, Soheil Pourbafrani <soheil.i...@gmail.com> wrote: > In Kafka 0.11 server.log, it continuously logs > > [2018-02-24 10:38:11,178] WARN Client session timed out, have not heard > from server in 4001ms for sessionid 0x361c65434f1000c > (org.apache.zookeeper.ClientCnxn) > [2018-02-24 10:38:11,178] INFO Client session timed out, have not heard > from server in 4001ms for sessionid 0x361c65434f1000c, closing socket > connection and attempting$ > [2018-02-24 10:38:11,278] INFO zookeeper state changed (Disconnected) > (org.I0Itec.zkclient.ZkClient) > [2018-02-24 10:38:11,979] INFO Opening socket connection to server > zookeeper1/192.168.1.204:2181. Will not attempt to authenticate using SASL > (unknown error) (org.apac$ > [2018-02-24 10:38:12,981] INFO Socket connection established to zookeeper1/ > 192.168.1.204:2181, initiating session (org.apache.zookeeper.ClientCnxn) > [2018-02-24 10:38:12,990] INFO Session establishment complete on server > zookeeper1/192.168.1.204:2181, sessionid = 0x361c65434f1000c, negotiated > timeout = 6000 (org.ap$ > [2018-02-24 10:38:12,990] INFO zookeeper state changed (SyncConnected) > (org.I0Itec.zkclient.ZkClient) > > But Kafka work and for example, I can get topic list using kafka-topic > script > My Kafka cluster contains 3 nodes and Zookeeper cluster contains 3 nodes, > too (but in different machines). > > The following is Kafka conf: > > broker.id=100 > listeners=PLAINTEXT://kafka1:9092 > num.partitions=24 > delete.topic.enable=true > default.replication.factor=3 > log.dirs=/data/kafka/data > zookeeper.connect=zookeeper1:2181,zookeeper2:2181,zookeeper3:2181 > log.retention.hours=168 > > Can anyone help? >