lua-resty-kafka icon indicating copy to clipboard operation
lua-resty-kafka copied to clipboard

buffered messages send to kafka err: not found broker

Open tincopper opened this issue 2 years ago • 4 comments

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连接。

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

tincopper avatar Jan 09 '23 02:01 tincopper

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

doujiang24 avatar Jan 09 '23 03:01 doujiang24

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

chyun avatar Jan 30 '23 07:01 chyun

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

tincopper avatar Apr 12 '23 03:04 tincopper

refresh_interval 配置了不呢?

doujiang24 avatar Apr 12 '23 04:04 doujiang24