Hi,
recently I did an apt update on my ubuntu server which in the end seemingly corrupted my docker setup so that I can not start it anymore.
Maybe somebody could help before I give up and install my ubuntu server from scratch?
My current status:
sudo systemctl status docker
× docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/docker.service.d
└─00-move-library.conf
Active: failed (Result: exit-code) since Mon 2023-09-18 17:20:59 CEST; 56s ago
TriggeredBy: × docker.socket
Process: 1601 ExecStart=/usr/bin/dockerd -g /mnt/ssd/docker -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
Main PID: 1601 (code=exited, status=1/FAILURE)
CPU: 87ms
Sep 18 17:20:59 bolt systemd[1]: docker.service: Scheduled restart job, restart counter is at 3.
Sep 18 17:20:59 bolt systemd[1]: Stopped Docker Application Container Engine.
Sep 18 17:20:59 bolt systemd[1]: docker.service: Start request repeated too quickly.
Sep 18 17:20:59 bolt systemd[1]: docker.service: Failed with result 'exit-code'.
Sep 18 17:20:59 bolt systemd[1]: Failed to start Docker Application Container Engine.
sudo systemctl start 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.
journalctl -xeu docker.service
░░
░░ The unit docker.service has entered the 'failed' state with result 'exit-code'.
Sep 18 17:23:08 bolt systemd[1]: Failed to start Docker Application Container Engine.
░░ Subject: A start job for unit docker.service has failed
░░ Defined-By: systemd
░░
░░ A start job for unit docker.service has finished with a failure.
░░
░░ The job identifier is 2652 and the job result is failed.
Sep 18 17:23:10 bolt systemd[1]: docker.service: Scheduled restart job, restart counter is at 3.
░░ Subject: Automatic restarting of a unit has been scheduled
░░ Defined-By: systemd
░░
░░ Automatic restarting of the unit docker.service has been scheduled, as the result for
░░ the configured Restart= setting for the unit.
Sep 18 17:23:10 bolt systemd[1]: Stopped Docker Application Container Engine.
░░ Subject: A stop job for unit docker.service has finished
░░ Defined-By: systemd
░░
░░ A stop job for unit docker.service has finished.
░░
░░ The job identifier is 2800 and the job result is done.
Sep 18 17:23:10 bolt systemd[1]: docker.service: Start request repeated too quickly.
Sep 18 17:23:10 bolt systemd[1]: docker.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░
░░ The unit docker.service has entered the 'failed' state with result 'exit-code'.
Sep 18 17:23:10 bolt systemd[1]: Failed to start Docker Application Container Engine.
░░ Subject: A start job for unit docker.service has failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit docker.service has finished with a failure.
░░
░░ The job identifier is 2800 and the job result is failed.
I have already tried to reinstall docker from scratch but it did not help.
But it seems you are using an old option to set the docker data root. You should replace “-g” with “--data-root” as it can be found in the documentation:
--data-root string Root directory of persistent Docker state (default "/var/lib/docker")
Are you sure it was ran ap update which would update only the apt cache?
Well, if I’m right about the parameter, next time don’t forget to use apt-mark hold to hold docker-ce so apt upgrade will not upgrade Docker unless you manually upgrade it.
apt-mark hold docker-ce docker-ce-cli docker-ce-rootless-extras
also I updated /lib/systemd/system/docker.service
with the --data-root setting
Now I get this error:
systemctl daemon-reload
systemctl start docker
Failed to start docker.service: Unit docker.service has a bad unit file setting.
See system logs and 'systemctl status docker.service' for details.
systemctl status docker.service
Warning: The unit file, source configuration file or drop-ins of docker.service changed on disk. Run 'systemctl daemon-reload' to reload units.
× docker.service - Docker Application Container Engine
Loaded: bad-setting (Reason: Unit docker.service has a bad unit file setting.)
Drop-In: /etc/systemd/system/docker.service.d
└─00-move-library.conf
Active: failed (Result: exit-code) since Mon 2023-09-18 19:38:28 CEST; 7min ago
TriggeredBy: × docker.socket
Docs: https://docs.docker.com
Main PID: 1958 (code=exited, status=1/FAILURE)
CPU: 134ms
Sep 18 19:38:28 bolt systemd[1]: docker.service: Scheduled restart job, restart counter is at 3.
Sep 18 19:38:28 bolt systemd[1]: Stopped Docker Application Container Engine.
Sep 18 19:38:28 bolt systemd[1]: docker.service: Start request repeated too quickly.
Sep 18 19:38:28 bolt systemd[1]: docker.service: Failed with result 'exit-code'.
Sep 18 19:38:28 bolt systemd[1]: Failed to start Docker Application Container Engine.
Sep 18 19:38:29 bolt systemd[1]: docker.service: Service has more than one ExecStart= setting, which is only allowed for Type=oneshot services. Refusing.
Sep 18 19:41:00 bolt systemd[1]: docker.service: Service has more than one ExecStart= setting, which is only allowed for Type=oneshot services. Refusing.
Sep 18 19:44:06 bolt systemd[1]: docker.service: Service has more than one ExecStart= setting, which is only allowed for Type=oneshot services. Refusing.