error[No partition metadata for topic test-1 due to kafka.common.LeaderNotAvailableException]
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:
- Stop
Kafka-server
andZookeeper-server
- Remove the data directories of both services, by default they are
/tmp/kafka-log
and/tmp/zookeeper
. - Start
Kafka-server
andZookeeper-server
again - 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]的更多相关文章
- 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 ...
- 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 ...
- 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 ...
- 报错:Error while fetching metadata with correlation id 67 : {alarmHis=LEADER_NOT_AVAILABLE}
报错背景: 单机安装了kafka,创建完成主题,启动生产者的时候产生报错现象.报错时持续不断打印日志信息. 报错现象: [-- ::,] WARN [Producer clientId=console ...
- kafka删除topic后再创建同名的topic报错(ERROR org.apache.kafka.common.errors.TopicExistsException)
[hadoop@datanode3 logs]$ kafka-topics.sh --delete --zookeeper datanode1:2181 --topic firstTopic firs ...
- 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. ...
- kafka集群中常见错误的解决方法:kafka.common.KafkaException: Should not set log end offset on partition
问题描述:kafka单台机器做集群操作是没有问题的,如果分布多台机器并且partitions或者备份的个数大于1都会报kafka.common.KafkaException: Should not s ...
- 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 ...
- Java API获取topic所占磁盘空间(Kafka 1.0.0)
很多用户都有这样的需求:实时监控某个topic各分区在broker上所占的磁盘空间大小总和.Kafka并没有提供直接的脚本工具用于统计这些数据. 如果依然要实现这个需求,一种方法是通过监控JMX指标得 ...
随机推荐
- Android——隐藏输入法的小技巧
今天偶然在百度地图提供的DEMO里看到这样一段代码.认为确实是个小技巧,就写下来分享一下. 针对的问题: 我们在开发android界面的时候,常常使用EditText控件.然后每次进入这个页面的时候, ...
- nyoj-647-奋斗小蜗牛在请客(进制转换)
奋斗小蜗牛在请客 时间限制:1000 ms | 内存限制:65535 KB 难度:2 描写叙述 一路艰辛一路收获.成功爬过金字塔的小蜗牛别提多高兴了.这不为了向以前帮助他的哥们们表达谢意,蜗牛宴请 ...
- 12. mysql show status
状态名 作用域 详解 Aborted_clients Global 因为client没有正确关闭连接导致client终止而中断的连接数 Aborted_connects Global 试图连接到MyS ...
- C# DispatcherTimer Start之后立即执行
如果DispatherTimer 的Interval 不是在实例化时赋值,那么Start之后,Tick方法会立即执行一次. DispatcherTimer timer = new Dispatcher ...
- 上机题目(中级)- 用小数形式输出指定符号出现的频率 (Java)
题目例如以下:
- 英语发音规则---R字母
英语发音规则---R字母 一.总结 一句话总结: 1.在词首和词中时,字母r常读作摩擦辅音/r/? red /red/ n. 红色 ruler /'ruːlə/ n. 尺:统治者 rub /rʌb/ ...
- vue-quill-editor 禁止编辑
每天学习一点点,知识财富涨点点 因为权限问题需要对富文本vue-quill-editor进行禁止编辑,因为也不是专业前端,处理起问题来还是只有看文档和百度,发现对这个提问不是很多,可能很多大牛都不会出 ...
- electron-vue中使用iview 报错this. is readonly的解决办法
title: electron-vue中使用iview 报错this. is readonly的解决办法 toc: false date: 2019-02-12 19:33:28 categories ...
- [转]SQL Server 数据库规范
SQL Server 数据库规范 一. 命名规范常用对象命名规范,使用帕斯卡命名法(Pascal,单词首字母大写),统一使用英文. 1. 表.英文单数名词,尽量写完整单词名称一般不超过3个英文单词都可 ...
- java中常用的转义字符
Day02_SHJavaTraing_4-3-2017 Java中允许使用转义字符‘\’来将其后的字符转变为特殊字符型常量. 一.JAVA中常用的转义字符