docker 安装cadvisor报错:Could not configure a source for OOM detection, disabling OOM events: open /dev/
Could not configure a source for OOM detection, disabling OOM events: open /dev/kmsg: no such file or directory运行命令docker run -d -p 8090:8080 --name cadvisor -v /:/rootfs:ro -v /var/run:/var/r...
·
Could not configure a source for OOM detection, disabling OOM events: open /dev/kmsg: no such file or directory
运行命令
docker run -d -p 8090:8080 --name cadvisor -v /:/rootfs:ro -v /var/run:/var/run:rw -v /sys:/sys:ro -v /var/lib/docker/:/var/lib/docker:ro google/cadvisor:latest
使用docker logs 查看你日志有以下错误:
只有这一行错误,没别的信息
[root@infra ~]# docker logs -f bec5170f382d
W1111 03:06:47.818365 1 manager.go:349] Could not configure a source for OOM detection, disabling OOM events: open /dev/kmsg: no such file or directory
解决
使用特权模式运行,加上: --privileged=true
docker run -d -p 8090:8080 --name cadvisor --privileged=true -v /:/rootfs:ro -v /var/run:/var/run:rw -v /sys:/sys:ro -v /var/lib/docker/:/var/lib/docker:ro google/cadvisor:latest
https://github.com/google/cadvisor/issues/2150
有的服务器需要这个命令运行(不知道为啥。没有研究过)
docker run -d \
-p 8090:8080 \
--name cadvisor \
--privileged=true \
-v /:/rootfs:ro \
-v /var/run:/var/run:rw \
-v /var/lib/docker/:/var/lib/docker:ro \
-v /sys/fs/cgroup/cpu,cpuacct:/sys/fs/cgroup/cpuacct,cpu \
google/cadvisor:latest
更多推荐
已为社区贡献9条内容
所有评论(0)