Akka Clustering not working with Docker container in host node

We are trying to use Application level clustering using the Akka Clustering for our distributed application which runs within docker containers across multiple nodes. We plan to run the docker container in the “host” mode networking.

When the dockerized application comes up for the first time, the Akka Clustering does seem to work and we do not see any Gossip messages being exchanged between the cluster nodes. This gets resolved only when we remove the file “/var/lib/docker/network/files/local-kv.db” and restart the docker service. This is not an acceptable solution for the production deployment and so we are trying to do an RCA and provide a proper solution.

Any help here would be really appreciated.

Tried removing file “/var/lib/docker/network/files/local-kv.db” and restarting docker service worked. But this workaround is unacceptable in the production deployment

Tried using the bridge network mode for the dockerized container. That helps, but our current requirement requires us to run the container in “host” mode.

application.conf has the following settings for the host and port currently.

hostname = “” port = 2551 bind-hostname = “0.0.0.0” bind-port = 2551

No gossip messages are exchanged between the akka cluster nodes. Whereas we see those messages after applying the mentioned workaround

Source: StackOverflow