Springboot连接kafka异常Failed to update metadata after 60000 ms.

异常信息:

[Consumer clientId=consumer-1, groupId=test] Connection to node -1 could not be established. Broker may not be available.
 WARN 10176 --- [ad | producer-1] org.apache.kafka.clients.NetworkClient   : [Producer clientId=producer-1] Connection to node -1 could not be established. Broker may not be available.

org.apache.kafka.common.errors.TimeoutException: Failed to update metadata after 60000 ms.

今天使用springboot整合kafka连接的时候异常

是因为我kafka的config/server.properties文件中配置的是

listeners=PLAINTEXT://localhots:9092

只要将将其修改为listeners=PLAINTEXT://你的ip地址:9092

即可


版权声明:本文为yjt520557原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。