容器启动报错-runc找不到

场景

容器启动失败,报错日志如下

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

重启相关容器即可

本文地址:https://blog.csdn.net/xys2015/article/details/109624718