tomcat7 session replication doesn't work under docker swarm mode

I run two tomcat containers. Then I followed tomcat official guide to do the tomcat session replication. I just followed this link: http://tomcat.apache.org/tomcat-7.0-doc/cluster-howto.html
I have to say, there is nothing special on configuration. I just used the most simplest configuration for most easy scenario.

Before I changed the deployment environment into docker swarm mode, everything worked very well. Under swarm mode environment, bundles seems can not found other memberships.
Moreover I did another try that I shutdown the firewall of docker host machine. After I did this , I found session replication worked again even though under swarm mode. I feel this is a network issue. But I don’t know how to solve it.

  • Varnish/Symfony3 Cache on Nginx - Ago 0 on caching
  • Use docker image in .gitlab-ci.yml with build essentials and git
  • Why can't I `docker exec` after installing the official Django docker image?
  • Install packages from the Debian Snapshot Archives repo?
  • Different hashes while pulling from hub and pushing to registry
  • 502 Bad Gateway Error(Nginx as Docker container + Consul Docker run + Tomcat as a Docker container + Nomad)
  • Does anyone who has the same experience. Please tell me how to implement tomcat session replication under docker swarm mode.

  • Requests to docker-machine created boot2docker host
  • How to run docker image with specific version and port forwarding
  • error when running a compiled golang script
  • In docker, writing file to mounted file-system as non-root?
  • Running a script inside a docker container using shell script
  • JRebel & Docker bean initializing error
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.