moby / libnetwork

networking for containers
Apache License 2.0
2.15k stars 878 forks source link

error creating vxlan interface: operation not supported. #1166

Open jonnyshaw89 opened 8 years ago

jonnyshaw89 commented 8 years ago

I am able to successfully create an overlay network across multiple hosts. However when u try to start any contains in that network i get the following error Error response from daemon: 500 Internal Server Error: subnet sandbox join failed for "10.0.0.0/24": error creating vxlan interface: operation not supported.

Any help would be much appreciated. Some more info about environment below

docker info Containers: 5 Running: 3 Paused: 0 Stopped: 2 Images: 4 Server Version: 1.10.3 Storage Driver: overlay Backing Filesystem: extfs Execution Driver: native-0.2 Logging Driver: json-file Plugins: Volume: local Network: overlay bridge null host Kernel Version: 4.4.9-v7+ Operating System: Raspbian GNU/Linux 8 (jessie) OSType: linux Architecture: armv7l CPUs: 4 Total Memory: 925.5 MiB Name: JasPi1 ID: BDPC:SYMO:F4GB:VJ7Z:4U3Y:H7YE:DJBA:HGMW:LWBA:SKNF:M4ZB:MKOO Debug mode (server): true File Descriptors: 41 Goroutines: 73 System Time: 2016-05-10T22:30:51.508003106Z EventsListeners: 1 Init SHA1: 0db326fc09273474242804e87e11e1d9930fb95b Init Path: /usr/lib/docker/dockerinit Docker Root Dir: /var/lib/docker WARNING: No swap limit support WARNING: No cpu cfs quota support WARNING: No cpu cfs period support WARNING: No cpuset support Labels: processor=arm Cluster store: consul://192.168.0.10:8500 Cluster advertise: 192.168.0.10:2375

Linux JasPi1 4.4.9-v7+ #884 SMP Fri May 6 17:28:59 BST 2016 armv7l GNU/Linux

schmunk42 commented 7 years ago

Related: https://github.com/docker/machine/issues/2753

GordonTheTurtle commented 6 years ago

@jonnyshaw89 It has been detected that this issue has not received any activity in over 6 months. Can you please let us know if it is still relevant:

Thank you! This issue will be automatically closed in 1 week unless it is commented on. For more information please refer to https://github.com/docker/libnetwork/issues/1926

schmunk42 commented 6 years ago

I can remember seeing this since months.

ghost commented 6 years ago

@GordonTheTurtle I just now encountered this problem: starting container failed: subnet sandbox join failed for "10.0.0.0/24": error creating vxlan interface: operation not supported
I try to run a stack in swarm mode. I just started testing on our remote server and run the stack - the containers try to start but can't.
I believe it could have something to do with me changing the docker files (/var/lib/docker) to other directory in /home.

update: I tried to follow these steps, I am not sure I copied a directory too much:
ls -ls /var/lib/docker:

4 drwx------ 24 root root 4096 wrz  4 14:40 containers
4 drwx------  5 root root 4096 lip 12 17:54 devicemapper
0 lrwxrwxrwx  1 root root   19 wrz  4 14:38 docker -> /home/docker/docker
4 drwx------  3 root root 4096 lip 12 17:53 image
4 drwxr-x---  3 root root 4096 lip 12 17:53 network
4 drwx------  4 root root 4096 lip 12 17:53 plugins
4 drwx------  5 root root 4096 wrz  4 14:38 swarm
4 drwx------  2 root root 4096 wrz  4 14:38 tmp
4 drwx------  2 root root 4096 lip 12 17:53 trust
4 drwx------ 16 root root 4096 wrz  4 14:40 volumes

ls -ls /home/docker:

4 drwx------  5 root    root    4096 wrz  4 14:25 containers
4 drwx------  5 root    root    4096 wrz  4 14:17 devicemapper
4 drwx--x--x 11 user    user    4096 wrz  4 14:27 docker
4 drwx------  3 root    root    4096 wrz  4 14:16 image
4 drwxr-x---  3 root    root    4096 wrz  4 14:16 network
4 drwx------  4 root    root    4096 wrz  4 14:16 plugins
4 drwx------  5 root    root    4096 wrz  4 14:26 swarm
4 drwx------  2 root    root    4096 wrz  4 14:26 tmp
4 drwx------  2 root    root    4096 wrz  4 14:16 trust
4 drwx------  5 root    root    4096 wrz  4 14:25 volumes

ls -ls /home/docker/docker:

4 drwx------  6 root root 4096 wrz  4 14:31 containers
4 drwx------  5 root root 4096 wrz  4 13:09 devicemapper
4 drwx------  3 root root 4096 wrz  4 13:09 image
4 drwxr-x---  3 root root 4096 wrz  4 13:09 network
4 drwx------  4 root root 4096 wrz  4 13:09 plugins
4 drwx------  5 root root 4096 wrz  4 14:27 swarm
4 drwx------  2 root root 4096 wrz  4 14:30 tmp
4 drwx------  2 root root 4096 wrz  4 13:09 trust
4 drwx------ 10 root root 4096 wrz  4 14:31 volumes

This does not seem right. I will try to make it right, but maybe this is the reason for the error. I did change the /etc/default/docker as follows:
DOCKER_OPTS="-g /home/docker/docker"

ghost commented 6 years ago

I made adjustments to the above structure:

ghost commented 6 years ago

Well, I found a similar issue docker machine #2753.
Could this be a kernel issue? uname -r output:

3.14.32-xxxx-grs-ipv6-64

update: Running single image containers seems to work, only these in stack will not run. I will try to run them independently. update2: The same images with the same params did run correctly independently - without stack

A34 commented 6 years ago

Hello, I have a similar issue, I don't find any solution, could somebody help me? https://forums.docker.com/t/debian-9-error-creating-vxlan-interface-operation-not-supported/39995/2

fcrisciani commented 6 years ago

@A34 check that you have the kernel module available and loaded

laeubi commented 6 years ago

I also encountered the problem when using swarm uname -r reports 4.4.82-2.ph1 I have root access on the machine , but its not managed by me, so can you give me a hint what I have to tell the server-guys they need to change to fix this? when I do lsmod and grep for vx i see the following modules: vxlan so the module seems to be aviable.

Riiskyy commented 3 years ago

Not sure if this is something that has been solved or if this is just not possible on a RasPi, but I'm also getting the same issue.

network sandbox join failed: subnet sandbox join failed for "10.0.0.0/24": error creating vxlan interface: operation not supported

pi@pivault:~ $ uname -r
5.4.72-v7l+
pi@pivault:~ $ docker info
Client:
 Context:    default
 Debug Mode: false
 Plugins:
  app: Docker App (Docker Inc., v0.9.1-beta3)
  buildx: Build with BuildKit (Docker Inc., v0.5.1-docker)

Server:
 Containers: 1
  Running: 1
  Paused: 0
  Stopped: 0
 Images: 13
 Server Version: 20.10.3
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: active
  NodeID: a5h7qeaw6grxe7umq38q2jt61
  Is Manager: true
  ClusterID: nb6xwrmcmo25aje6ptqxpglwi
  Managers: 1
  Nodes: 1
  Default Address Pool: 10.0.0.0/8
  SubnetSize: 24
  Data Path Port: 4789
  Orchestration:
   Task History Retention Limit: 5
  Raft:
   Snapshot Interval: 10000
   Number of Old Snapshots to Retain: 0
   Heartbeat Tick: 1
   Election Tick: 10
  Dispatcher:
   Heartbeat Period: 5 seconds
  CA Configuration:
   Expiry Duration: 3 months
   Force Rotate: 0
  Autolock Managers: false
  Root Rotation In Progress: false
  Node Address: 192.168.0.33
  Manager Addresses:
   192.168.0.33:2377
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 269548fa27e0089a8b8278fc4fc781d7f65a939b
 runc version: ff819c7e9184c13b7c2607fe6c30ae19403a7aff
 init version: de40ad0
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 5.4.72-v7l+
 Operating System: Raspbian GNU/Linux 10 (buster)
 OSType: linux
 Architecture: armv7l
 CPUs: 4
 Total Memory: 3.738GiB
 Name: pivault
 ID: 4ITK:MCKI:AER6:RVFP:KVPV:T4WX:5UNW:4MTF:OK2G:YZTJ:GSM4:KDHH
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: No memory limit support
WARNING: No swap limit support
WARNING: No kernel memory TCP limit support
WARNING: No oom kill disable support
WARNING: No blkio weight support
WARNING: No blkio weight_device support
Riiskyy commented 3 years ago

So I actually managed to fix this problem. I updated the firmware for the RasPi with rpi-update and I no longer get the error.

coltonbh commented 2 years ago

If you are on a Raspberry Pi running Ubuntu Server 21.10 (or perhaps other versions) you may be missing the required libraries. You can install them with:

sudo apt install linux-modules-extra-raspi
mirino75 commented 2 years ago

If you are on a Raspberry Pi running Ubuntu Server 21.10 (or perhaps other versions) you may be missing the required libraries. You can install them with:

sudo apt install linux-modules-extra-raspi

@coltonbh THX ! You saved me time!

ubuntu@raspberry1:~$ cat /etc/os-release PRETTY_NAME="Ubuntu 21.10" VERSION="21.10 (Impish Indri)"

Its-treason commented 2 years ago
sudo apt install linux-modules-extra-raspi

I'm on Debian 11 (Bullseye) (arm64) and this package not available in the Debian Repo. Is there a alternative version of the package in the debian repo?

Edit: After doing a rpi-update, explicity enabling the vxlan kernel module (sudo modprobe vxlan) and restarting my issue was resolved.

matfax commented 1 year ago

On OpenWRT, I had to install kmod-vxlan and kmod-ipsec to resolve the network issue.

pedroetb commented 1 year ago

If you are on a Raspberry Pi running Ubuntu Server 21.10 (or perhaps other versions) you may be missing the required libraries. You can install them with:

sudo apt install linux-modules-extra-raspi

Thanks, I needed this for Ubuntu 22.04!

$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.2 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.2 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
...
jonasearth commented 10 months ago

Se você estiver em um Raspberry Pi executando o Ubuntu Server 21.10 (ou talvez outras versões), poderá estar faltando as bibliotecas necessárias. Você pode instalá-los com:

sudo apt install linux-modules-extra-raspi

you're a god, my hero :heart: