Docker swarm completely freezes system

Hi there! Getting started with Docker, so please bear with me. I’m following the get started tutorial and I am on step 4.

I have a machine set up in Hong Kong and a machine set up in California. I am able to pull images and run docker on both machines just fine. I am also able to set up single node docker swarms on both machines without a problem.

However, when I try to create a swarm and join the two nodes together, the following happens:

  1. docker swarm init on machine1
  2. docker swarm join on machine2
  3. docker stack deploy on machine1
  4. docker stack ps on machine1 shows all running instances, no problem so far
  5. visiting app for the first time in browser, no problem (first node visited is machine1)
  6. refreshing the app, the app hangs (second node visited is machine2)

At this point, machine2 hangs completely (I can’t even log in via SSH) and I’m forced to restart the machine. This happens every time (I’ve been messing with this all afternoon).

Can anybody give some pointers? Thank you so much!

Are the machines running in cloud?
To isolate the problem, can you please setup the 2 machines in same region and check if that works fine? I am wondering if its a distance problem or a simple multi-node issue…

Hi there, yes the machines are running the cloud.

I am unable to run the machines in the same region because that would require me to buy more machine space and I’ve already paid for Hong Kong and California. Also, it seems unlikely to be a distance problem because machine 2 freezes completely (so this must be a Docker issue).

Thanks! Please help!