无法在 cAdvisor Docker 中获取"/"容器



我用这个命令运行cadvisor docker

docker run 
--volume=/:/rootfs:ro 
--volume=/var/run:/var/run:rw  
--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 
gcr.io/google-containers/cadvisor:v0.36.0

我可以运行而不出现错误:

CONTAINER ID   IMAGE                                       COMMAND                  CREATED          STATUS                    PORTS                                       NAMES
a0aa3cc8d5f2   gcr.io/google-containers/cadvisor:v0.36.0   "/usr/bin/cadvisor -…"   48 seconds ago   Up 48 seconds (healthy)   0.0.0.0:8080->8080/tcp, :::8080->8080/tcp   cadvisor

当我进入localhost:8080,我给我这个错误消息
未能获得容器"/"错误:无法在内存缓存中找到数据
我试着用sudo docker run还是同样的错误。

我该如何解决这个问题?这是docker相关的还是cadvisor?

这是我的系统信息:操作系统: Ubuntu 22.04
Docker Info:

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.6.0)
scan: Docker Scan (Docker Inc., v0.17.0)
Server:
Containers: 2
Running: 1
Paused: 0
Stopped: 1
Images: 3
Server Version: 20.10.17
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: false
userxattr: true
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.runc.v2 io.containerd.runtime.v1.linux runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 10c12954828e7c7c9b6e0ea9b0c02b01407d3ae1
runc version: v1.1.2-0-ga916309
init version: de40ad0
Security Options:
seccomp
Profile: default
rootless
cgroupns
Kernel Version: 5.15.0-40-generic
Operating System: Ubuntu 22.04 LTS
OSType: linux
Architecture: x86_64
CPUs: 12
Total Memory: 13.51GiB
Name: ubuntu-yan
ID: EHQF:VYEN:4YZV:GQ6C:THPI:5J3F:A5JS:OLR7:H4QN:Q5Q5:EATM:2RXR
Docker Root Dir: /home/yanpaing/.local/share/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
WARNING: No cpu cfs quota support
WARNING: No cpu cfs period support
WARNING: No cpu shares support
WARNING: No cpuset support
WARNING: No io.weight support
WARNING: No io.weight (per device) support
WARNING: No io.max (rbps) support
WARNING: No io.max (wbps) support
WARNING: No io.max (riops) support
WARNING: No io.max (wiops) support

我遇到这个问题是因为旧的cadvisor版本不支持"recent"并且版本。

我升级了这个问题。

<标题>

故障排除技巧使用docker logs检索cadvisor日志。我的错误显示如下:

W0107 09:20:00.064502  1 container.go:526] Failed to update stats for container "/system.slice/cups.service": 
failed to parse memory.usage_in_bytes - open /sys/fs/cgroup/system.slice/cups.service/memory.usage_in_bytes: 
no such file or directory, continuing to push stats

相关内容

  • 没有找到相关文章

最新更新