简体   繁体   English

向主题发送消息时出现Kafka错误

[英]Kafka Error while sending messages to the topic

I am new to kafka, When I am trying to send messages to the topic I am getting below error. 我是kafka的新手,当我尝试向该主题发送消息时,出现错误。 Can someone help me with this? 有人可以帮我弄这个吗?

[2018-09-23 13:37:56,613] WARN [Producer clientId=console-producer] Connection to node -1 could not be established. [2018-09-23 13:37:56,613]警告[Producer clientId = console-producer]无法建立到节点-1的连接。 Broker may not be available. 经纪人可能不可用。 (org.apache.kafka.clients.NetworkClient) (org.apache.kafka.clients.NetworkClient)

If you're running Kafka in a cloud service, then you need to configure the listeners appropriately. 如果您在云服务中运行Kafka,则需要适当配置侦听器。 Almost certainly your client is connecting to the broker, but in the metadata returned by the broker getting an interal IP for the cloud network, which your external client cannot access. 几乎可以肯定,您的客户端正在连接到代理,但是在代理返回的元数据中,获取了外部客户端无法访问的云网络内部IP

This article explains it all, and the solution: https://rmoff.net/2018/08/02/kafka-listeners-explained/ 本文介绍了所有内容以及解决方案: https : //rmoff.net/2018/08/02/kafka-listeners-explained/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM