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

查看:23
本文介绍了Kafka 1.0 因 FATAL 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 日志不起作用.您还必须清除动物园管理员.

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

解决步骤:

  1. 确保停止zookeeper.
  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.

    启动动物园管理员.

    <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
    

  • 通过查看日志/kafkaServer.out 日志文件来验证代理是否已启动.

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

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

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