I received this error when I ran the kafka container on docker.
Thereafter, I gave the following commands:
- docker exec -it /bin/sh #This starts the kafka container in interactive mode
- cd /opt/kafka
- ./bin/kafka-server-start.sh config/server.properties
I came across the solution to delete the folder which solved the issue for many, as stated here:
Apache kafka: Failed to acquire lock on file .lock in tmp/kafka-logs
However, when I try this, it forces the container to stop. Also, I cannot find any .lock file inside the folder.
Kindly help me with this!