kafka在windows server 2012上因日志目录而崩溃

dauxcl2d  于 2021-06-04  发布在  Kafka
关注(0)|答案(0)|浏览(420)

每18-20小时后 Kafka 由于以下原因,服务一直出错 log 错误。

我看过很多帖子,都提到 double backslash\\ 或删除上一个日志并启动 Kafka 再次服务。
但这确实会启动 Kafka 但它一次又一次地遇到同样的问题。
我们如何永久性地修复它 production 准备好了吗?
还有,有没有什么方法可以让我有一个回退机制 kafka 不管什么原因失败,它会自动重启吗?
下面是我的一段 server.properties .

  1. ############################# Log Basics #############################
  2. # A comma separated list of directories under which to store log files
  3. log.dirs=c:\\kafka\\kafka-logs-cos10
  4. ############################# Log Retention Policy #############################
  5. # The following configurations control the disposal of log segments. The policy can
  6. # be set to delete segments after a period of time, or after a given size has accumulated.
  7. # A segment will be deleted whenever *either* of these criteria are met. Deletion always happens
  8. # from the end of the log.
  9. # The minimum age of a log file to be eligible for deletion due to age
  10. log.retention.hours=1
  11. # A size-based retention policy for logs. Segments are pruned from the log unless the remaining
  12. # segments drop below log.retention.bytes. Functions independently of log.retention.hours.
  13. # log.retention.bytes=1073741824
  14. # The maximum size of a log segment file. When this size is reached a new log segment will be created.
  15. log.segment.bytes=1073741824
  16. # The interval at which log segments are checked to see if they can be deleted according
  17. # to the retention policies
  18. log.retention.check.interval.ms=300000
  19. ############################# Zookeeper #############################
  20. # Zookeeper connection string (see zookeeper docs for details).
  21. # This is a comma separated host:port pairs, each corresponding to a zk
  22. # server. e.g. "127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002".
  23. # You can also append an optional chroot string to the urls to specify the
  24. # root directory for all kafka znodes.
  25. zookeeper.connect=localhost:2181
  26. # Timeout in ms for connecting to zookeeper
  27. zookeeper.connection.timeout.ms=18000

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题