kafka连接生产者(消费者其实也一样的问题)出现了下面这个报错:(

WARN [Producer clientId=console-producer] Connection to node -1 could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)

找到配置文件

WARN [Producer clientId=console-producer] Connection to node -1 could not be established. Broker may

在配置plaintext的时候,地址配置的是master(master是我在/etc/hosts文件里面配置的127.0.0.1),而我连接的时候,使用的是:

 bin/kafka-console-producer.sh --broker-list localhost:9092 --topic test

改为:

 bin/kafka-console-producer.sh --broker-list master:9092 --topic test

perfect,完美的解决了(生产者也一样哦)

真的很奇怪,为什么不能自动转换过来



相关文章:

  • 2021-07-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-03
  • 2021-07-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-15
  • 2022-12-23
  • 2022-12-23
  • 2021-11-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案