linux - Docker.Service 无法在 Manjaro XFCE Linux 上启动
问题描述
我在让 docker 在 Manjaro XFCE 上运行时遇到问题。
我已经安装了它:
sudo pacman -Syu
sudo pacman -S docker
并尝试使用以下方式运行它:
sudo systemctl start docker.service
但它因此错误而失败:
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
:
[nimbi@nimbi-manjaro ~]$ systemctl status docker.service
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2020-10-29 01:31:09 MST; 14min ago
TriggeredBy: ● docker.socket
Docs: https://docs.docker.com
Process: 14837 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
Main PID: 14837 (code=exited, status=1/FAILURE)
Oct 29 01:31:09 nimbi-manjaro systemd[1]: docker.service: Scheduled restart job, restart counter is at 3.
Oct 29 01:31:09 nimbi-manjaro systemd[1]: Stopped Docker Application Container Engine.
Oct 29 01:31:09 nimbi-manjaro systemd[1]: docker.service: Start request repeated too quickly.
Oct 29 01:31:09 nimbi-manjaro systemd[1]: docker.service: Failed with result 'exit-code'.
Oct 29 01:31:09 nimbi-manjaro systemd[1]: Failed to start Docker Application Container Engine.
journalctl -xe
显示了这一点:
░░ The job identifier is 4697.
Oct 29 01:31:09 nimbi-manjaro systemd[1]: docker.service: Start request repeated too quickly.
Oct 29 01:31:09 nimbi-manjaro systemd[1]: docker.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://forum.manjaro.org/c/support
░░
░░ The unit docker.service has entered the 'failed' state with result 'exit-code'.
Oct 29 01:31:09 nimbi-manjaro systemd[1]: Failed to start Docker Application Container Engine.
░░ Subject: A start job for unit docker.service has failed
░░ Defined-By: systemd
░░ Support: https://forum.manjaro.org/c/support
░░
░░ A start job for unit docker.service has finished with a failure.
░░
░░ The job identifier is 4631 and the job result is failed.
Oct 29 01:31:09 nimbi-manjaro systemd[1]: docker.socket: Failed with result 'service-start-limit-hit'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://forum.manjaro.org/c/support
░░
░░ The unit docker.socket has entered the 'failed' state with result 'service-start-limit-hit'.
lines 1990-2012/2012 (END)
尝试手动运行它会响应:
[nimbi@nimbi-manjaro ~]$ /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
INFO[2020-10-29T01:53:00.526035448-07:00] Starting up
dockerd needs to be started with root. To see how to run dockerd in rootless mode with unprivileged user, see the documentation
[nimbi@nimbi-manjaro ~]$ sudo /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
INFO[2020-10-29T01:53:08.550576442-07:00] Starting up
failed to load listeners: no sockets found via socket activation: make sure the service was started by systemd
有人知道怎么修这个东西吗?
我也尝试通过 AUR 包重新安装,但我遇到了完全相同的问题。
如果有帮助,我正在使用 Manjaro XFCE 20.1.2。
- -编辑 - -
我想我想通了...
我必须使用sudo systemctl enable docker.service
然后键入reboot
让它自动启动。
它现在正在运行。
这是我当前的systemctl status docker.service
命令输出:
[nimbi@nimbi-manjaro ~]$ systemctl status docker.service
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor p>
Active: active (running) since Thu 2020-10-29 02:09:12 MST; 3min 10s ago
TriggeredBy: ● docker.socket
Docs: https://docs.docker.com
Main PID: 946 (dockerd)
Tasks: 15
Memory: 72.9M
CGroup: /system.slice/docker.service
└─946 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/cont>
Oct 29 02:09:10 nimbi-manjaro dockerd[946]: time="2020-10-29T02:09:10.29207978>
Oct 29 02:09:10 nimbi-manjaro dockerd[946]: time="2020-10-29T02:09:10.29210347>
Oct 29 02:09:10 nimbi-manjaro dockerd[946]: time="2020-10-29T02:09:10.36927019>
Oct 29 02:09:11 nimbi-manjaro dockerd[946]: time="2020-10-29T02:09:11.20664981>
Oct 29 02:09:11 nimbi-manjaro dockerd[946]: time="2020-10-29T02:09:11.50144324>
Oct 29 02:09:11 nimbi-manjaro dockerd[946]: time="2020-10-29T02:09:11.96303711>
Oct 29 02:09:11 nimbi-manjaro dockerd[946]: time="2020-10-29T02:09:11.96351080>
Oct 29 02:09:11 nimbi-manjaro dockerd[946]: time="2020-10-29T02:09:11.97714186>
Oct 29 02:09:12 nimbi-manjaro dockerd[946]: time="2020-10-29T02:09:12.58058471>
Oct 29 02:09:12 nimbi-manjaro systemd[1]: Started Docker Application Container
解决方案
推荐阅读
- next.js - 设置下一个/高度满
- search - 将搜索引擎重定向到特定路线,即。'mydomain.com/somepath'
- angular - Angular StackBlitz 错误:[NoSuchMethodError:找不到方法:'write$1' on null]
- java - 当 root == null 时,Java TreeMap put() 方法中 compare(key, key) 的目的是什么?
- python - 执行脚本时设置变量 __name__ 的值的可能性
- php - 在 PhpStorm 中使用 Xdebug 时,获取“调试会话已完成而没有暂停”并且不会停止执行
- node.js - 发出 POST 请求以更改用户密码时出错
- gcc - 使用 __auto_type 初始化 C 数组
- javascript - 使用 JavaScript 对 HTML 表进行数据类型不可知的排序
- pandas - 如何使用 MultiIndex 在数据框中选择一个值?