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:
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.

  • How to Install Hadoop slaves in docker make a master node on local computer to handle these slave nodes?
  • How to build an Image using Docker API?
  • docker cannot start container … cpu.shares: no such file or directory
  • docker exec java app background attach logs
  • Dockerfile production/build/debug/test environment
  • Crash during startup with network share for gitlab container
  • Does anyone who has the same experience. Please tell me how to implement tomcat session replication under docker swarm mode.

  • How to get docker 'objects' completion on mintty-bash from git for windows
  • Deploying Docker to AWS Elastic Beanstalk — how to forward port to host? (port binding)
  • How do I advertise AND browse mDNS from within docker container?
  • Can we achieve Consul loadbalancing without haproxy?
  • docker terminal: waiting for an IP
  • docker: different PID for `top` and `ps`
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.