I can't run docker; "Failed to create bridge docker0 via netlink"

Hi,

I can’t run docker, but I really want to. Can somebody help me figure this out? I am stuck. Check out below what I tried alredy;

sudo systemctl restart docker
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xeu docker.service" for details.
Sep 09 15:38:51 john systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Sep 09 15:38:51 john systemd[1]: docker.service: Failed with result 'exit-code'.
Sep 09 15:38:51 john systemd[1]: Failed to start Docker Application Container Engine.
Sep 09 15:38:53 john systemd[1]: docker.service: Scheduled restart job, restart counter is at 3.
Sep 09 15:38:53 john systemd[1]: docker.service: Start request repeated too quickly.
Sep 09 15:38:53 john systemd[1]: docker.service: Failed with result 'exit-code'.
sudo dockerd -D
ERRO[2024-09-09T15:41:25.168306212+02:00] Failed to create bridge docker0 via netlink   error="operation not supported"
docker version
Client:
 Version:           27.1.2
 API version:       1.46
 Go version:        go1.23.0
 Git commit:        d01f264bcc
 Built:             Sun Aug 18 14:43:14 2024
 OS/Arch:           linux/amd64
 Context:           default
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
sudo modprobe bridge
modprobe: ERROR: could not insert 'bridge': Unknown symbol in module, or unknown parameter (see dmesg)
sudo dmesg | grep -E "bridge|invalid|module"
[ 3523.718593] bridge: version magic '5.15.114-2-MANJARO SMP preempt mod_unload ' should be '5.15.165-1-MANJARO SMP preempt mod_unload '
[ 3563.817705] bridge: version magic '6.6.47-1-MANJARO SMP preempt mod_unload ' should be '5.15.165-1-MANJARO SMP preempt mod_unload '
uname -r
5.15.165-1-MANJARO

(I tried 6.6-LTS too before 5.15 LTS)

Hi @whatthe,

I don’t use dock. Or LXD even. Or for that matter any containerization, so this is nothing else than a hunch:

I think your permissions are whacked. I almost suspect you ran the command to create the container with sudo initially. So try removing the bridge first:

sudo rm -rf /var/lib/docker/network

And then try starting it again.

I do not know if root (sudo) is necessary or should be used, I almost don’t think so.

Hope this helps!

Reference:

https://stackoverflow.com/a/40524603

Thanks but did not work

In that case, all I can offer is

:man_shrugging:

1 Like

I also can’t load the bridge module for the linux kernel, i think something deeper is going on there

1 Like

Hi @whatthe ,
I wonder whether you could read the following post, in order to solve your problem.
networking: investigate `EINTR` regression after updating github.com/vishvananda/netlink to v1.3.0 · Issue #48400 · moby/moby · GitHub

Regards,

Hi @whatthe ,
Maybe, you could also solve the problem with this hint:
Virt-manager and QEMU - #11 by DeLinuxCo

Regards,

1 Like

What’s going on is that somehow you seem to have kernel modules installed which don’t match your kernel version. How has that happened?

sudo dmesg | grep -E "bridge|invalid|module"
[ 3523.718593] bridge: version magic '5.15.114-2-MANJARO SMP preempt mod_unload ' should be '5.15.165-1-MANJARO SMP preempt mod_unload '
[ 3563.817705] bridge: version magic '6.6.47-1-MANJARO SMP preempt mod_unload ' should be '5.15.165-1-MANJARO SMP preempt mod_unload '

As it says there version magic should be the same as the kernel version. Post output of modinfo bridge.

1 Like
sudo modinfo bridge
filename:       /lib/modules/5.15.165-1-MANJARO/kernel/net/bridge/bridge.ko.xz
alias:          rtnl-link-bridge
version:        2.3
license:        GPL
srcversion:     4802D0033DD1EE28FABFA7F
depends:        stp,llc
retpoline:      Y
intree:         Y
name:           bridge
vermagic:       5.15.165-1-MANJARO SMP preempt mod_unload

The correct version for 5.15.165-1-MANJARO seems to be there so why is it picking up 5.15.114-2-MANJARO from somewhere? What do you have in ls /usr/lib/modules?

ls /usr/lib/modules
5.15.164-3-MANJARO  5.15.165-1-MANJARO  6.6.46-1-MANJARO  6.6.47-1-MANJARO

Couple of days ago I manually deleted the 5.15.114 modules

depmod -a
probably rather:
sudo depmod -a

deleted just the modules?
Why not the whole kernel with everything belonging to it?

Is the bridge really the problem

pls give us the ouput from:

docker context ls 
sudo systemctl status docker.service
sudo systemctl status containerd.service

step completed? Create a group and user?

Create the docker group.

sudo groupadd docker

Add user to the docker group.

sudo usermod -aG docker $USER

I’ve done

sudo depmod -a

Yeah I just deleted the modules because I thought the kernel was not there anymore and the modules were left behind. I did a reboot after that.

I had switched to podman-docker:

docker context ls
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
Name        URI         Identity    Default     ReadWrite

But I switched back to docker for the purpose of this post:

docker context ls
NAME        DESCRIPTION                               DOCKER ENDPOINT               ERROR
default *   Current DOCKER_HOST based configuration   unix:///var/run/docker.sock  
sudo systemctl status docker.service
× docker.service - Docker Application Container Engine
     Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; preset: disabled)
     Active: failed (Result: exit-code) since Fri 2024-09-13 21:57:54 CEST; 43ms ago
 Invocation: ca14e8b198f449968d5b89025a2c68f2
TriggeredBy: × docker.socket
       Docs: https://docs.docker.com
    Process: 73701 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FA>
   Main PID: 73701 (code=exited, status=1/FAILURE)

Sep 13 21:57:52 john systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Sep 13 21:57:52 john systemd[1]: docker.service: Failed with result 'exit-code'.
Sep 13 21:57:52 john systemd[1]: Failed to start Docker Application Container Engine.
Sep 13 21:57:54 john systemd[1]: docker.service: Scheduled restart job, restart counter is at 3.
Sep 13 21:57:54 john systemd[1]: docker.service: Start request repeated too quickly.
Sep 13 21:57:54 john systemd[1]: docker.service: Failed with result 'exit-code'.
Sep 13 21:57:54 john systemd[1]: Failed to start Docker Application Container Engine.
sudo systemctl status containerd.service
● containerd.service - containerd container runtime
     Loaded: loaded (/usr/lib/systemd/system/containerd.service; disabled; preset: disabled)
     Active: active (running) since Fri 2024-09-13 21:57:41 CEST; 2min 19s ago
 Invocation: d327c73473c4458abaf8ccf076a9741f
       Docs: https://containerd.io
    Process: 73360 ExecStartPre=/usr/bin/modprobe overlay (code=exited, status=0/SUCCESS)
   Main PID: 73362 (containerd)
      Tasks: 11
     Memory: 48.6M
        CPU: 252ms
     CGroup: /system.slice/containerd.service
             └─73362 /usr/bin/containerd

Sep 13 21:57:41 john containerd[73362]: time="2024-09-13T21:57:41.862585050+02:00" level=info msg=serving... address=/run/c>
Sep 13 21:57:41 john containerd[73362]: time="2024-09-13T21:57:41.863078112+02:00" level=info msg=serving... address=/run/c>
Sep 13 21:57:41 john containerd[73362]: time="2024-09-13T21:57:41.874771376+02:00" level=info msg="Start subscribing contai>
Sep 13 21:57:41 john containerd[73362]: time="2024-09-13T21:57:41.875477190+02:00" level=info msg="Start recovering state"
Sep 13 21:57:41 john containerd[73362]: time="2024-09-13T21:57:41.875828580+02:00" level=info msg="Start event monitor"
Sep 13 21:57:41 john containerd[73362]: time="2024-09-13T21:57:41.875951707+02:00" level=info msg="Start snapshots syncer"
Sep 13 21:57:41 john containerd[73362]: time="2024-09-13T21:57:41.876054591+02:00" level=info msg="Start cni network conf s>
Sep 13 21:57:41 john containerd[73362]: time="2024-09-13T21:57:41.876151151+02:00" level=info msg="Start streaming server"
Sep 13 21:57:41 john systemd[1]: Started containerd container runtime.
Sep 13 21:57:41 john containerd[73362]: time="2024-09-13T21:57:41.882205102+02:00" level=info msg="containerd successfully >
lines 9-23/23 (END)
sudo groupadd docker
groupadd: group 'docker' already exists
sudo usermod -aG docker $USER

I think something deeper maybe going on with the bridge modules, I created a separate thread to troubleshoot it: