doujiang24 / lua-resty-kafka

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

send err:tmp.cn could not be resolved #57

Closed JLLNANA closed 6 years ago

JLLNANA commented 6 years ago

Server1: ip is 100.100.100.101(something like this) There are nginx, lua-resty-kafka, interface which will be called using http protocol. The interface will call lua-resty-kafka as producer Server2: ip is 200.100.100.101(something like this) Kafka running on server2 in single mode. Server2 's /etc/hosts content is: 127.0.0.1 localhost ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 200.100.100.101 tmp.cn

When i run the interface on server1, it will give error send err:tmp.cn could not be resolved I already use issue#5 for reference to set parameters On server2, set host.name=127.0.0.1 or host.name=200.100.100.101 and On server 1, nginx configuration set resolver 200.100.100.101 restart nginx on server1 These methods still can not solve my problem It still give out this error

I wonder why it need to access domain name of kafka server, only ip address and port is not enough to communicate with kafka server? Thank you

JLLNANA commented 6 years ago

add some information On server2 /etc/sysconfig/network one line setting is HOSTNAME=tmp.cn

JLLNANA commented 6 years ago

the problem is solved some kafka configuration problem