aliware-kafka-demos
aliware-kafka-demos copied to clipboard
filebeat demo 配置在商业版 kafka 会出错 connection reset by peer
我使用 公测版本可以使用,修改了商用版本的之后就会报这样子的错误
172.20.1.142:45936->172.17.102.2:9092: read: connection reset by peer
2018-07-17T04:09:37.366Z INFO kafka/log.go:36 kafka message: client/metadata got error from broker while fetching metadata:%!(EXTRA *net.OpError=read tcp 172.20.1.142:45936->172.17.102.2:9092: read: connection reset by peer)
2018-07-17T04:09:37.366Z INFO kafka/log.go:36 kafka message: client/metadata no available broker to send metadata request to
2018-07-17T04:09:37.366Z INFO kafka/log.go:36 client/brokers resurrecting 3 dead seed brokers
2018-07-17T04:09:37.366Z INFO kafka/log.go:36 client/metadata retrying after 250ms... (1 attempts remaining)
2018-07-17T04:09:37.616Z INFO kafka/log.go:36 client/metadata fetching metadata for all topics from broker 172.17.102.3:9092
2018-07-17T04:09:37.617Z INFO kafka/log.go:36 Failed to connect to broker 172.17.102.3:9092: read tcp 172.20.1.142:49526->172.17.102.3:9092: read: connection reset by peer
2018-07-17T04:09:37.617Z INFO kafka/log.go:36 kafka message: client/metadata got error from broker while fetching metadata:%!(EXTRA *net.OpError=read tcp 172.20.1.142:49526->172.17.102.3:9092: read: connection reset by peer)
2018-07-17T04:09:37.617Z INFO kafka/log.go:36 client/metadata fetching metadata for all topics from broker 172.17.102.1:9092
2018-07-17T04:09:37.617Z INFO kafka/log.go:36 Failed to connect to broker 172.17.102.1:9092: read tcp 172.20.1.142:49556->172.17.102.1:9092: read: connection reset by peer
2018-07-17T04:09:37.617Z INFO kafka/log.go:36 kafka message: client/metadata got error from broker while fetching metadata:%!(EXTRA *net.OpError=read tcp 172.20.1.142:49556->172.17.102.1:9092: read: connection reset by peer)
2018-07-17T04:09:37.617Z INFO kafka/log.go:36 client/metadata fetching metadata for all topics from broker 172.17.102.2:9092
2018-07-17T04:09:37.618Z INFO kafka/log.go:36 Failed to connect to broker 172.17.102.2:9092: read tcp 172.20.1.142:45942->172.17.102.2:9092: read: connection reset by peer
2018-07-17T04:09:37.618Z INFO kafka/log.go:36 kafka message: client/metadata got error from broker while fetching metadata:%!(EXTRA *net.OpError=read tcp 172.20.1.142:45942->172.17.102.2:9092: read: connection reset by peer)
2018-07-17T04:09:37.618Z INFO kafka/log.go:36 kafka message: client/metadata no available broker to send metadata request to
2018-07-17T04:09:37.618Z INFO kafka/log.go:36 client/brokers resurrecting 3 dead seed brokers
2018-07-17T04:09:37.618Z INFO kafka/log.go:36 kafka message: Closing Client
2018-07-17T04:09:37.618Z ERROR kafka/client.go:74 Kafka connect fails with: kafka: client has run out of available brokers to talk to (Is your cluster reachable?)
2018-07-17T04:09:37.618Z ERROR pipeline/output.go:74 Failed to connect: kafka: client has run out of available brokers to talk to (Is your cluster reachable?)
2018-07-17T04:09:37.618Z INFO kafka/log.go:36 kafka message: Initializing new client
2018-07-17T04:09:37.618Z INFO kafka/log.go:36 client/metadata fetching metadata for all topics from broker 172.17.102.2:9092
https://help.aliyun.com/document_detail/68165.html 在分布式环境下,由于网络等原因,偶尔的发送失败是常见的。导致这种失败的原因有可能是消息已经发送成功,但是 Ack 失败,也有可能是确实没发送成功。
消息队列 Kafka 是 VIP 网络架构,会主动掐掉空闲连接(30 秒没活动),也就是说,不是一直活跃的客户端会经常收到”connection rest by peer”这样的错误,因此建议都考虑重试消息发送。