I noticed that if the container IP changes from container stop to container start (happens frequently if being used in a docker-compose'd environment), kafkas server.properties won't be updated due to a typo:
# instead of ^ in sed expressions
As a result (if using IP adresses as ADVERTISED_HOST), clients trying to connect will be disconnected and reconnecting to the wrong IP. For a java based client it looks like this:
WARN [org.apache.kafka.clients.NetworkClient] (KafkaJCAClient) Error while fetching metadata with correlation id 15326 : {mytopic=LEADER_NOT_AVAILABLE}
WARN [org.apache.kafka.clients.NetworkClient] (KafkaJCAClient) Error while fetching metadata with correlation id 15327 : {mytopic=LEADER_NOT_AVAILABLE}
WARN [org.apache.kafka.clients.NetworkClient] (KafkaJCAClient) Error while fetching metadata with correlation id 15328 : {mytopic=LEADER_NOT_AVAILABLE}
...
So if you're using IP adresses in ADVERTISED_HOST like me, containers need to be recreated all the time unless this PR gets merged.
I noticed that if the container IP changes from container stop to container start (happens frequently if being used in a docker-compose'd environment), kafkas server.properties won't be updated due to a typo: # instead of ^ in sed expressions
As a result (if using IP adresses as ADVERTISED_HOST), clients trying to connect will be disconnected and reconnecting to the wrong IP. For a java based client it looks like this:
So if you're using IP adresses in ADVERTISED_HOST like me, containers need to be recreated all the time unless this PR gets merged.