"Time":
2016/4/8 17:30
"Problem":
Kafka An error occurred while executing the consumer instance.
The Kafka configuration file Server.properties is as follows:
Zookeeper configuration file Zoo.cfg content is as follows:
The implementation code for consumer is as follows:
Where the static class is defined as follows:
The common approach is implemented as follows:
"Survey":
(1) Look at the Linux firewall settings service iptables status, found not closed. However, the problem persists after closing.
• Immediate effect, fail after reboot
Open: Service iptables start
Close: Service iptables stop
• Effective after reboot
Open: Chkconfig iptables on
OFF: Chkconfig iptables off
(2) Look at the salary status of the cluster.
Confirm that the zookeeper has started normally.
Confirm that the Kafka cluster has started normally.
(3) The final discovery is caused by the existence of half-width spaces in the definition of constants.
Correct: "192.168.93.128:2181,192.168.93.129:2181,192.168.93.130:2181";
Error: "192.168.93.128:2181, 192.168.93.129:2181, 192.168.93.130:2181";
The result of the modification is as follows:
" normal operation of consumer instances":
--end--
Java.net.UnknownHostException error occurred while executing consumer