73

After installing Docker, I am getting an error when I try to run the Hello World example:

Error response from daemon: Cannot start container 4145d0fccd96b904e4ab4413735f1129b8765429bad5be71dc8d5f4c0760666d:
failed to create endpoint high_saha on network bridge:
failed to add the host (veth7f6f907) <=> sandbox (veth788d9dc) pair interfaces: operation not supported

(I have just upgraded my Debian server from Wheezy to Jessie)

Does anyone has an idea why I get this error? Did I missed something during the upgrade?

Thanks for your help.

Michael Hampton
  • 252,907

5 Answers5

251

In my case, the error appears every time I update my Linux kernel. It disappears when I restart the computer.

I am using Arch Linux

Dave M
  • 4,494
whoan
  • 3,007
11

You've booted your system with OVH's custom kernel, which is built to OVH's specifications, and may not be suitable for running software you want to run.

Change your dedicated server configuration to boot from the kernel installed on the hard drive provided by your Linux distribution.

OVH boot configuration screen

Michael Hampton
  • 252,907
6

I had this same problem (pair interfaces: operation not supported) and I use a custom kernel. For me the cause was a missing module "Virtual ethernet pair device" CONFIG_VETH.

│ CONFIG_VETH:
│ │ This device is a local ethernet tunnel. Devices are created in pairs. When one end receives the packet it appears on its pair and vice versa. │ Symbol: VETH [=m]
│ │ Type : tristate
│ │ Prompt: Virtual ethernet pair device
│ │ Location:
│ │ -> Device Drivers
│ │ -> Network device support (NETDEVICES [=y])
│ │ -> Network core driver support (NET_CORE [=y])

hope it helps

0

I am using Kernel modules disabled (kernel.modules_disabled) after boot setting.

I had to add the line veth in my /etc/modules-load.d/docker-modules.conf.

Now it looks like

# For Docker
ip_tables
iptable_nat
nf_tables
nf_conntrack
nf_conntrack_netlink
nf_nat
nf_tables
nfnetlink
nft_chain_nat
nft_compat
xfrm_algo
xfrm_user
x_tables
xt_MASQUERADE
xt_addrtype
xt_conntrack
xt_nat
xt_tcpudp
br_netfilter
veth

Docker overlay

overlay

Also posted on https://github.com/moby/moby/issues/27426#issuecomment-2602513927

0

To add one more answer for a case where this might happen:

On Arch Linux based distros, when the linuxNNN kernel packages are upgraded kernel modules can fail to load when needed. (e.g. veth in this case needed by Docker)

The Linux kernel packages on Arch Linux are located in versioned sub-directories of /lib/modules. When the kernel package is upgraded, the version number changes and the old directory is replaced by the new versioned one. So, unless you reboot, it is no longer possible to load a kernel module for the currently running Linux kernel version.

To Diagnose

  • Check the currently running kernel version

    uname -r
    
  • Check what versioned kernel module directory exists

    ls -lA /lib/modules
    
  • If these two versions don't match, or modprobe veth retuns (modprobe: FATAL: Module veth not found in directory /lib/modules/${VERSION_HERE}), then you will need to reboot to resolve the issue.

Solution

  • Reboot the system: sudo reboot or sudo systemctl reboot
TrinitronX
  • 1,161