17

I met this issue when deploying my application on Docker Swarm.

I run docker stack deploy -c /path and get error network sandbox join failed: subnet sandbox join failed for "10.0.0.0/24": error creating vxlan interface: file exists

I searched too many pages in Google but not found any solution.

Lee
  • 29,398
  • 28
  • 117
  • 170

3 Answers3

25

You can try to the following steps.

  1. Check each node for any vx-* interfaces in /sys/class/net
$ ls -l /sys/class/net/ | grep vx
  1. Once we have interface id's pull more details
$ udevadm info /sys/class/net/
  1. If these interfaces exist we should be able to safely remove them. Replace vx-000000-xxxxx with the interface id from Step 2
$ sudo ip -d link show vx-000000-xxxxx
$ sudo ip link delete vx-000000-xxxxx

etc...

  1. Redeploy the service.
Alexandre A.
  • 1,619
  • 18
  • 29
13

If you are on a raspberry pi with Ubuntu you may just be missing the necessary libraries. You can install them with:

sudo apt install linux-modules-extra-raspi
user1847
  • 3,571
  • 1
  • 26
  • 35
1

There might be conflict between multiple networks on your host

Did you check how many dockerd services is running? There might be two docker service is running on your host, via apt and snap

To remove docker via snap:

sudo snap remove docker

or, to avoid it creating back-up data:

sudo snap remove --purge docker

To remove docker via apt

sudo apt-get remove docker docker-engine docker.io containerd runc

And then reinstalled from here https://docs.docker.com/engine/install/ubuntu/