1. Docker failed to start after installation
[root@tbase1 ~]# systemctl start docker
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
[root@tbase1 ~]#
[root@tbase1 ~]# journalctl -xe
Oct 22 11:10:36 tbase1 systemd[1]: Unit docker.service entered failed state.
Oct 22 11:10:36 tbase1 systemd[1]: docker.service failed.
Oct 22 11:10:38 tbase1 systemd[1]: docker.service holdoff time over, scheduling restart.
Oct 22 11:10:38 tbase1 systemd[1]: Stopping Docker Socket for the API.
-- Subject: Unit docker.socket has begun shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.socket has begun shutting down.
Oct 22 11:10:38 tbase1 systemd[1]: Starting Docker Socket for the API.
-- Subject: Unit docker.socket has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.socket has begun starting up.
Oct 22 11:10:38 tbase1 systemd[1]: Listening on Docker Socket for the API.
-- Subject: Unit docker.socket has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.socket has finished starting up.
--
-- The start-up result is done.
Oct 22 11:10:38 tbase1 systemd[1]: start request repeated too quickly for docker.service
Oct 22 11:10:38 tbase1 systemd[1]: Failed to start Docker Application Container Engine.
-- Subject: Unit docker.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.service has failed.
--
-- The result is failed.
Oct 22 11:10:38 tbase1 systemd[1]: Unit docker.service entered failed state.
Oct 22 11:10:38 tbase1 systemd[1]: docker.service failed.
[root@tbase1 ~]# systemctl stop docker
[root@tbase1 ~]#
[root@tbase1 ~]#
[root@tbase1 ~]# systemctl start docker
Job for docker.service failed because start of the service was attempted too often. See "systemctl status docker.service" and "journalctl -xe" for details.
To force a start use "systemctl reset-failed docker.service" followed by "systemctl start docker.service" again.
[root@tbase1 ~]#
[root@tbase1 ~]#
Json to /etc/docker/ daemone.conf, but not daemone.json. But mine is the newly installed Docker, /etc/docker has no such file under it.
[root@tbase1 docker]# cd /etc/docker/
[root@tbase1 docker]# ls
key.json
[root@tbase1 docker]#
3. Start dockerd directly and check the log
[root@tbase1 docker]# dockerd
INFO[2020-10-22T11:17:08.729949738+08:00] Starting up
INFO[2020-10-22T11:17:08.732247548+08:00] parsed scheme: "unix" module=grpc
INFO[2020-10-22T11:17:08.732274835+08:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2020-10-22T11:17:08.732298172+08:00] ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock 0 <nil>}] <nil>} module=grpc
INFO[2020-10-22T11:17:08.732306615+08:00] ClientConn switching balancer to "pick_first" module=grpc
INFO[2020-10-22T11:17:08.733766403+08:00] parsed scheme: "unix" module=grpc
INFO[2020-10-22T11:17:08.733793158+08:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2020-10-22T11:17:08.733807436+08:00] ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock 0 <nil>}] <nil>} module=grpc
INFO[2020-10-22T11:17:08.733813642+08:00] ClientConn switching balancer to "pick_first" module=grpc
failed to start daemon: error initializing graphdriver: /var/lib/docker contains several valid graphdrivers: overlay2, devicemapper; Please cleanup or explicitly choose storage driver (-s <DRIVER>)
[root@tbase1 docker]#
error mainly due to failed to start daemon: error initializing graphdriver: /var/lib/docker contains several valid graphdrivers: overlay2, devicemapper; Please cleanup or explicitly choose storage driver (-s < DRIVER>) .
4, according to the above error, first put /var/lib/docker under overlay2,devicemapper mv drop
[root@tbase1 docker]# cd /var/lib/
[root@tbase1 lib]# ls
AccountsService color dnsmasq geoclue misc pacemaker pulse spamassassin upower
alsa colord docker gssproxy mlocate PackageKit rasdaemon stateless virtuoso
alternatives containerd dovecot hyperv net-snmp pcp rhsm stolon vmware
amanda containers etcd initramfs NetworkManager pcsd rpcbind systemd xkb
authconfig corosync flatpak iscsi nfs Pegasus rpm tpm yum
bluetooth cs fprint libvirt openlmi-registration plymouth rpm-state tuned
chrony dbus games logrotate openlmi-storage polkit-1 rsyslog udisks2
cockpit dhclient gdm machines os-prober postfix samba unbound
[root@tbase1 lib]# cd docker/
[root@tbase1 docker]# ls
containers devicemapper image network overlay2 plugins runtimes swarm tmp trust volumes
[root@tbase1 docker]#
[root@tbase1 docker]#
[root@tbase1 docker]# mv overlay2 overlay2_back
[root@tbase1 docker]# mv devicemapper/ devicemapper_bak
[root@tbase1 docker]# ls -ltr
total 0
drwx------ 4 root root 32 Aug 23 20:02 plugins
drwx------ 2 root root 6 Aug 23 20:02 trust
drwxr-x--- 3 root root 19 Aug 23 20:02 network
drwx------ 2 root root 6 Aug 23 20:02 swarm
drwx------ 4 root root 42 Aug 23 20:09 image
drwx------ 5 root root 53 Aug 23 20:10 devicemapper_bak
drwx------ 3 root root 78 Aug 23 20:10 containers
drwx------ 3 root root 97 Aug 23 20:10 volumes
drwx------ 2 root root 6 Oct 22 11:17 tmp
drwx------ 2 root root 6 Oct 22 11:17 runtimes
drwx------ 3 root root 40 Oct 22 11:17 overlay2_back
5. Start docker
again
[root@tbase1 docker]# systemctl start docker
[root@tbase1 docker]# systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
Active: active (running) since Thu 2020-10-22 11:19:37 CST; 27s ago
Docs: https://docs.docker.com
Main PID: 1926 (dockerd)
Memory: 56.0M
CGroup: /system.slice/docker.service
└─1926 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
Oct 22 11:19:36 tbase1 dockerd[1926]: time="2020-10-22T11:19:36.905481889+08:00" level=info msg="scheme \"unix\" no...e=grpc
Oct 22 11:19:36 tbase1 dockerd[1926]: time="2020-10-22T11:19:36.905497425+08:00" level=info msg="ccResolverWrapper:...e=grpc
Oct 22 11:19:36 tbase1 dockerd[1926]: time="2020-10-22T11:19:36.905504796+08:00" level=info msg="ClientConn switchi...e=grpc
Oct 22 11:19:36 tbase1 dockerd[1926]: time="2020-10-22T11:19:36.917251460+08:00" level=info msg="Loading containers: start."
Oct 22 11:19:37 tbase1 dockerd[1926]: time="2020-10-22T11:19:37.071539867+08:00" level=info msg="Default bridge (do...dress"
Oct 22 11:19:37 tbase1 dockerd[1926]: time="2020-10-22T11:19:37.099207556+08:00" level=info msg="Loading containers: done."
Oct 22 11:19:37 tbase1 dockerd[1926]: time="2020-10-22T11:19:37.147549150+08:00" level=info msg="Docker daemon" com....03.13
Oct 22 11:19:37 tbase1 dockerd[1926]: time="2020-10-22T11:19:37.147636946+08:00" level=info msg="Daemon has complet...ation"
Oct 22 11:19:37 tbase1 dockerd[1926]: time="2020-10-22T11:19:37.164192481+08:00" level=info msg="API listen on /var....sock"
Oct 22 11:19:37 tbase1 systemd[1]: Started Docker Application Container Engine.
Hint: Some lines were ellipsized, use -l to show in full.
p>
div>
Read More:
- Job for docker.service failed because the control process exited with error code. See systemctl sta
- Nginx start error: job for nginx.service failed because the control process exited with error code
- Job for network.service Failed because the control process exited with error code. See “SystemC
- Linux virtual machine network “job for” network.service failed because the control process exited with error code”
- Docker start error: failed to start docker application container engine.
- Failed to start docker.service : unit not found
- Apache2 cannot be started and an error is reported for apache2.service failed because the control process exited with error code.
- Docker service start, restart, close command
- [Sovled] Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
- docker service Failed to get D-Bus connection: Operation not permitted
- NVIDIA docker failed to start normally
- docker: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled
- The installation of docker desktop failed. After successful installation, the docker can not be started
- Solution to device or resource busy error in docker redeployment service
- Mongodb failed to start: child process failed, exited with error number 100
- Docker starts the image and reports an error. Iptables failed: iptables — wait – t NAT – a docker – P TCP
- com.docker.osx.hyperkit.linux failed to start Exit code 1
- Docker was unable to connect to the docker daemons
- How to Fix ERROR: Couldn’t connect to Docker daemon at http+docker://localhost – is it running?
- Solve the problem of copy failed: stat / var / lib / docker / TMP / docker builder 455335933 / opt: no such file or directory