Containerd OCI runtime create failed

庆云2年前技术文章1897

1、背景

Kubernetes 集群新增 worker 节点(centos7、containerd),发现容器一直启动不起来。

01-containerd-alarm.png


2、报错信息

经查看系统 message 日志发现如下报错信息:

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

01-system-message.png


3、报错解决

判断是 runc 异常,执行 /usr/local/sbin/runc -v 命令发现缺少依赖包 libseccomp:

$ /usr/local/sbin/runc -v
/usr/local/sbin/runc: error while loading shared libraries: libseccomp.so.2: cannot open shared object file: No such file or directory


经下载发现 centos7 中 yum 下载的版本是 2.3 的,未解决我们的报错,版本不满足最新 containerd 的需求,需要下载 2.4 以上的版本。

# 卸载旧版 libseccomp
$ rpm -qa | grep libseccomp
libseccomp-2.3.1-4.el7.x86_64
$ rpm -e libseccomp-devel-2.3.1-4.el7.x86_64 --nodeps
$ rpm -e libseccomp-2.3.1-4.el7.x86_64 --nodeps

# 下载新版 libseccomp
$ wget http://rpmfind.net/linux/centos/8-stream/BaseOS/x86_64/os/Packages/libseccomp-2.5.1-1.el8.x86_64.rpm

# 安装软件
$ rpm -ivh libseccomp-2.5.1-1.el8.x86_64.rpm
warning: libseccomp-2.5.1-1.el8.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 8483c65d: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
  1:libseccomp-2.5.1-1.el8           ################################# [100%]

# 查看版本
$ rpm -qa | grep libseccomp
libseccomp-2.5.1-1.el8.x86_64


再次执行 /usr/local/sbin/runc -v 命令,未发现报错,此时容器也已经正常。

$ /usr/local/sbin/runc -v
runc version 1.1.2
commit: v1.1.2-0-ga916309f
spec: 1.0.2-dev
go: go1.17.11
libseccomp: 2.5.

01-containerd-alarm-recovery.png


相关文章

阿里云上oracle 11g rac部署

1 环境规划1.1 物理环境规划ECS 类型服务器类型服务器配置操作系统版本Oracle 版本阿里云g7se8C 32GCentOS 7.911.2.0.4.01.2 磁盘规划DBNAMEHOSTNA...

Kubernetes源码解读(五)--Reflector源码分析

Reflector 的任务就是向 apiserver watch 特定类型的资源,拿到变更通知后将其丢到 DeltaFIFO 队列中。1、Reflector的启动过程Reflector定义在k8s.i...

python脚本--检查域名证书到期时间

需要的依赖:pip install python-dateutil pip install pytzpython脚本内容:#!/usr/bin/env python3      import s...

寻找CPU使用率高进程方法

寻找CPU使用率高进程方法

背景节点报CPU使用率高,需要定位是什么进程占用CPU使用率高。CPU使用率持续较高在对应节点使用 “top”命令,然后键盘输入“P”,即按照CPU使用率排序进程。执行ps -ef | grep &l...

trino组件对接hive(一)

前提:本文是在部署了trino组件和hive组件后,进行的trino与hive组件的对接。1、增加hive connector配置在trino安装部署下的etc/catalog下,创建hive.pro...

REPMGR-PG高可用搭建(三)

REPMGR-PG高可用搭建(三)

2.2.2repmgr安装兼容性3节点均安装repmgr1.安装依赖 # yum install flex 2.下载解压 # wget -c https://repmgr.org/downloa...

发表评论    

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。