f
程序员文章站
2022-06-05 14:22:32
...
kafka常见错误整理
一、 flume正常运行,但是kafka接受不了消息,flume日志打印如下
2019-01-18 10:13:44,762 (SinkRunner-PollingRunner-DefaultSinkProcessor) [INFO - kafka.utils.Logging$class.info(Logging.scala:68)] Fetching metadata from broker id:0,host:hadoop01,port:9092 with correlation id 9 for 1 topic(s) Set(weblog)
2019-01-18 10:13:44,763 (SinkRunner-PollingRunner-DefaultSinkProcessor) [INFO - kafka.utils.Logging$class.info(Logging.scala:68)] Connected to hadoop01:9092 for producing
2019-01-18 10:13:44,765 (SinkRunner-PollingRunner-DefaultSinkProcessor) [INFO - kafka.utils.Logging$class.info(Logging.scala:68)] Disconnecting from hadoop01:9092
2019-01-18 10:13:44,766 (SinkRunner-PollingRunner-DefaultSinkProcessor) [INFO - kafka.utils.Logging$class.info(Logging.scala:68)] Disconnecting from hadoop01:9092
2019-01-18 10:13:44,769 (SinkRunner-PollingRunner-DefaultSinkProcessor) [INFO - kafka.utils.Logging$class.info(Logging.scala:68)] Connected to hadoop01:9092 for producing
2019-01-18 10:13:44,771 (SinkRunner-PollingRunner-DefaultSinkProcessor) [WARN - kafka.utils.Logging$class.warn(Logging.scala:83)] Produce request with correlation id 11 failed due to [weblog,0]: kafka.common.NotLeaderForPartitionException
根据NotLeaderForPartitionException可以知道是broker中没有leader导致的异常。我是先创了一个weblog的topic,然后宕掉了其中一台,刚好那台主机是leader,所以导致异常。解决办法:删掉weblog节点,去除宕掉的那台。或者重新启动宕掉的那台。
推荐阅读
-
Prototype 学习 工具函数学习($w,$F方法)_prototype
-
小米预告片暗示新机即将登场:POCO F2来袭
-
时隔一年多 小米POCO系列来了:新机F2 Lite曝光
-
flv f4v mp4 视频播放器代码
-
华为MA5200F无法创建PORTVLAN的问题
-
小米POCO F2确认:高性价比 非Redmi K30 Pro
-
F版本SpringCloud1—大白话为啥要有微服务?啥是微服务?SpringCloud为什么有那么多组件?
-
POJ 3126 Prime Path (BFS) (F)
-
Oracle X$ tables – Part 1 – Where do they get their data f
-
电脑开机要按f1才能继续启动进入系统的解决方法