zoukankan      html  css  js  c++  java
  • kafka学习-坑篇

    安装(滤过)

    启动(滤过)

    坑(开始)---

    topic creat完成后准备使用console-produce发布一个topic,错误如下:

    [2018-06-12 14:51:15,514] WARN [Producer clientId=console-producer] Error while fetching metadata with correlation id 3 : {first=LEADER_NOT_AVAILABLE} (org.apache.kafka.clients.NetworkClient)
    [2018-06-12 14:51:15,655] WARN [Producer clientId=console-producer] Error while fetching metadata with correlation id 4 : {first=LEADER_NOT_AVAILABLE} (org.apache.kafka.clients.NetworkClient)
    [2018-06-12 14:51:15,761] WARN [Producer clientId=console-producer] Error while fetching metadata with correlation id 5 : {first=LEADER_NOT_AVAILABLE} (org.apache.kafka.clients.NetworkClient)
    [2018-06-12 14:51:15,868] WARN [Producer clientId=console-producer] Error while fetching metadata with correlation id 6 : {first=LEADER_NOT_AVAILABLE} (org.apache.kafka.clients.NetworkClient)
    [2018-06-12 14:51:15,975] WARN [Producer clientId=console-producer] Error while fetching metadata with correlation id 7 : {first=LEADER_NOT_AVAILABLE} (org.apache.kafka.clients.NetworkClient)
    [2018-06-12 14:51:16,083] WARN [Producer clientId=console-producer] Error while fetching metadata with correlation id 8 : {first=LEADER_NOT_AVAILABLE} (org.apache.kafka.clients.NetworkClient)
    [2018-06-12 14:51:16,189] WARN [Producer clientId=console-producer] Error while fetching metadata with correlation id 9 : {first=LEADER_NOT_AVAILABLE} (org.apache.kafka.clients.NetworkClient)

    解决方案:

    修改kafka的server.properties的配置

    listeners=PLAINTEXT://:9092

    修改为

    port=9092
    host.name=x.x.x.x #配置相应的服务器的IP地址即可。

    重启后,生效。

  • 相关阅读:
    序列化与反序列化之Kryo
    集合框架
    dubbo配置方式简单介绍
    sql(Oracle)优化之索引
    多级反向代理下,Java获取请求客户端的真实IP地址多中方法整合
    Storm 性能优化
    web.xml配置重理解
    Java各个版本的新特性
    这两天光写shell了,再贴一段代码,以供日后参考。
    Hadoop常用操作笔记
  • 原文地址:https://www.cnblogs.com/MJyc/p/10734480.html
Copyright © 2011-2022 走看看