Closed esha- closed 8 years ago
first, we request for the metadata through the kafka metadata api, and kafka return the host "esha", this is ok but nginx can not resolver "esha" that because nginx can only resolver a name from dns server ( yeah, even can not resolver from /etc/hosts)
the simple way is config host.name in config/server.properties to kafka server, may be:
host.name=127.0.0.1
this means we direct use ip instead http://kafka.apache.org/documentation.html#brokerconfigs
another may is to build a dns server can resolver "esha", and config reslover to it in nginx.conf
thanks for your feedback, I'll add a notice in README :)
Thanks=) Your answer is very useful for me!
Also I found another way.
I added in nginx.conf (http block):
resolver 127.0.1.1;
such as ip in my /etc/resolv.conf.
Consider it resolved.
i have a same problem,i am use this way: modify server.properties in kafka server, add:listeners=PLAINTEXT://kafkaip:9092
Have the same problem with docker. And [resolver 127.0.0.11 valid=10s;
] doesn't help.
# cat /etc/resolv.conf
nameserver 127.0.0.11
But I can send messages directly from the container (host in extra_hosts
[yml
]).
Does anyone know how to solve it?
Hello! May be you can help me. I have some producer:
I get responce:
no resolver defined to resolve "esha"
I searched about nginx resolver, but not solve my problem. In my /etc/resolv.conf:nameserver 127.0.1.1
In my /etc/hosts:Where "esha" in error? If i have "localhost" in broker list ?
Now, i solve problem use "stub" in /producer.lua:
What would you recommend?