wvanbergen / kazoo-go

Go library to access Kafka metadata in Zookeeper
http://godoc.org/github.com/wvanbergen/kazoo-go
MIT License
100 stars 48 forks source link

error when creating topic #31

Closed chandradeepak closed 6 years ago

chandradeepak commented 7 years ago

We keep getting this error even though we have 1 kafka and 1 zookeeper running in my local machine. But once i restart kafka and zoo keeper it works again. This happens after a while using our service for creating topics and ingesting data. Once this happens we have to restart the kafka and zoo keeper for the error to go away. Do you think this is because of the library.

error creating topic err="Replication factor must be between 1 and the number of brokers" topic=test_topic

i have this exception in zookeeper

EndOfStreamException: Unable to read additional data from client sessionid 0x15aecd5f32802d3, likely client has closed socket at org.apache.zookeeper.server.NIOServerCnxn.doIO(NIOServerCnxn.java:228) at org.apache.zookeeper.server.NIOServerCnxnFactory.run(NIOServerCnxnFactory.java:208) at java.lang.Thread.run(Thread.java:745)

kafka

Unable to reconnect to ZooKeeper service, session 0x15aecd5f32802ce has expired, closing socket connection (org.apache.zookeeper.ClientCnxn) [2017-03-21 10:14:56,545] INFO zookeeper state changed (Expired) (org.I0Itec.zkclient.ZkClient)

F21 commented 6 years ago

From the errors, it looks like this might be a networking issue between kafka and ZK. Were you able to resolve this?

chandradeepak commented 6 years ago

no , we dont have any network issues and i am running it locally . Not sure why this happens ? Is it because zookeeper time out issue connecting to kafka ?

F21 commented 6 years ago

Yes, from the looks of the logs, it seems to be more of an issue with ZK and not kazoo-go. What version of ZK are you using? If you are not using the latest version, can you try using the latest one?

Another thing you could try is to use etcd and zetcd instead of ZK to see if the problem still persists. zetcd is still somewhat experimental, so I am not sure if it's something you'd be happy deploying in prod.

chandradeepak commented 6 years ago

makes sense closing this now .