美文网首页
kafka无法消费

kafka无法消费

作者: adonisjph | 来源:发表于2018-06-19 15:57 被阅读213次

    自己动手写了一个kafka消费实例,但是执行时总是报错:

    2018-06-19 15:40:24.146 INFO  AbstractCoordinator - [Consumer clientId=consumer-1, groupId=dfp] Marking the coordinator localhost:9092 (id: 2147483647 rack: null) dead
    2018-06-19 15:40:25.153 WARN  NetworkClient - [Consumer clientId=consumer-1, groupId=dfp] Connection to node 0 could not be established. Broker may not be available.
    2018-06-19 15:40:26.206 WARN  NetworkClient - [Consumer clientId=consumer-1, groupId=dfp] Connection to node 0 could not be established. Broker may not be available.
    2018-06-19 15:40:27.311 WARN  NetworkClient - [Consumer clientId=consumer-1, groupId=dfp] Connection to node 0 could not be established. Broker may not be available.
    2018-06-19 15:40:28.514 WARN  NetworkClient - [Consumer clientId=consumer-1, groupId=dfp] Connection to node 0 could not be established. Broker may not be available.
    

    在kafka的配置文件server.properties中添加设置如下:

    listeners=PLAINTEXT://10.100.1.200:9092
    

    即可解决问题。

    相关文章

      网友评论

          本文标题:kafka无法消费

          本文链接:https://www.haomeiwen.com/subject/kcnaeftx.html