hi,
我在使用lua-resty-kafka模块的时候,有这样的问题:
local broker_list = {
{ host = "192.168.1.98", port = 9092 },
}
local p = producer:new(broker_list)
local offset, err = p:send("test", "key", "hello")
if not offset then
ngx.say("send err:", err)
return
end
ngx.say("send success, offset: ", tonumber(offset))
nginx的错误日志中报错:
[lua] producer.lua:258: buffered messages send to kafka err: localhost could not be resolved (3: Host not found), retryable: true, topic: logstash, partition_id: 0, length: 1, context: ngx.timer, client: 127.0.0.1, server: 0.0.0.0:7633
这里提示 localhost could not be resolved,但是我的broker_list里面并没有localhost这个,不知道什么原因?你们有碰见过吗?