doujiang24 / lua-resty-kafka

Lua kafka client driver for the Openresty based on the cosocket API
BSD 3-Clause "New" or "Revised" License
803 stars 277 forks source link

buffered messages send to kafka err: not found broker #147

Open tincopper opened 1 year ago

tincopper commented 1 year ago

openresty执行一段时间后,日志里面就会报: [error] 48#48: *2223670506 [lua] producer.lua:272: buffered messages send to kafka err: not found broker, retryable: true, topic: topic-xxx, partition_id: 20, length: 4, context: ngx.timer, client: xxxx, server: 0.0.0.0:8080

然后通过netstat -at | grep xxx查看kafka的端口,发现没有找到对应tcp连接。正常是有和kafka的tcp连接。

怀疑是不是重连有问题还是什么?

doujiang24 commented 1 year ago

除了这个日志之外,还有其他相关的日志么?

chyun commented 1 year ago

创建producer时, 加上刷新时间, local prod = producer:new(broker_list, { producer_type = "async", refresh_interval=10000}) 默认是不刷新的, 当broker故障时, 会刷新一次元数据, 但是当broker恢复以后, 客户端是不会自动刷新元数据的。

tincopper commented 1 year ago

暂时没有发现其他日志,基本上都是重复这一条错误日志,需要重启才行,过一段时间然后又会出现大量这种日志。 image

doujiang24 commented 1 year ago

refresh_interval 配置了不呢?