http://stackoverflow.com/questions/23228222/running-into-leadernotavailableexception-when-using-kafka-0-8-1-with-zookeeper-3

Kafka uses an external coordination framework (by default Zookeeper) to maintain configuration. It seems the configuration is now out-of-sync with the Kafka log data. In this case, I'd remove affected topic data and related Zookeeper data.

For Test Environment:

  1. Stop Kafka-server and Zookeeper-server
  2. Remove the data directories of both services, by default they are /tmp/kafka-log and /tmp/zookeeper.
  3. Start Kafka-server and Zookeeper-server again
  4. Create a new topic

Now you are able to work with the topic again.

For Production Environment:

As the Kafka topics are stored in different directories, you should remove particular directories. You should also remove /brokers/{broker_id}/topics/{broken_topic} from
Zookeeper by using a Zookeeper client.

Please read Kafka documentation carefully to make sure the configuration structure, before you do anything stupid. Kafka is rolling out a delete
topic feature (KAFKA-330),
so that the problem can be solved more easily.

error[No partition metadata for topic test-1 due to kafka.common.LeaderNotAvailableException]的更多相关文章

  1. Kafka:ZK+Kafka+Spark Streaming集群环境搭建(二十六)Structured Streaming:WARN clients.NetworkClient: Error while fetching metadata with correlation id 1 : {my-topic=LEADER_NOT_AVAILABLE}

    问题描述: 我之前使用kafka的命令删除了改topic: ./kafka-topics.sh --delete --zookeeper [zookeeper server]  --topic [to ...

  2. ERROR: The partition with /var/lib/mysql is too full! failed!

    发现:ERROR: The partition with /var/lib/mysql is too full! failed! 然后df -h 发现硬盘100%   于是分析到底什么占用了这近两百G ...

  3. Error when sending message to topic test with key: null, value: 2 bytes with error: (org.apache.kafka.clients.producer.internals.ErrorLoggingCallback)

    windows下使用kafka遇到这个问题: Error when sending message to topic test with key: null, value: 2 bytes with ...

  4. 报错:Error while fetching metadata with correlation id 67 : {alarmHis=LEADER_NOT_AVAILABLE}

    报错背景: 单机安装了kafka,创建完成主题,启动生产者的时候产生报错现象.报错时持续不断打印日志信息. 报错现象: [-- ::,] WARN [Producer clientId=console ...

  5. kafka删除topic后再创建同名的topic报错(ERROR org.apache.kafka.common.errors.TopicExistsException)

    [hadoop@datanode3 logs]$ kafka-topics.sh --delete --zookeeper datanode1:2181 --topic firstTopic firs ...

  6. Kafka topic Schema version mismatch error - org.apache.kafka.common.protocol.types.SchemaException

    Problem description: There is error messge when run spark app using spark streaming Kafka version 0. ...

  7. kafka集群中常见错误的解决方法:kafka.common.KafkaException: Should not set log end offset on partition

    问题描述:kafka单台机器做集群操作是没有问题的,如果分布多台机器并且partitions或者备份的个数大于1都会报kafka.common.KafkaException: Should not s ...

  8. org.apache.kafka.common.errors.SerializationException: Error deserializing... Caused by: org.apache.kafka.common.errors.SerializationException: Size of data received by IntegerDeserializer is not 4

    原因,最近开发的kafka消息接收,突然报如下错: org.apache.kafka.common.errors.SerializationException: Error deserializing ...

  9. Java API获取topic所占磁盘空间(Kafka 1.0.0)

    很多用户都有这样的需求:实时监控某个topic各分区在broker上所占的磁盘空间大小总和.Kafka并没有提供直接的脚本工具用于统计这些数据. 如果依然要实现这个需求,一种方法是通过监控JMX指标得 ...

随机推荐

  1. android 虚拟按键是通过哪种机制上报的?

    1.在normal mode下,tp button也是和其他触摸事件一样,以坐标形式的input_event进行上报.在初始化时会通过tpd_button_setting()函数依据定义在tpd_cu ...

  2. 深入理解Oracle索引(1):INDEX SKIP SCAN 和 INDEX RANGE SCAN

    ㈠ Index SKIP SCAN                当表有一个复合索引,而在查询中有除了索引中第一列的其他列作为条件,并且优化器模式为CBO,这时候查询计划就有可能使用到SS       ...

  3. 3d touch 的使用(一)

    废话不多说,直接上代码------------------ 在 - (BOOL)application:(UIApplication *)application didFinishLaunchingW ...

  4. ffmpeg x264编译与使用介绍

    问题1:我用的是最新版本的ffmpeg和x264,刚刚编译出来,编译没有问题,但是在linux 环境使用ffmpeg的库时发现报错error C3861: 'UINT64_C': identifier ...

  5. Jq自定义的方法绑定树结构

    1.先上效果图  (借鉴博客) 2.这边不做样式的只做结构 function toTreeData(data) { var pos = {}; var tree = []; var i = 0; wh ...

  6. solarwinds之配置系统管理(System manager)

    配置windows的 1.  打开System Manager   2.  点击new新加一个接口   3.  选择要监控的资源   4.  确认好自己要监控的资源后如下   5.  这里以监控内存使 ...

  7. DataTables入门

    转载 https://blog.csdn.net/gfd54gd5f46/article/details/65938189

  8. bootstrap-导航条

    默认样式的导航条 导航条是在您的应用或网站中作为导航页头的响应式基础组件.它们在移动设备上可以折叠(并且可开可关),且在视口(viewport)宽度增加时逐渐变为水平展开模式. 两端对齐的导航条导航链 ...

  9. Java入门基础—面向对象开发

    Java是一门面向对象编程语言,不仅吸收了C++语言的各种优点,还摒弃了C++里难以理解的多继承.指针等概念,因此Java语言具有功能强大和简单易用两个特征.Java语言作为静态面向对象编程语言的代表 ...

  10. jQuery优化性能的十种方法

    1,总是从ID选择器开始继承 例如: <div id="content"> <form method="post" action=" ...