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/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,cadvisor)