【containerd错误解决系列】failed to create shim task, OCI runtime create failed, unable to retrieve OCI...

这篇具有很好参考价值的文章主要介绍了【containerd错误解决系列】failed to create shim task, OCI runtime create failed, unable to retrieve OCI...。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

环境

# cat /etc/redhat-release
CentOS Linux release 8.0.1905 (Core) 

# uname -r
4.18.0-348.rt7.130.el8.x86_64

问题及现象

  1. pod的状态全部都是ContainerCreating的状态

【containerd错误解决系列】failed to create shim task, OCI runtime create failed, unable to retrieve OCI...

  1. containerd进程有大量报错,主要有:

failed to create containerd task: failed to create shim task: OCI runtime create failed: unable to retrieve OCI runtime error (open /run/containerd/io.containerd.runtime.v2.task/k8s.io/c4847070fad34a8da9b16b5c20cdc38e28a15cfcf9913d712e4fe60d8c9029f7/log.json: no such file or directory): runc did not terminate successfully: exit status 127: unknown

【containerd错误解决系列】failed to create shim task, OCI runtime create failed, unable to retrieve OCI...

解决方案

查看现有libseccomp版本

# sudo rpm -qa | grep libseccomp
libseccomp-2.3.3-3.el8.x86_64


卸载低版本libseccomp

# sudo rpm -e libseccomp-2.3.3-3.el8.x86_64 --nodeps

# sudo rpm -qa | grep libseccomp
#

安装高版本libseccomp

# yum provides libseccomp
Last metadata expiration check: 0:48:39 ago on Tue 28 Mar 2023 01:49:06 PM CST.
libseccomp-2.5.2-1.el8.i686 : Enhanced seccomp library
Repo        : Base
Matched from:
Provide    : libseccomp = 2.5.2-1.el8

libseccomp-2.5.2-1.el8.x86_64 : Enhanced seccomp library
Repo        : Base
Matched from:
Provide    : libseccomp = 2.5.2-1.el8


# yum install libseccomp-2.5.2-1.el8.x86_64
Last metadata expiration check: 0:49:46 ago on Tue 28 Mar 2023 01:49:06 PM CST.
Dependencies resolved.
======================================================================================================================================================================
 Package                                   Arch                                  Version                                    Repository                           Size
======================================================================================================================================================================
Installing:
 libseccomp                                x86_64                                2.5.2-1.el8                                Base                                 71 k

Transaction Summary
======================================================================================================================================================================
Install  1 Package

Total download size: 71 k
Installed size: 166 k
Is this ok [y/N]: y
Downloading Packages:
libseccomp-2.5.2-1.el8.x86_64.rpm                                                                                                      38 MB/s |  71 kB     00:00    
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                 7.0 MB/s |  71 kB     00:00     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                              1/1 
  Installing       : libseccomp-2.5.2-1.el8.x86_64                                                                                                                1/1 
  Running scriptlet: libseccomp-2.5.2-1.el8.x86_64                                                                                                                1/1 
  Verifying        : libseccomp-2.5.2-1.el8.x86_64                                                                                                                1/1 

Installed:
  libseccomp-2.5.2-1.el8.x86_64                                                                                                                                       

Complete!


# sudo rpm -qa | grep libseccomp
libseccomp-2.5.2-1.el8.x86_64

解决后现象

  1. pod状态

安装之后,不用重启containerd进程,就看到了目前pod的状态都正常了

【containerd错误解决系列】failed to create shim task, OCI runtime create failed, unable to retrieve OCI...

  1. runc中依赖的libseccomp
    libseccomp已经是高版本的了
# runc --version
runc version 1.1.4
commit: v1.1.4-0-g5fd4c4d1
spec: 1.0.2-dev
go: go1.18.10
libseccomp: 2.5.2

原理

libseccomp需要高于2.4版本

containerd.io 要求安装版本为 2.4.0 的 libseccomp

具体官方依据还未找到,后续找到补充

参考

k8s系列-06-containerd的基本操作 卸载安装libeseccomp
containerd.io depends libseccomp2 ( = 2.4.0) but 2.3.1-2.1ubuntu4 is to be installed文章来源地址https://www.toymoban.com/news/detail-424848.html

到了这里,关于【containerd错误解决系列】failed to create shim task, OCI runtime create failed, unable to retrieve OCI...的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包