-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error running cadvisor docker package on Ubuntu 18.04.4 LTS #2387
Comments
It looks like cAdvisor is unable to mount |
It's a fresh clean install of Ubuntu, with Docker loaded as part of the install... If the filesystem is set as read-only by that process, then that would seem to be a default, and if CAdvisor needs non-standard read/write access to it, then surely that's worth a documentation note, if nothing else? |
The ls -las /var/lib
...
4 drwx--x--x 14 root root 4096 Mar 8 19:59 docker
...
ls -las /var/run
...
0 drwx------ 5 root root 120 Mar 8 19:59 docker
4 -rw-r--r-- 1 root root 4 Mar 8 19:59 docker.pid
0 srw-rw---- 1 root docker 0 Mar 8 19:59 docker.sock
... If I run |
OK, Re-reading https://github.com/google/cadvisor/blob/master/docs/running.md#centos-fedora-and-rhel it hints that /var/lib/docker access is not needed when using the privileged=true switch. I removed /var/lib/docker from my docker-compose file: cadvisor:
image: google/cadvisor:latest
container_name: cadvisor
command:
- privileged=true
ports:
- 8081:8080
volumes:
- /:/rootfs:ro
- /var/run:/var/run:ro
- /sys:/sys:ro
# - /var/lib/docker/:/var/lib/docker:ro
- /dev/disk/:/dev/disk:ro Still have testing to do, but looks promising. |
I am facing the exact same error. |
FYI, if you install docker w/ and my docker-compose file: cadvisor:
volumes:
- /var/snap/docker/common/var-lib-docker:/var/lib/docker:ro |
I'm trying to run up cadvisor to monitor docker containers on an Ubuntu 18.04.4 LTS machine.
Using the command I got from the cadvisor site:
sudo 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 gcr.io/google-containers/cadvisor:latest
I repeatably get the error:
docker: Error response from daemon: error while creating mount source path '/var/lib/docker': mkdir /var/lib/docker: read-only file system.
My Docker version is 18.09.9 build 1752eb3 and has several containers running successfully on it.
The text was updated successfully, but these errors were encountered: