Open oldthreefeng opened 3 years ago
like #224 . fix image to 1.2.0 . connect success
k logs -n monitor kafka-exporter-5bf54fbbfb-zq64z
[sarama] 2021/06/24 08:49:11 Initializing new client
time="2021-06-24T08:49:11Z" level=info msg="Starting kafka_exporter (version=1.2.0, branch=HEAD, revision=830660212e6c109e69dcb1cb58f5159fe3b38903)" source="kafka_exporter.go:474"
time="2021-06-24T08:49:11Z" level=info msg="Build context (go=go1.9, user=travis@travis-job-2baddb7a-390a-490a-9723-d39790ff6c41, date=20180707-14:33:44)" source="kafka_exporter.go:475"
[sarama] 2021/06/24 08:49:11 client/metadata fetching metadata for all topics from broker 192.168.30.6:9092
[sarama] 2021/06/24 08:49:11 Connected to broker at 192.168.30.6:9092 (unregistered)
[sarama] 2021/06/24 08:49:11 client/brokers registered new broker #101 at 192.168.30.5:9092
[sarama] 2021/06/24 08:49:11 client/brokers registered new broker #103 at 192.168.30.7:9092
[sarama] 2021/06/24 08:49:11 client/brokers registered new broker #102 at 192.168.30.6:9092
[sarama] 2021/06/24 08:49:11 client/metadata found some partitions to be leaderless
[sarama] 2021/06/24 08:49:11 client/metadata retrying after 250ms... (3 attempts remaining)
[sarama] 2021/06/24 08:49:11 client/metadata fetching metadata for all topics from broker 192.168.30.6:9092
[sarama] 2021/06/24 08:49:11 client/metadata found some partitions to be leaderless
[sarama] 2021/06/24 08:49:11 client/metadata retrying after 250ms... (2 attempts remaining)
[sarama] 2021/06/24 08:49:11 client/metadata fetching metadata for all topics from broker 192.168.30.6:9092
[sarama] 2021/06/24 08:49:11 client/metadata found some partitions to be leaderless
[sarama] 2021/06/24 08:49:11 client/metadata retrying after 250ms... (1 attempts remaining)
[sarama] 2021/06/24 08:49:12 client/metadata fetching metadata for all topics from broker 192.168.30.6:9092
[sarama] 2021/06/24 08:49:12 client/metadata found some partitions to be leaderless
[sarama] 2021/06/24 08:49:12 Successfully initialized new client
time="2021-06-24T08:49:12Z" level=info msg="Done Init Clients" source="kafka_exporter.go:213"
time="2021-06-24T08:49:12Z" level=info msg="Listening on :9308" source="kafka_exporter.go:499"
when trying to get metrics curl clusterIP:9308/metrcis
it hangs. and the pod log like this.
k logs -n monitor kafka-exporter-56bc8697b7-n52pr
time="2021-06-24T08:53:17Z" level=info msg="Starting kafka_exporter (version=1.2.0, branch=HEAD, revision=830660212e6c109e69dcb1cb58f5159fe3b38903)" source="kafka_exporter.go:474"
time="2021-06-24T08:53:17Z" level=info msg="Build context (go=go1.9, user=travis@travis-job-2baddb7a-390a-490a-9723-d39790ff6c41, date=20180707-14:33:44)" source="kafka_exporter.go:475"
time="2021-06-24T08:53:18Z" level=info msg="Done Init Clients" source="kafka_exporter.go:213"
time="2021-06-24T08:53:18Z" level=info msg="Listening on :9308" source="kafka_exporter.go:499"
time="2021-06-24T08:53:48Z" level=error msg="Cannot get leader of topic springcloud_config_t1 partition 8: kafka server: In the middle of a leadership election, there is currently no leader for this partition and hence it is unavailable for writes." source="kafka_exporter.go:275"
time="2021-06-24T08:53:50Z" level=error msg="Cannot get current offset of topic springcloud_config_t1 partition 8: kafka server: In the middle of a leadership election, there is currently no leader for this partition and hence it is unavailable for writes." source="kafka_exporter.go:284"
time="2021-06-24T08:53:53Z" level=error msg="Cannot get oldest offset of topic springcloud_config_t1 partition 8: kafka server: In the middle of a leadership election, there is currently no leader for this partition and hence it is unavailable for writes." source="kafka_exporter.go:296"
time="2021-06-24T08:53:53Z" level=error msg="Cannot get leader of topic springcloud_config_t1 partition 9: kafka server: In the middle of a leadership election, there is currently no leader for this partition and hence it is unavailable for writes." source="kafka_exporter.go:275"
time="2021-06-24T08:53:56Z" level=error msg="Cannot get current offset of topic springcloud_config_t1 partition 9: kafka server: In the middle of a leadership election, there is currently no leader for this partition and hence it is unavailable for writes." source="kafka_exporter.go:284"
time="2021-06-24T08:53:58Z" level=error msg="Cannot get oldest offset of topic springcloud_config_t1 partition 9: kafka server: In the middle of a leadership election, there is currently no leader for this partition and hence it is unavailable for writes." source="kafka_exporter.go:296"
kafka version is 0.10.2 . (Support Apache Kafka version 0.10.1.0 (and later).)
my yaml
when running in cluster. failed?