Kafka侦听器错误:2个分区具有领导者经纪人而没有匹配的侦听器

时间:2019-07-16 13:26:15

标签: amazon-web-services apache-kafka

我已经在我的AWS服务器上部署了2位工作人员,3位经纪人和3位动物园管理员的融合平台。当我启动Kafka时,我不断收到以下错误:

[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)........

我的server.properties文件最初看起来像这样:

# 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 

我已使用以下值更新server.properties文件中的字段侦听器和advertised.listeners:

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

结果给出相同的错误。我还尝试添加所有三个代理的IP,以逗号分隔,但是对于所有三个IP,它给出了相同端口的错误。

现在我很困惑,这里的侦听器需要经纪人或工作人员的IP,因为我对工作人员的IP尝试了相同的操作,结果没有不同。

有人可以帮我详细了解收听者并刊登广告吗?监听程序,因为我是新手,因此无法确定正确的配置?

0 个答案:

没有答案