andreas-schroeder / kafka-health-check

Health Check for Kafka Brokers.
MIT License
243 stars 84 forks source link

Fetching topics from ZooKeeper failed #1

Closed bonifaido closed 7 years ago

bonifaido commented 8 years ago

Hi, I get the following error message from the application when trying to list topics from ZooKeeper:

INFO[0236] metadata could not be retrieved, assuming broker unhealthy: Fetching topics from ZooKeeper failed: json: cannot unmarshal object into Go value of type map[int32][]int32

This expects the type of json value partitions in map[int32][]int32 however the actual type is map[string][]int32

[zk: localhost:2181(CONNECTED) 3] get /brokers/topics/broker-1-health-check   
{"version":1,"partitions":{"0":[1]}}
cZxid = 0x10000001b
ctime = Mon Oct 24 09:53:51 CEST 2016
mZxid = 0x10000001b
mtime = Mon Oct 24 09:53:51 CEST 2016
KAFKA_VERSION="0.10.0.1"
SCALA_VERSION="2.11"
TapuGithub commented 7 years ago

Having same problem with Kafka 0.10.1.1. @bonifaido have you found a workaround?

bonifaido commented 7 years ago

No unfortunately not, I found that complex health checks are not making my life easier, so I just dropped using kafka-health-check and used just a few simple hand rolled health checks in production.

nerdicbynature commented 7 years ago

Switching to Go 1.8.3 solved that problem for me.

andreas-schroeder commented 7 years ago

Hi,

thanks for the issue report.

Unmarshalling into int32 keys is a feature that was introduced with golang 1.7, iirc. I'll build binary releases with the proper golang version that has this feature.

If this issue still persists, please reopen this issue. I'll close it for now.