kafka loses all topics on reboot

前端 未结 3 702
余生分开走
余生分开走 2020-12-19 01:55

I\'m trying out Kafka (0.8.2.1) in a VM, but am having trouble with it: though everything is fine while the machine remains on (even if I restart ZK/Kafka), if I reboot the

3条回答
  •  心在旅途
    2020-12-19 02:18

    This happens because the tmp folder get cleared out on reboot.

    To fix this issue, do the following.

    Go to you kafka installation directory and search for the file server.properties. You should see a section as below

    A comma separated list of directories under which to store log files
    log.dirs=/tmp/kafka-logs

    Change the logs.dir to something more local or a custom dir like this. log.dirs=/Users/xxx/yyy/software/confluent-5.3.1/mydata

    Reboot your kafka cluster for the changes to take effect. Reboot your system and you will see the Topics are still present.

提交回复
热议问题