首页 > 其他分享 >/usr/bin/containerd: Operation not permitted

/usr/bin/containerd: Operation not permitted

时间:2022-11-22 21:01:46浏览次数:59  
标签:bin LIMITS service LimitNPROC containerd 65535 Operation docker

问题

今天在重启docker程序的时候一直启动不起来,通过systemctl status docker和jourctl -xu docker也没有发现什么有用的报错信息,无奈只好查看/var/log/message,发现以下错误提示:

Started containerd container runtime
Starting Docker Application Container Engine...
Failed at step LIMITS spawning /usr/bin/containerd: Operation not permitted
containerd.service: main process exited, code=exited, status=205/LIMITS
Unit containerd.service entered failed state.
containerd.service failed.

其中最为关键的信息是 Failed at step LIMITSstatus=205/LIMITS,两个Limits信息

解决过程

看到有limits报错提示,本身的想到是不是系统ulimits和sysctl.conf里面的最大打开文件数是不是不够,查看以下信息:

ulimit -n
65535
sysctl -a|grep fs.nr_open
fs.nr_open = 65535

发现这两处都已经配置了,再查看一下当年已经打开的文件数

lsof -Ki|wc -l
14138

发现打开的文件数也没有超过系统设置的上限 百度搜索网友的解答说是docker.servicecontainerd.service里面有一项配置不能超过系统的配置 1、修改 /usr/lib/systemd/system/docker.serviceLimitNOFILELimitNPROCLimitCORE这三个选项的值都改成65535

LimitNOFILE=65535
LimitNPROC=65535
LimitCORE=65535

2、修改/usr/lib/systemd/system/containerd.serviceLimitNOFILELimitNPROCLimitCORETasksMax这三个选项的值都改成65535

LimitNOFILE=65535
LimitNPROC=65535
LimitCORE=65535
TasksMax=65535

然后重新加载systemd配置再重启docker就可以了

systemctl daemon-reload
systemctl restart docker

标签:bin,LIMITS,service,LimitNPROC,containerd,65535,Operation,docker
From: https://blog.51cto.com/riverxyz/5878490

相关文章