2

I've deployed the confluent platform with 2 workers, 3 brokers, and 3 zookeepers on my AWS server. When I start Kafka I get the following error continuously :

[2019-07-16 12:47:25,126] WARN [Consumer clientId=consumer-4, 
groupId=connect-jdbc-mysql-sink-connector] 2 partitions have leader brokers without a matching listener, including [mysql-debezium- mysql-server.ypdev.yp_user_avro-2, mysql-debezium-mysql-server.ypdev.yp_user_avro-3] 
(org.apache.kafka.clients.NetworkClient:961)
[2019-07-16 12:47:25,226] WARN [Consumer clientId=consumer-4, groupId=connect-jdbc-mysql-sink-connector] 2 partitions have leader brokers without a matching listener, including [mysql-debezium-mysql-server.ypdev.yp_user_avro-2, mysql-debezium-mysql-server.ypdev.yp_user_avro-3] 
(org.apache.kafka.clients.NetworkClient:961)
[2019-07-16 12:47:25,326] WARN [Consumer clientId=consumer-4, groupId=connect-jdbc-mysql-sink-connector] 2 partitions have leader brokers without a matching listener, including [mysql-debezium-mysql-server.ypdev.yp_user_avro-2, mysql-debezium-mysql-server.ypdev.yp_user_avro-3] 
(org.apache.kafka.clients.NetworkClient:961)........

My server.properties file looks something like this initially:

# The id of the broker. This must be set to a unique integer for each broker.
# broker.id=-1

############################# Socket Server Settings #############################

# The address the socket server listens on. It will get the value returned from 
# java.net.InetAddress.getCanonicalHostName() if not configured.
#   FORMAT:
#     listeners = listener_name://host_name:port
#   EXAMPLE:
#     listeners = PLAINTEXT://your.host.name:9092
listeners=PLAINTEXT://0.0.0.0:9092

# Hostname and port the broker will advertise to producers and consumers. If not set, 
# it uses the value for "listeners" if configured.  Otherwise, it will use the value
# returned from java.net.InetAddress.getCanonicalHostName().
advertised.listeners=PLAINTEXT://ec2-xx-xxx-xxx-xx.ap-south-1.compute.amazonaws.com:9092

# Maps listener names to security protocols, the default is for them to be the same. See the config documentation for more details

#listener.security.protocol.map=PLAINTEXT:PLAINTEXT,
SSL:SSL,SASL_PLAINTEXT:SASL_PLAINTEXT,SASL_SSL:SASL_SSL 

I have updated the field listeners and advertised.listeners in the server.properties file with the following values :

listeners=PLAINTEXT://<private-ip of broker>:9092
advertised.listeners=PLAINTEXT://<public-ip of broker>:9092

The result gives the same error. I also tried to add all three brokers' IP comma-separated but it gives an error of the same port for all three IPs.

Now I am confused that the listeners here need the IP of brokers or workers because I have tried the same with worker' IP and the result was not different.

Can somebody help me in detail regarding listeners and advertised. listeners according to my setup as I am new to it and unable to figure the correct configurations?

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
Asish
  • 21
  • 1
  • 11
  • Does this answer your question? [Why could Kafka warn "partitions have leader brokers without a matching listener"?](https://stackoverflow.com/questions/53571823/why-could-kafka-warn-partitions-have-leader-brokers-without-a-matching-listener) – Jacek Laskowski Feb 23 '20 at 13:33

0 Answers0