Docker gives error after upgrading ubuntu

Hi All,

Yesterday I uploaded jetpack 6.0 w/ubuntu22.04 to NVMe ssd in Jetson Orin AGX developer kit.

docker was running fine. But after I apt-get upgrade Docker stopped working giving a message:

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

docker info gives below message.

Client: Docker Engine - Community
Version: 25.0.3
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.12.1
Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.24.5
Path: /usr/libexec/docker/cli-plugins/docker-compose

Server:
ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
errors pretty printing info

I have been searching the internet since yesterday how to fix it but all I found was to stop and start the service with systemctl, and change ownership of /var/run/docker.sock

I would appreciate it if someone can help me solving this issue.

Best regards.
Tugrul

Hi,

Yes, usually this can be solved by restarting the service.
Does it work?

$ sudo systemctl restart docker.service

Thanks

Hi All,

After 3 days of hassle I figured it out.
When I checked the network configuration with ifconfig, I didn’t see docker0 bridge. Somehow, after update & upgrade it was deleted. I added it manually and now my docker works fine.

This seems to be happening to quite a few people on Jetpack 6.0 DP after upgrading docker. See this thread:

I also don’t see the docker0 bridge. When I sudo systemctl restart docker.service I get Job for docker.service failed because the control process exited with error code

What is the best way to manually add the docker0 bridge back?

I agree that the error messages from jornalctl indicate that the bridge is the problem. However I don’t know how the bridge was initially set up. Is there someone here who can give a simple epxlanation on how to bring the bridge back to life. Netplan? Network-Manager?

I followed this link to add the bridge manually

sudo apt-get install bridge-utils
sudo brctl addbr docker0
sudo ip addr add 10.1.0.1/24 dev docker0
sudo ip link set dev docker0 up
ip addr show docker0
sudo systemctl restart docker
sudo iptables -t nat -L -n

It did not work, below is the output from each command:
jetson@jetson-desktop:~$ sudo apt-get install bridge-utils
[sudo] password for jetson:
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
bridge-utils is already the newest version (1.7-1ubuntu3).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
jetson@jetson-desktop:~$ sudo brctl addbr docker0
jetson@jetson-desktop:~$ sudo ip addr add 10.1.0.1/24 dev docker0
jetson@jetson-desktop:~$ sudo ip link set dev docker0 up
jetson@jetson-desktop:~$ ip addr show docker0
8: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether 9a:83:ad:8c:96:c5 brd ff:ff:ff:ff:ff:ff
inet 10.1.0.1/24 scope global docker0
valid_lft forever preferred_lft forever
jetson@jetson-desktop:~$ 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.
jetson@jetson-desktop:~$ sudo iptables -t nat -L -n
Chain PREROUTING (policy ACCEPT)
target prot opt source destination

Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Chain POSTROUTING (policy ACCEPT)
target prot opt source destination

My bridge (before any updates) says 172.17.0.1/16. Is this randomly assigned as I see it is different to yours.
I thought a bridge had to be linked to either the physical ethernet or wifi connector?

I reran the set of commands in the solution, docker0 bridge now shows up but still can’t load a container with following error:

docker: unknown server OS .

I did the same, ran all the bridge commands and when I check the status of docker.service it is still down. When I ran
sudo journalctl -u docker.service
I get
error obtaining controller instance: failed to register "bridge" driver

1 Like

same problem with a newly flashed and installed AGX Orin, solved with downgrading iptables to the legacy version (instead of the newer nftables)
update-alternatives --set iptables /usr/sbin/iptables-legacy
then apt reinstall docker-ce which manages to create the necessary bridge and iptables rules

5 Likes

This worked for me as well!

sudo update-alternatives --set iptables /usr/sbin/iptables-legacy
sudo apt reinstall docker-ce

3 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.