Hello All,
I recently did an in place upgrade from Debian Bullseye to Bookworm. Once I did the transition, I noticed some networking issues and saw that Docker was creating 4 types of routes on my host’s network:
(Note: “host” in this post refers to the host device, NOT docker’s “host network”).
172.X.X.X dev docker0/br-*
- The IP for each docker network gateway. This I have seen before on other systems with docker.0.0.0.0 dev veth*
- The default routes usually kept inside docker’s internal network management.169.254.0.0 dev veth*
- What I can only guess are null networks, usually kept inside docker network.default dev veth*
- Only one of these is made, and it seemingly chooses one veth randomly. Should the container linked to that veth be stopped, another veth will randomly be chosen (unknown how or by what) to become the new default route.
When 4 appears, it stops the networking for my host system externally (e.g. ping 8.8.8.8 gives you host unreachable). You can still connect to to the host directly via IP, but not via hostname.
Points 2-4 make me believe that Docker is putting its internal networking iptables (or equivalent) on to the host system (which is then breaking the host system) rather than only “talking” to the host via 172.X.X.X.
This made me think something is screwy with the network, which makes sense given the changes made in networking services in different Debian releases.
First I checked daemon.json - empty.
Then I checked what network services I had running - systemd-networkd and connman. I also had installed netplan, which put together a basic networkd config. I thus checked connman’s main.conf and /{etc,lib}/systemd/network/* files vs another debian system I have running that was a fresh install. There was no difference.
I have checked my iptables on the two systems as well, and they also were the same.
The only difference is in ip routing.
I also scoured the internet (and used chatgpt) to see if I could debug this. The most common answer was to blacklist veth entries via connman’s main.conf. Unfortunately, when I do that, all connectivity to my docker containers dies.
The workaround I have currently is to search for and delete any route matching the format “default dev veth”. It’s a basic script that I have run every minute. In this configuration, everything (except intranet DNS resolution, which is likely a separate issue) works, although the network for my container can die up to every minute, which makes some of the service pretty unreliable.
Would really appreciate any pointers on how to fix this. More system info below. TIA.
docker version
Client: Docker Engine - Community
Version: 28.0.1
API version: 1.48
Go version: go1.23.6
Git commit: 068a01e
Built: Wed Feb 26 10:40:57 2025
OS/Arch: linux/arm64
Context: default
Server: Docker Engine - Community
Engine:
Version: 28.0.1
API version: 1.48 (minimum version 1.24)
Go version: go1.23.6
Git commit: bbd0a17
Built: Wed Feb 26 10:40:57 2025
OS/Arch: linux/arm64
Experimental: false
containerd:
Version: 1.7.25
GitCommit: bcc810d6b9066471b0b6fa75f557a15a1cbf31bb
runc:
Version: 1.2.4
GitCommit: v1.2.4-0-g6c52b3f
docker-init:
Version: 0.19.0
GitCommit: de40ad0
docker info
Client: Docker Engine - Community
Version: 28.0.1
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.21.1
Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.33.1
Path: /usr/libexec/docker/cli-plugins/docker-compose
Server:
Containers: 14
Running: 13
Paused: 0
Stopped: 1
Images: 14
Server Version: 28.0.1
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
Swarm: inactive
Runtimes: runc io.containerd.runc.v2
Default Runtime: runc
Init Binary: docker-init
containerd version: bcc810d6b9066471b0b6fa75f557a15a1cbf31bb
runc version: v1.2.4-0-g6c52b3f
init version: de40ad0
Security Options:
seccomp
Profile: builtin
cgroupns
Kernel Version: 6.1.21-v8+
Operating System: Debian GNU/Linux 12 (bookworm)
OSType: linux
Architecture: aarch64
CPUs: 4
Total Memory: 3.705GiB
Name: [redacted]
ID: [redacted]
Docker Root Dir: /var/lib/docker
Debug Mode: false
Experimental: false
Insecure Registries:
::1/128
127.0.0.0/8
Live Restore Enabled: false
WARNING: No memory limit support
WARNING: No swap limit support