I am experiencing an issue when trying to run cadvisor on AWS Linux Optimized AMI's. We have a cluster of (EC2 in ECS) machines running the same launch configuration but on some instances we get the following error.
I1026 17:11:09.043371 1 manager.go:201] Version: {KernelVersion:4.4.23-31.54.amzn1.x86_64 ContainerOsVersion:Alpine Linux v3.4 DockerVersion:1.11.2 CadvisorVersion:v0.24.1 CadvisorRevision:ae6934c}
E1026 17:11:09.049591 1 factory.go:291] devicemapper filesystem stats will not be reported: unable to find thin_ls binary
I1026 17:11:09.049607 1 factory.go:295] Registering Docker factory
W1026 17:11:09.049627 1 manager.go:244] Registration of the rkt container factory failed: unable to communicate with Rkt api service: rkt: cannot tcp Dial rkt api service: dial tcp 127.0.0.1:15441: getsockopt: connection refused
I1026 17:11:09.049654 1 factory.go:54] Registering systemd factory
I1026 17:11:09.050270 1 factory.go:86] Registering Raw factory
I1026 17:11:09.050900 1 manager.go:1082] Started watching for new ooms in manager
W1026 17:11:09.050943 1 manager.go:272] Could not configure a source for OOM detection, disabling OOM events: unable to find any kernel log file available from our set: [/var/log/kern.log /var/log/messages /var/log/syslog]
I1026 17:11:09.051181 1 manager.go:285] Starting recovery of all containers
I1026 17:11:09.051216 1 manager.go:290] Recovery completed
F1026 17:11:09.051229 1 cadvisor.go:151] Failed to start container manager: inotify_add_watch /var/lib/docker/devicemapper/mnt/e1b9b3b9dc673c7eec01afac0fa4b8664c497acc1421eb62710a783e37be86d6/rootfs/rootfs/var/lib/docker/devicemapper/mnt/e1b9b3b9dc673c7eec01afac0fa4b8664c497acc1421eb62710a783e37be86d6/rootfs/sys/fs/cgroup/cpuset: no such file or directory
We are running Cadvisor 24.1 which according to the issue list should have fixed this issue.
Any clue what is going wrong?
Running Cadvisor like below:
docker run -d --net="host" -p 8080:8080 --restart=unless-stopped \
--privileged=true \
-v /:/rootfs:ro \
-v /var/run:/var/run:rw \
-v /sys:/sys:ro \
-v /var/lib/docker/:/var/lib/docker:ro \
--name cadvisor google/cadvisor:v0.24.1
Was this fixed for you? I am facing the same problem
-v /cgroup:/sys/fs/cgroup:ro might be able to fix this.
@endofcake This solution actually worked for me. Thank you very much. Now I can run cAdvisor on Amazon Linux with Docker Swarm.
Most helpful comment
-v /cgroup:/sys/fs/cgroup:romight be able to fix this.