[Docker] Docker 服務缺少 libseccomp.so.2 無法啟動
最近 Docker 的怪事還真不少…
原本在 CentOS 上的 Docker 跑的好好的,
但今天想跑的時候,卻發現 docker 服務跑不起來:
root@localhost / # 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.
用 systemctl status docker.service 查看,
發現有個 error while loading shared libraries: libseccomp.so.2 的錯誤:
root@localhost / # 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 Tue 2020-09-08 16:20:54 CST; 11s ago Docs: http://docs.docker.com Process: 4008 ExecStart=/usr/bin/dockerd-current --add-runtime docker-runc=/usr/libexec/docker/docker-runc-current --default-runtime=docker-runc --exec-opt native.cgroupdriver=systemd --userland-proxy-path=/usr/libexec/docker/docker-proxy-current --init-path=/usr/libexec/docker/docker-init-current --seccomp-profile=/etc/docker/seccomp.json $OPTIONS $DOCKER_STORAGE_OPTIONS $DOCKER_NETWORK_OPTIONS $ADD_REGISTRY $BLOCK_REGISTRY $INSECURE_REGISTRY $REGISTRIES (code=exited, status=127) Main PID: 4008 (code=exited, status=127) Sep 08 16:20:54 localhost systemd[1]: Starting Docker Application Container Engine... Sep 08 16:20:54 localhost dockerd-current[4008]: /usr/bin/dockerd-current: error while loading shared libraries: libseccomp.so.2: cannot open shared object file: No such...r directory Sep 08 16:20:54 localhost systemd[1]: docker.service: main process exited, code=exited, status=127/n/a Sep 08 16:20:54 localhost systemd[1]: Failed to start Docker Application Container Engine. Sep 08 16:20:54 localhost systemd[1]: Unit docker.service entered failed state. Sep 08 16:20:54 localhost systemd[1]: docker.service failed.
這個 libseccomp 看起來好像是一個 Linux syscall 的過濾機制,
細節不懂,不過應該是 Docker 有用到的東西,
用 yum 把它裝好後,docker 服務就可以啟動了:
yum install libseccomp systemctl start docker
docker 服務的狀態也是正常的囉:
root@localhost / # 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 Tue 2020-09-08 16:24:06 CST; 5s ago Docs: http://docs.docker.com Main PID: 6914 (dockerd-current) CGroup: /system.slice/docker.service ├─6914 /usr/bin/dockerd-current --add-runtime docker-runc=/usr/libexec/docker/docker-runc-current --default-runtime=docker-runc --exec-opt native.cgroupdriver=syste... └─6926 /usr/bin/docker-containerd-current -l unix:///var/run/docker/libcontainerd/docker-containerd.sock --metrics-interval=0 --start-timeout 2m --state-dir /var/ru... Sep 08 16:24:06 localhost dockerd-current[6914]: time="2020-09-08T16:24:06.344848935+08:00" level=warning msg="Docker could not enable SELinux on the host system" Sep 08 16:24:06 localhost dockerd-current[6914]: time="2020-09-08T16:24:06.401807572+08:00" level=info msg="Graph migration to content-addressability took 0.00 seconds" Sep 08 16:24:06 localhost dockerd-current[6914]: time="2020-09-08T16:24:06.403124876+08:00" level=info msg="Loading containers: start." Sep 08 16:24:06 localhost dockerd-current[6914]: time="2020-09-08T16:24:06.541780889+08:00" level=info msg="Firewalld running: false" Sep 08 16:24:06 localhost dockerd-current[6914]: time="2020-09-08T16:24:06.683700019+08:00" level=info msg="Default bridge (docker0) is assigned with an IP address 172.1...IP address" Sep 08 16:24:06 localhost dockerd-current[6914]: time="2020-09-08T16:24:06.731530652+08:00" level=info msg="Loading containers: done." Sep 08 16:24:06 localhost dockerd-current[6914]: time="2020-09-08T16:24:06.762834159+08:00" level=info msg="Daemon has completed initialization" Sep 08 16:24:06 localhost dockerd-current[6914]: time="2020-09-08T16:24:06.762890537+08:00" level=info msg="Docker daemon" commit="64e9980/1.13.1" graphdriver=overlay2 version=1.13.1 Sep 08 16:24:06 localhost dockerd-current[6914]: time="2020-09-08T16:24:06.773279309+08:00" level=info msg="API listen on /var/run/docker.sock" Sep 08 16:24:06 localhost systemd[1]: Started Docker Application Container Engine.
(本頁面已被瀏覽過 1,820 次)