docker 启动异常问题处理

系统版本: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.service和docker.service.d文件夹

重新安装,搞定!

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值