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.

  • Docker: Unable to run shell script stored in a mounted volume
  • Docker didn't forward the port from web service
  • Setting docker with nginx and php5
  • How to increase the size of the /dev/shm in docker container
  • Docker workflow design with Jenkins on production
  • How to set Docker ENTRYPOINT To NPM?
  • Does anyone who has the same experience. Please tell me how to implement tomcat session replication under docker swarm mode.

  • Docker “Can't connect to local MySQL server through socket”
  • Apache in Docker won't deliver sites
  • Kafka in Docker not working
  • Is it possible to run mutliple docker machines within one virtual machine (virtualbox)?
  • openwhisk postdeploy fails on single node ubuntu virtual machine
  • In docker, difference with commit and dockerfile
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.