【问题标题】:kafka connect could not be established to the kafka broker无法与 kafka 代理建立 kafka 连接
【发布时间】:2020-08-06 00:37:52
【问题描述】:

我正在使用mac并通过安装zookeeper和kafka

brew install confluent-platform

通过使用以下命令,

zookeeper-server-start /usr/local/etc/kafka/zookeeper.properties
kafka-server-start /usr/local/etc/kafka/server.properties
connect-distributed /usr/local/etc/kafka/connect-distributed.properties

但是连接器显示以下消息,例如

[2020-08-05 09:53:40,222] WARN [Producer clientId=inventory-connector2-dbhistory] Connection to node -1 (kafka/223.82.248.117:9092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient:756)
[2020-08-05 09:53:40,230] WARN [Producer clientId=inventory-connector2-dbhistory] Bootstrap broker kafka:9092 (id: -1 rack: null) disconnected (org.apache.kafka.clients.NetworkClient:1024)
[2020-08-05 09:53:40,427] WARN [Producer clientId=inventory-connector-dbhistory] Connection to node -1 (kafka/223.82.248.117:9092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient:756)

我在 localhost 中启动了 kafka 代理,但消息显示代理的地址是 223.82.248.117:9092。

我该如何解决?

【问题讨论】:

    标签: apache-kafka apache-kafka-connect


    【解决方案1】:

    您需要将server.properties 中的advertised.listeners 设置为localhost:9092

    然后将bootstrap.servers 中的connect-*.properties 也指向那里

    【讨论】:

      猜你喜欢
      • 2021-02-06
      • 1970-01-01
      • 1970-01-01
      • 2021-10-04
      • 2018-10-18
      • 2021-12-22
      • 1970-01-01
      • 2018-10-21
      • 1970-01-01
      相关资源
      最近更新 更多