赞
踩
背景
系统:rocky9.2
容器引擎:docker 24
启动容器报错
docker logs 容器名称
library initialization failed - unable to allocate file descriptor table - out of memorylibrary initialization failed - unable to allocate file descriptor table - out of memorylibrary initialization failed - unable to allocate file descriptor table - out of memory
解决方法:
容器启动配置ulimit,具体配置如下
servicename:
...
ulimits:
nofile:
soft: "65535"
hard: "65535"
背景
系统:rocky9.2
容器引擎:docker 24
故障描述:
docker运行cadvisor镜像时报错
1 cadvisor.go:146] Failed to create a Container Manager: mountpoint for cpu not found
解决:
下载最新镜像 gcr.io/cadvisor/cadvisor:latest
servicename:
...
image: gcr.io/cadvisor/cadvisor:latest
devices:
- "/dev/kmsg:/dev/kmsg"
...
参考: https://github.com/google/cadvisor/issues/1943
Error response from daemon: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit
原因:
DockerHub 从 2020 年 11 月 2 日,正式开始限制非付费用户的拉取频率:
匿名用户,每 6 小时只允许 pull 100 次
已登录用户,每 6 小时只允许 pull 200 次
解决办法:更换镜像配置、绕过限制
Azure: https://dockerhub.azk8s.cn
中科大: https://ustc-edu-cn.mirror.aliyuncs.com
网易: https://hub-mirror.c.163.com
vim /etc/docker/daemon.json
{
"registry-mirrors": ["https://ustc-edu-cn.mirror.aliyuncs.com"]
}
重启服务
systemctl restart docker
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。