Kafka producer production data to Kafka exception: Got error produce response with correlation ID-on topic-partition ... Error:network_exception1. Description of the problem
2017-09-13 15:11:30.656 o.a.k.c.p.i.Sender [WARN] Got error produce response with correlation id 25 on topic-partition test2-rtb-camp-pc-hz-5, retrying (299 attempts left). Error: NETWORK_EXCEPTION
2017-09-13 15:11:30.656 o.a.k.c.p.i.Sender [WARN] Got error produce response with correlation id 25 on topic-partition test2-rtb-camp-pc-hz-23, retrying (299 attempts left). Error: NETWORK_EXCEPTION
2017-09-13 15:11:30.657 o.a.k.c.p.i.Sender [WARN] Got error produce response with correlation id 25 on topic-partition test2-rtb-camp-pc-hz-14, retrying (299 attempts left). Error: NETWORK_EXCEPTION
2017-09-13 15:11:30.657 o.a.k.c.p.i.Sender [WARN] Got error produce response with correlation id 16 on topic-partition test2-rtb-camp-pc-hz-5, retrying (299 attempts left). Error: NETWORK_EXCEPTION
2. Cause of the problem$KAFKA _home/config/server.properties have the following comments:The main idea is that each broker in Kafka will notify the producer and the consumer of hostname and port, and if listeners is configured, he returns the value of listeners, otherwise The Java.net.InetAddress.getCanonicalHostName () is called, and this method returns the hostname of the Linux host, not the IP. Therefore, in the construction of Kafka need to configure listeners this parameter, preferably also with Host.name=ip.
Kafka producer production data to Kafka exception: Got error produce response with correlation ID-on topic-partition ... Error:network_exception