Exception during topic deletion when Kafka is hosted in Docker in Windows

后端 未结 6 2172
遇见更好的自我
遇见更好的自我 2021-02-15 14:14

I host Kafka in Docker in Windows. Wurstmeister/Kafka docker image is used. Kafka data is stored in local Windows folder for persistency. Windows folder is mapped to Kafka docke

6条回答
  •  臣服心动
    2021-02-15 14:56

    This issue still exists in Windows for Kafka ver 1.1.0 (kafka_2.12-1.1.0) when I try to delete the topic.

    The topic gets marked for deletion and the Kafka server fails with java.nio.file.AccessDeniedException when trying to rename the logs directory 'test-0'

    Deleting the whole test-0 logs folder does not help. Reinstalling the Kafka server does not help either - even after reinstalling, the info about the topic marked for deletion remains.

    Took me a couple of hours to figure out that the info about the topic sits in the Zookeeper - in one of the log files!

    Solution

    Stop the Zookeeper process. Go to your Zookeeper logs folder zookeeper-3.x.x\bin\zookeeper-3.x.xdata\version-2\ and delete the latest log.xx files. Restart Zookeper. Restart Kafka server.

提交回复
热议问题