Closed hgaong closed 5 years ago
@hgaong
the error message shows the truth, not found topic
:)
but i found this topic use the command:$ bin/kafka-topics.sh --list --bootstrap-server localhost:9092
.
Is there anything else that could cause this problem?
@hgaong have you created the topic manually before you send message to it?
Kafka may create the topic automatically after it, then you can see it now.
@hgaong can you see the same error message now?
I created the topic before send message.And this problem has been happening all the time.
@hgaong can you see any other error messages?
I'm not sure your nginx can parse the localhost
address.
2019/06/23 17:48:33 [error] 30483#30483: *5489 [lua] client.lua:150: _fetch_metadata(): all brokers failed in fetch topic metadata, context: ngx.timer, client: 120.244.107.247, server: 0.0.0.0:80
2019/06/23 17:48:33 [error] 30483#30483: *5489 [lua] client.lua:150: _fetch_metadata(): all brokers failed in fetch topic metadata, context: ngx.timer, client: 120.244.107.247, server: 0.0.0.0:80
2019/06/23 17:48:33 [error] 30483#30483: *5489 [lua] producer.lua:258: buffered messages send to kafka err: not found topic, retryable: true, topic: alanwalk, partition_id: -1, length: 1, context: ngx.timer, client: 120.244.107.247, server: 0.0.0.0:80
This is all the error logs.
I'm not sure your nginx can parse the
localhost
address.
@hgaong it should be this, you can use 127.0.0.1
instead of localhost
, both the lua side and the kafka side.
@doujiang24 I replaced localhost
with 127.0.0.1
and got this error log :
2019/06/23 18:07:27 [error] 31540#31540: *129 [lua] producer.lua:258: buffered messages send to kafka err: no resolver defined to resolve "iZ2ze89g20rp1sv4k9mxhrZ", retryable: true, topic: alanwalk, partition_id: 0, length: 2, context: ngx.timer, client: 120.244.107.247, server: 0.0.0.0:80
@doujiang24 I replaced
localhost
with127.0.0.1
and got this error log :2019/06/23 18:07:27 [error] 31540#31540: *129 [lua] producer.lua:258: buffered messages send to kafka err: no resolver defined to resolve "iZ2ze89g20rp1sv4k9mxhrZ", retryable: true, topic: alanwalk, partition_id: 0, length: 2, context: ngx.timer, client: 120.244.107.247, server: 0.0.0.0:80
Thank you very much. You're right. #5 Here I found the answer to this problem no resolver defined to resolve
.
producer.lua:258: buffered messages send to kafka err: not found topic, retryable: true, topic: alanwalk, partition_id: -1, length: 1
My Kafka and nginx are on the same machine.
my nginx.conf:
local broker_list = {
{ host = "localhost", port = 9092 },
}
local topic = "alanwalk"
my kafka topics:
$ bin/kafka-topics.sh --list --bootstrap-server localhost:9092
__consumer_offsets
alanwalk
my kafka server.properties:
listeners=PLAINTEXT://:9092
host.name=localhost
I hope to get your help.