docker起動異常問題処理

6165 ワード

システムバージョン:CentOS Linux release 7.6.1810(Core)
次の方法でdockerをインストールした後、起動に失敗しました.
$ sudo yum update
$ curl -fsSL https://get.docker.com -o get-docker.sh
$ sudo sh get-docker.sh
sudo systemctl start docker
[root@localhost ~]# sudo 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@localhost ~]# systemctl status docker.service

● docker.service - Docker Application Container Engine

   Loaded: loaded (/etc/systemd/system/docker.service; disabled; vendor preset: disabled)

  Drop-In: /etc/systemd/system/docker.service.d

           └─mountflags-slave.conf, overlay.conf

   Active: failed (Result: exit-code) since   2019-03-28 19:00:02 CST; 5s ago

     Docs: http://docs.docker.com

  Process: 20988 ExecStart=/usr/bin/docker daemon -H fd:// -s overlay (code=exited, status=125)

 Main PID: 20988 (code=exited, status=125)



3  28 19:00:02 localhost.localdomain docker[20988]: tag         Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE

3  28 19:00:02 localhost.localdomain docker[20988]: top         Display the running processes of a container

3  28 19:00:02 localhost.localdomain docker[20988]: unpause     Unpause all processes within one or more containers

3  28 19:00:02 localhost.localdomain docker[20988]: update      Update configuration of one or more containers

3  28 19:00:02 localhost.localdomain docker[20988]: version     Show the Docker version information

3  28 19:00:02 localhost.localdomain docker[20988]: wait        Block until one or more containers stop, then print their exit codes

3  28 19:00:02 localhost.localdomain docker[20988]: Run 'docker COMMAND --help' for more information on a command.

3  28 19:00:02 localhost.localdomain systemd[1]: Failed to start Docker Application Container Engine.

3  28 19:00:02 localhost.localdomain systemd[1]: Unit docker.service entered failed state.

3  28 19:00:02 localhost.localdomain systemd[1]: docker.service failed.

 journalctl -xe  :

[root@localhost ~]# journalctl -xe

3  28 19:00:02 localhost.localdomain docker[20988]: pause       Pause all processes within one or more containers

3  28 19:00:02 localhost.localdomain docker[20988]: port        List port mappings or a specific mapping for the container

3  28 19:00:02 localhost.localdomain docker[20988]: ps          List containers

3  28 19:00:02 localhost.localdomain docker[20988]: pull        Pull an image or a repository from a registry

3  28 19:00:02 localhost.localdomain docker[20988]: push        Push an image or a repository to a registry

3  28 19:00:02 localhost.localdomain docker[20988]: rename      Rename a container

3  28 19:00:02 localhost.localdomain docker[20988]: restart     Restart one or more containers

3  28 19:00:02 localhost.localdomain docker[20988]: rm          Remove one or more containers

3  28 19:00:02 localhost.localdomain docker[20988]: rmi         Remove one or more images

3  28 19:00:02 localhost.localdomain docker[20988]: run         Run a command in a new container

3  28 19:00:02 localhost.localdomain docker[20988]: save        Save one or more images to a tar archive (streamed to STDOUT by default)

3  28 19:00:02 localhost.localdomain docker[20988]: search      Search the Docker Hub for images

3  28 19:00:02 localhost.localdomain docker[20988]: start       Start one or more stopped containers

3  28 19:00:02 localhost.localdomain docker[20988]: stats       Display a live stream of container(s) resource usage statistics

3  28 19:00:02 localhost.localdomain docker[20988]: stop        Stop one or more running containers

3  28 19:00:02 localhost.localdomain docker[20988]: tag         Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE

3  28 19:00:02 localhost.localdomain docker[20988]: top         Display the running processes of a container

3  28 19:00:02 localhost.localdomain docker[20988]: unpause     Unpause all processes within one or more containers

3  28 19:00:02 localhost.localdomain docker[20988]: update      Update configuration of one or more containers

3  28 19:00:02 localhost.localdomain docker[20988]: version     Show the Docker version information

3  28 19:00:02 localhost.localdomain docker[20988]: wait        Block until one or more containers stop, then print their exit codes

3  28 19:00:02 localhost.localdomain docker[20988]: Run 'docker COMMAND --help' for more information on a command.

3  28 19:00:02 localhost.localdomain 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.

3  28 19:00:02 localhost.localdomain polkitd[8238]: Unregistered Authentication Agent for unix-process:20982:70252921 (system bus name :1.664, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, loca

3  28 19:00:02 localhost.localdomain systemd[1]: Unit docker.service entered failed state.

3  28 19:00:02 localhost.localdomain sudo[20981]: pam_unix(sudo:session): session closed for user root

3  28 19:00:02 localhost.localdomain systemd[1]: docker.service failed.

3  28 19:01:01 localhost.localdomain systemd[1]: Started Session 314 of user root.

-- Subject: Unit session-314.scope has finished start-up

-- Defined-By: systemd

-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

-- 

-- Unit session-314.scope has finished starting up.

-- 

-- The start-up result is done.

3  28 19:01:01 localhost.localdomain CROND[21009]: (root) CMD (run-parts /etc/cron.hourly)

3  28 19:01:01 localhost.localdomain run-parts(/etc/cron.hourly)[21012]: starting 0anacron

3  28 19:01:01 localhost.localdomain run-parts(/etc/cron.hourly)[21018]: finished 0anacron

 
 
長い間何が原因なのか分からないが、/etc/systemd/system/ディレクトリの下のdockerをクリアするしかない.サービスとdocker.service.dフォルダ
再インストール、完了!