Kafka 1.0停止并显示FAULT SHUTDOWN错误.日志目录失败 [英] Kafka 1.0 stops with FATAL SHUTDOWN error. Logs directory failed

查看:675
本文介绍了Kafka 1.0停止并显示FAULT SHUTDOWN错误.日志目录失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚升级到Kafka 1.0和zookeeper 3.4.10,起初一切都很好.独立-生产者和消费者都按预期工作.在我运行了大约10分钟的代码后,Kafka失败,并显示以下错误:

I have just upgraded to Kafka 1.0 and zookeeper 3.4.10.At first, it all started fine. Stand - alone producer and consumer worked as expected. After I've ran my code for about 10 minutes, Kafka fails with this error:

[2017-11-07 16:48:01,304]信息停止在目录C:\ Kafka \ kafka_2.12-1.0.0 \ kafka-logs(kafka.log.LogManager)中提供日志

[2017-11-07 16:48:01,304] INFO Stopping serving logs in dir C:\Kafka\kafka_2.12-1.0.0\kafka-logs (kafka.log.LogManager)

[2017-11-07 16:48:01,320]致命关闭代理,因为C:\ Kafka \ kafka_2.12-1.0.0 \ kafka-logs中的所有日志目录均已失败(kafka.log.LogManager)

[2017-11-07 16:48:01,320] FATAL Shutdown broker because all log dirs in C:\Kafka\kafka_2.12-1.0.0\kafka-logs have failed (kafka.log.LogManager)

我再次重新安装并重新配置了Kafka 1.0,发生了同样的事情.如果我尝试重新启动,则会发生相同的错误.

I have reinstalled and reconfigured Kafka 1.0 again, the same thing happened. If I try to restart, the same error occurs.

删除日志文件有助于启动Kafka,但短期运行后再次失败.

Deleting log files helps to start Kafka, but it fails again after the short run.

我已经运行0.10.2版本很长时间了,从未遇到过类似的情况,它在很长一段时间内都非常稳定.

I have been running 0.10.2 version for a long while, and never encountered anything like this, it was very stable over the long periods of time.

我试图找到一种解决方案,并按照文档中的说明进行操作.

I have tried to find a solution and followed instructions in the documentation.

这还不是生产环境,它的设置非常简单,一个生产者,一个消费者从一个主题中阅读.

This is not yet a production environment, it is fairly simple setup, one producer, one consumer reading from one topic.

我不确定这是否与动物园管理员有关.

I am not sure if this could have anything to do with zookeeper.

**更新:**问题已发布在 Apache JIRA开发板 到目前为止,共识似乎是Windows问题.

**Update: ** the issue has been posted at Apache JIRA board The consensus so far seems to be that it is a Windows issue.

推荐答案

也遇到了此问题,仅清除kafka日志无效.您还必须清除Zookeeper.

Ran into this issue as well, and only clearing the kafka-logs did not work. You'll also have to clear zookeeper.

解决步骤:

  1. 确保停止动物园管理员.
  2. 查看您的server.properties文件,并在以下条目下找到日志目录.

  1. Make sure to stop zookeeper.
  2. Take a look at your server.properties file and locate the logs directory under the following entry.

Example:
log.dirs=/tmp/kafka-logs/

  • 删除日志目录及其内容.一旦再次启动,Kafka将重新创建目录.

  • Delete the log directory and its contents. Kafka will recreate the directory once it's started again.

    看一下zookeeper.properties文件,并在以下条目下找到数据目录.

    Take a look at the zookeeper.properties file and locate the data directory under the following entry.

    Example:
    dataDir=/tmp/zookeeper
    

  • 删除数据目录及其内容.一旦再次启动,Zookeeper将重新创建目录.

  • Delete the data directory and its contents. Zookeeper will recreate the directory once it's started again.

    启动Zookeeper.

    Start zookeeper.

    <KAFKA_HOME>bin/zookeeper-server-start.sh -daemon <KAFKA_HOME>config/zookeeper.properties
    

  • 启动kakfa经纪人.

  • Start the kakfa broker.

    <KAFKA_HOME>bin/kafka-server-start.sh -daemon <KAFKA_HOME>config/server.properties
    

  • 通过查看logs/kafkaServer.out日志文件来验证代理是否已开始正常运行.

  • Verify the broker has started with no issues by looking at the logs/kafkaServer.out log file.

    这篇关于Kafka 1.0停止并显示FAULT SHUTDOWN错误.日志目录失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    相关文章
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆