场景
容器启动失败,报错日志如下
time="2020-09-30T14:11:55+08:00" level=error msg="docker Start failed API error (500): {\"message\":\"OCI runtime create failed: unable to retrieve OCI runtime error (open /run/containerd/io.containerd.runtime.v1.linux/moby/30fdb2f047c1e5d9a2b7d478883626e7b920ee97046d5ce2cd84c5bc8cac5792/log.json: no such file or directory): fork/exec /usr/bin/runc: no such file or directory: unknown\"}\n" line="docker/create.go:264"
time="2020-09-30T14:11:55+08:00" level=error msg="docker start due to API error (500): {\"message\":\"OCI runtime create failed: unable to retrieve OCI runtime error (open /run/containerd/io.containerd.runtime.v1.linux/moby/30fdb2f047c1e5d9a2b7d478883626e7b920ee97046d5ce2cd84c5bc8cac5792/log.json: no such file or directory): fork/exec /usr/bin/runc: no such file or directory: unknown\"}\n\n" containerID=69017 line="docker/create.go:267"
这个 /usr/bin/runc 文件找不到到问题,疑似docker bug,参考 https://github.com/cri-o/cri-o/issues/1767
解决
做软链接
type runc
ln -s /sbin/runc /usr/bin/runc
重启相关容器即可
本文记录了一次容器启动失败的问题排查过程,错误信息显示无法找到 /usr/bin/runc 文件,通过创建软链接指向 /sbin/runc 解决了该问题。
2377

被折叠的 条评论
为什么被折叠?



