Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dokcer Swarm - network sandbox join failed: subnet sandbox join failed for "10.0.0.0/24": error creating vxlan interface: file exists

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.

like image 410
Minh Quan Đức Lương Avatar asked Sep 01 '20 07:09

Minh Quan Đức Lương


2 Answers

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.
like image 197
Alexandre A. Avatar answered Sep 18 '22 12:09

Alexandre A.


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

sudo apt install linux-modules-extra-raspi
like image 22
user1847 Avatar answered Sep 21 '22 12:09

user1847