Open tuncgultekin opened 7 years ago
I found the problem. It turns out the start_kafka.sh
script tried to update some kafka config in $KAFKA_HOME/config/server.properties
but somehow rendered the file invalid. I got this while running the script manually in the container:
org.apache.kafka.common.config.ConfigException: Invalid value 0advertised.host.name=kafkaserver for configuration group.
initial.rebalance.delay.ms: Not a number of type INT
The config file indeed contained this line at the end:
group.initial.rebalance.delay.ms=0advertised.host.name=kafkaserver
After updating the config and restarting the instance, Kafka (version 11.0.1) started working as expected.
I guess the problem is due to the sed
command in start_kafka.sh
script, but since I don't have any experience working with sed
, can someone update it?
@alienscience @kentnek You can fix that by changing https://github.com/spotify/docker-kafka/blob/fc8cdbd2e23a5cac21e7138d07ea884b4309c59a/kafka/scripts/start-kafka.sh#L23 to —
echo "\nadvertised.host.name=$ADVERTISED_HOST" >> $KAFKA_HOME/config/server.properties
Notice the leading \n
. Repeat for https://github.com/spotify/docker-kafka/blob/fc8cdbd2e23a5cac21e7138d07ea884b4309c59a/kafka/scripts/start-kafka.sh#L31
I tried to use this and Kafka keeps bouncing up and down in the docker container: