I searched a lot of information on the Internet.
Say is the zookeeper problem, modify the server.properties under Host.name,zookeeper.connect localhost for the IP address
It doesn't work.
Then a separate project was built and found no problem. The conclusion is that jar package conflict, delete jar package individually, is log4j version is too low and requires 1.2.12 or more versions
Final Problem Solving
Summarize:
First, actually this problem can be solved earlier, but because I did not look closely at the log, all cards took me two days of time. It's all about the error log, not the warning log.
Log4j:warn No Appenders could is found for logger (kafka.utils.VerifiableProperties).
Log4j:warn Initialize the log4j system properly.
Slf4j:this version of SLF4J requires log4j version 1.2.12 or later. See also Http://www.slf4j.org/codes.html#log4j_version
Exception in thread "main" kafka.common.FailedToSendMessageException:Failed to send messages after 3 tries.
Second, the public jar package as far as possible to use the high version of things.
Third, Kafka if use ip,localhost may not have data
Kafka Failed to send messages after 3 tries.