当前位置:   article > 正文

docker常见报错_failed to create a container manager: mountpoint f

failed to create a container manager: mountpoint for cpu not found

docker启动容器故障1

背景
系统: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"
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

docker启动容器故障2

背景
系统: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

docker-compose配置

  servicename:
    ...
    image: gcr.io/cadvisor/cadvisor:latest
    devices:
      - "/dev/kmsg:/dev/kmsg"
    ...
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

参考: https://github.com/google/cadvisor/issues/1943

docker 拉取镜像报错1

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"]
}
  • 1
  • 2
  • 3

重启服务

systemctl restart docker
  • 1
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/寸_铁/article/detail/934559
推荐阅读
相关标签
  

闽ICP备14008679号