Skip to content
This repository has been archived by the owner on Oct 1, 2020. It is now read-only.

Restart of docker does not correctly restart kafka #10

Open
blawlor opened this issue Apr 19, 2015 · 4 comments
Open

Restart of docker does not correctly restart kafka #10

blawlor opened this issue Apr 19, 2015 · 4 comments

Comments

@blawlor
Copy link

blawlor commented Apr 19, 2015

Hi,
For reasons I don't yet understand, when I do a docker restart container_id, I can no longer send messages to the topics previously created (the kafka client gets the following: org.apache.kafka.common.errors.TimeoutException: Failed to update metadata after 60000 ms.).

If I connect to the running container and just stop the kafka process directly, supervisord successfully restarts it and I don't have any issues, so I'm assuming this probably is docker-specific.

@blawlor
Copy link
Author

blawlor commented Apr 19, 2015

Tried with the latest version of kafka and it didn't help.

@tobr
Copy link

tobr commented Sep 3, 2015

Same Problem here using boot2docker and docker-machine. Using 'docker run' everything works fine, but when I stop the container and start it again with 'docker start' the queue does not receive the messages and I get the timeout metadata error.

@amarcionek
Copy link

This is a known issue with Kafka or Zookeeper. See:

https://issues.apache.org/jira/browse/KAFKA-1387
https://issues.apache.org/jira/browse/KAFKA-1451
https://issues.apache.org/jira/browse/KAFKA-1494

Even though some of them say fixed, there is clearly an issue as we have it as well.

@Sreekiranar
Copy link

Sreekiranar commented Apr 6, 2018

I also had the same issue and i solved it by adding a --net=somename to the command.
Here is my run command
" docker run --net=host -p 2181:2181 -p 9092:9092 --env ADVERTISED_HOST= --env ADVERTISED_PORT=9092 --env LOG_RETENTION_HOURS=1 --env LOG_RETENTION_BYTES=250000000 spotify/kafka "
Please try it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants