描述
复制这一问题的步骤:
1.创建容器顾问
docker run --volume=/:/rootfs:ro --volume=/var/run:/var/run:ro --volume=/sys:/sys:ro --volume=/var/lib/docker/:/var/lib/docker:ro --volume=/dev/disk/:/dev/disk:ro --publish=8080:8080 --detach=true --name=cadvisor --privileged --device=/dev/kmsg google/cadvisor
2.集装箱退出状态d(255)
描述您所收到的结果:
使用docker logs cadvisor
获得误差
F0518 02:42:13.384527 1 cadvisor.go:146] Failed to create a Container Manager: mountpoint for cpu not found
描述您期望的结果:
根据正式文档创建cadvisor容器
你认为重要的其他信息(例如,仅偶尔发生问题):
码头版本的输出:
Version: 20.10.15
API version: 1.41
Go version: go1.17.9
Git commit: fd82621
Built: Thu May 5 13:21:10 2022
OS/Arch: linux/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.15
API version: 1.41 (minimum version 1.12)
Go version: go1.17.9
Git commit: 4433bf6
Built: Thu May 5 13:19:15 2022
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.4
GitCommit: 212e8b6fa2f44b9c21b2798135fc6fb7c53efc16
runc:
Version: 1.1.1
GitCommit: v1.1.1-0-g52de29d
docker-init:
Version: 0.19.0
GitCommit: de40ad0
码头信息输出:
Client:
Context: default
Debug Mode: false
Plugins:
app: Docker App (Docker Inc., v0.9.1-beta3)
buildx: Docker Buildx (Docker Inc., v0.8.2-docker)
compose: Docker Compose (Docker Inc., v2.5.0)
scan: Docker Scan (Docker Inc., v0.17.0)
Server:
Containers: 2
Running: 0
Paused: 0
Stopped: 2
Images: 1
Server Version: 20.10.15
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: io.containerd.runtime.v1.linux runc io.containerd.runc.v2
Default Runtime: runc
Init Binary: docker-init
containerd version: 212e8b6fa2f44b9c21b2798135fc6fb7c53efc16
runc version: v1.1.1-0-g52de29d
init version: de40ad0
Security Options:
apparmor
seccomp
Profile: default
cgroupns
Kernel Version: 5.15.0-25-generic
Operating System: Ubuntu 22.04 LTS
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 1.897GiB
Name: mjz-ubuntu-docker-vm
ID: EUGI:MOZM:NUH7:777V:4RHU:G64V:OTAH:UVQR:AS7H:NNMV:3KIN:TQHM
Docker Root Dir: /var/lib/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Registry Mirrors:
https://a8x1qfbv.mirror.aliyuncs.com/
Live Restore Enabled: false
WARNING: API is accessible on http://192.168.117.59:2375 without encryption.
Access to the remote API is equivalent to root access on the host. Refer
to the 'Docker daemon attack surface' section in the documentation for
more information: https://docs.docker.com/go/attack-surface/
其他环境详细信息(AWS、VirtualBox、物理等):
使用VM虚拟机版本15.1
Ubuntu版本
Distributor ID: Ubuntu
Description: Ubuntu 22.04 LTS
Release: 22.04
Codename: jammy
发布于 2022-07-15 06:42:26
您不应该再使用来自Docker的cAdvisor映像,因为它们不再被更新(参见码头枢纽中的弃用通知),而是使用gcr.io/cadvisor/cadvisor
和所需的版本。您可以检查发行版这里。
我自己也偶然发现了这个问题,在我的例子中,结果是最近版本的Amazon使cAdvisor抛出了这个错误。具体来说,我使用ECS,我通过SSM参数选择图像。我的团队最近转向了/aws/service/ecs/optimized-ami/amazon-linux-2022/recommended/image_id
AMI,并且花了一段时间才意识到这个特定的映像导致了这个问题。当我们回到使用/aws/service/ecs/optimized-ami/amazon-linux-2/recommended/image_id
时,cAdvisor工作得很好。
https://stackoverflow.com/questions/72282775
复制相似问题