title: Kafka listener error : 2 partitions have leader brokers without a matching listener
body: <p>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 :</p>
  
  <pre><code>[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)........
  </code></pre>
  
  <p>My server.properties file looks something like this initially:</p>
  
  <pre><code># 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 
  </code></pre>
  
  <p>I have updated the field listeners and advertised.listeners in the server.properties file with the following values :</p>
  
  <pre><code>listeners=PLAINTEXT://&lt;private-ip of broker&gt;:9092
  advertised.listeners=PLAINTEXT://&lt;public-ip of broker&gt;:9092
  </code></pre>
  
  <p>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. </p>
  
  <p><strong>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.</strong></p>
  
  <p>Can somebody help me in detail regarding <strong>listeners and advertised. listeners</strong> according to my setup as I am new to it and unable to figure the correct configurations?</p>