当前位置: 首页 > 知识库问答 >
问题:

docker.service的作业失败,因为控制进程以错误代码退出

闻人和歌
2023-03-14

所以我在RHEL 7号上安装了docker引擎

现在,当我做一个

service docker start

我得到以下错误:

Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.

当我转到“systemctl status docker.service”和“journalctl-xe”时,我得到:

docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/docker.service.d
           └─docker.conf
   Active: failed (Result: exit-code) since Thu 2016-09-08 22:15:53 EDT; 10s ago
     Docs: https://docs.docker.com
  Process: 13504 ExecStart=/usr/bin/docker daemon -H fd:// --mtu 1400 --exec-opt native.cgroupdriver=systemd (code=exited, status=1/FAILURE)
 Main PID: 13504 (code=exited, status=1/FAILURE)

Sep 08 22:15:53 app-linux2.app-netapp.lab.com systemd[1]: Starting Docker Application Container Engine...
Sep 08 22:15:53 app-linux2.app-netapp.lab.com docker[13504]: time="2016-09-08T22:15:53.227074798-04:00" level=fatal msg="no sockets found via socket activation: make sure the service ...by systemd"
Sep 08 22:15:53 app-linux2.app-netapp.lab.com systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Sep 08 22:15:53 app-linux2.app-netapp.lab.com systemd[1]: Failed to start Docker Application Container Engine.
Sep 08 22:15:53 app-linux2.app-netapp.lab.com systemd[1]: Unit docker.service entered failed state.
Sep 08 22:15:53 app-linux2.app-netapp.lab.com systemd[1]: docker.service failed.

-

-- The start-up result is done.
Sep 08 22:10:01 app-linux2.app-netapp.lab.com CROND[12753]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Sep 08 22:10:01 app-linux2.app-netapp.lab.com systemd[1]: Starting Session 58 of user root.
-- Subject: Unit session-58.scope has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-58.scope has begun starting up.
Sep 08 22:10:53 app-linux2.app-netapp.lab.com polkitd[766]: Registered Authentication Agent for unix-process:12878:2674931 (system bus name :1.173 [/usr/bin/pkttyagent --notify-fd 5 --fallback], ob
Sep 08 22:10:53 app-linux2.app-netapp.lab.com systemd[1]: Starting Docker Application Container Engine...
-- Subject: Unit docker.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.service has begun starting up.
Sep 08 22:10:53 app-linux2.app-netapp.lab.com docker[12895]: time="2016-09-08T22:10:53.413304246-04:00" level=fatal msg="no sockets found via socket activation: make sure the service was started by
Sep 08 22:10:53 app-linux2.app-netapp.lab.com systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Sep 08 22:10:53 app-linux2.app-netapp.lab.com 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.
Sep 08 22:10:53 app-linux2.app-netapp.lab.com systemd[1]: Unit docker.service entered failed state.
Sep 08 22:10:53 app-linux2.app-netapp.lab.com systemd[1]: docker.service failed.
Sep 08 22:10:53 app-linux2.app-netapp.lab.com polkitd[766]: Unregistered Authentication Agent for unix-process:12878:2674931 (system bus name :1.173, object path /org/freedesktop/PolicyKit1/Authent
Sep 08 22:13:36 app-linux2.app-netapp.lab.com polkitd[766]: Registered Authentication Agent for unix-process:13214:2691210 (system bus name :1.174 [/usr/bin/pkttyagent --notify-fd 5 --fallback], ob
Sep 08 22:13:36 app-linux2.app-netapp.lab.com polkitd[766]: Unregistered Authentication Agent for unix-process:13214:2691210 (system bus name :1.174, object path /org/freedesktop/PolicyKit1/Authent
Sep 08 22:15:53 app-linux2.app-netapp.lab.com polkitd[766]: Registered Authentication Agent for unix-process:13489:2704913 (system bus name :1.175 [/usr/bin/pkttyagent --notify-fd 5 --fallback], ob
Sep 08 22:15:53 app-linux2.app-netapp.lab.com systemd[1]: Starting Docker Application Container Engine...
-- Subject: Unit docker.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.service has begun starting up.
Sep 08 22:15:53 app-linux2.app-netapp.lab.com docker[13504]: time="2016-09-08T22:15:53.227074798-04:00" level=fatal msg="no sockets found via socket activation: make sure the service was started by
Sep 08 22:15:53 app-linux2.app-netapp.lab.com systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Sep 08 22:15:53 app-linux2.app-netapp.lab.com 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.
Sep 08 22:15:53 app-linux2.app-netapp.lab.com systemd[1]: Unit docker.service entered failed state.
Sep 08 22:15:53 app-linux2.app-netapp.lab.com systemd[1]: docker.service failed.
Sep 08 22:15:53 app-linux2.app-netapp.lab.com polkitd[766]: Unregistered Authentication Agent for unix-process:13489:2704913 (system bus name :1.175, object path /org/freedesktop/PolicyKit1/Authent
lines 3473-3523/3523 (END)

我试图寻找解决办法,但没有找到任何答案。

共有3个答案

宗乐池
2023-03-14

你使用什么版本的Docker?如果您没有锁定到旧版本,请考虑使用最新版本(目前是1.12)。以下是我的启动选项(Debian 8,/etc/systemd/system/docker.service):

[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
After=network.target docker.socket
Requires=docker.socket

[Service]
Type=notify
ExecStart=/usr/bin/docker daemon -H fd:// --dns=10.240.116.7 --dns 8.8.8.8  --bip=172.17.42.1/24
MountFlags=slave
LimitNOFILE=1048576
LimitNPROC=1048576
LimitCORE=infinity
TimeoutStartSec=0

[Install]
WantedBy=multi-user.target

也试着在没有< code>systemd的情况下,以调试模式(< code>-D)启动Docker,就像它是一个普通程序一样。这将有助于找出守护进程不启动的原因。

从智明
2023-03-14

检查操作系统日志文件中的警告或错误消息。< br >可能您在docker的配置文件中犯了一个错误,当服务启动时会出现一个错误。

日志的位置取决于您的操作系统。在Linux系统上,日志通常位于:

    < Li > < code >/var/log/daemon . log < Li > < code >/var/log/docker < Li > < code >/var/log/messages < Li > < code >/var/log/syslog < Li > < code >/var/log/upstart/docker . log

一些有用的 linux 控制台命令来检查泊坞站日志

  • sudo systemctl status docker.service
  • sudo journalctl -fu docker.service
  • cat /var/log/daemon.log | grep docker
  • 猫 /var/日志/消息 | grep docker

如果您正在使用Windows,本文可能会有所帮助
以下是详细信息

叶明辉
2023-03-14

只需删除Docker Lib并重新启动:

sudo rm -rf  /var/lib/docker

然后

sudo systemctl enable docker
sudo systemctl start docker
 类似资料:
  • 我正在尝试使用NPM5.6.0在Windows 10上安装模块。当我进入npm安装时,我得到: 似乎节点sass安装错误。环境如下: Python版本:2.7.14 npm版本:5.6.0 节点版本:8.10.0 ruby版本: 2.3.3p222 (2016-11-21修订56859)[i386-mingw32] 系统:win10(x64) node-gyp: 3.6.2 而且我已经安装了Mic

  • 我有一个单一的. rs文件。当我用编译它时,我得到一个错误: 我见过一些与此相关的话题,但没有一个能帮助我解决问题。

  • 我试图运行ionic build Android--release命令来构建apk,但是我得到了这个错误 构建失败 总时间:2.623秒错误:cmd:命令失败,退出代码为1错误输出:失败:生成失败,出现异常。 错误:配置root项目'Android'时出现问题。您尚未接受以下SDK组件的许可协议:[Android SDK Platform25]。在构建项目之前,您需要接受许可协议,并使用Andro

  • 您好,我是一个新的角度和量角器,我得到了“e/发射器-进程退出与错误代码199”这个错误在我的代码 但是当我试图通过下面的命令“protrator”filepath\conf.js“运行protrator时,出现了”e-launcher process exited with error code 199“错误。有人能告诉我,我在哪里出错了吗?我使用的是chrome 54和量角器版本5.3.0

  • 使用的配置: 请提及其他可能有用的细节。 我正在尝试从我的windows机器运行量角器测试。我得到以上错误,请帮助!!