Kafka does not start correct
In some cases the kafka container does not startup correctly so the services are unable to publish/... their data.
An indicator for that situation seems to be the fact that kafka starts a new broker with id != 1001 on the inital start and the services run into a timeout.
At the moment the following workaround seems to fix the problem:
- Stopping kafka
- Getting the implicit created docker volume by running
docker volume kafkaand note the volume id - Executing a
docker-compose down kafka - Deleting the volume by the id
At the moment this issue seems to affect Windows 10 + Docker and Debian 10 + Docker
What steps do you took to get to this point?
The Issue is not reproducible with 100% but it seems like that stopping the kafka container fails sometimes. On the next startup some "fragments" from the previous execution obviously cause the issues.
Ah okay. Seems like, I figured out whats the problem. If you change anything on the kafka container, docker-compose recreates the container. That causes creating a new broker and this broker seems to be useless.
So after changing anything on the docker-compose configuration of kafka you must delete the old container including the volume.
So the steps to reproduce:
- Start kafka
- Stop kafka
- Change config (e.g. IP,...)
- Start kafka again
- Kafka will propably be broken even if you revert the changes in step 3
Workaround:
- Stop all container
- Run sudo docker system prune (Only Linux/Unix) :)
- Restart Zookeeper
- Restart Kafka
- Restart YAFRA
- Working?