SpringBoot整合kafka报could not be established. Broker may not be available.

太过爱你忘了你带给我的痛 2023-05-29 02:37 121阅读 0赞

SpringBoot整合kafka报could not be established. Broker may not be available.

报错日志

  1. [AdminClient clientId=adminclient-1] Connection to node 0 (localhost/127.0.0.1:9092) could not be established. Broker may not be available.
  2. [AdminClient clientId=adminclient-1] Connection to node 0 (localhost/127 .0.0.1:9092) could not be established. Broker may not be available.
  3. [AdminClient client Id=adminclient-1] Connection to node 0 (localhost/127 .0.0.1:9092) could not be established. Broker may not be available.
  4. [AdminClient clientId= adminclient-1] Connection to node 0 (localhost/127 .0.0.1:9092) could not be established. Broker may not be available.
  5. [AdminClient clientId=adminclient-1] Connection to node 0 (localhost/127 .0.0.1:9092) could not be established. Broker may not be available.
  6. [AdminClient client Id=adminclient-1] Connection to node 0 (localhost/127 .0.0.1:9092) could not be established. Broker may not be available.
  7. [ AdminClient client Id-adminclient-1] Connection to node 0 (localhost/127 .0.0.1:9092) could not be established. Broker may not be available.
  8. [AdminClient client Id=adminclient-1] Connection to node 0 (localhost/127 .0.0.1:9092) could not be established. Broker may not be available.

解决,修改kafka的server.properties

  1. listeners=PLAINTEXT://kafka-host:9092
  2. advertised.listeners=PLAINTEXT://kafka-host:9092

例如:
在这里插入图片描述

发表评论

表情:
评论列表 (有 0 条评论,121人围观)

还没有评论,来说两句吧...

相关阅读