-
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
Cadvisor not showing Docker containers with Docker for Mac #1565
Comments
How did you run cadvisor? For me:
works fine. |
How do I run cAdvisor on a different port. I have Jenkins running on port 8080. This is what I have tried but i am not able to bring up the instance on 8090. TIA sudo docker run |
docker run This works for me as well, make sure the port 8090 is not being blocked.. |
I'm having this same problem MacOS 10.15.7 and Docker Desktop 2.4.0.0 |
@SpyMachine |
+1, MacOS 10.15.5 and Docker Desktop 2.4.0.0, docker engine 19.03.13 At
Looks like
! UPD: Mounting
|
@POD666 your suggestion worked for me and removed the Docker daemon error that I was getting when going to http://cadvisor:8080/docker. I still am having issues with directly accessing cadvisor stats via a container name (e.g., http://cadvisor:8080/docker/prometheus) - rather I need to have the long ID of the prometheus container (e.g., http://cadvisor:8080/docker/xxxxxxxxxxxxxxxxxxxxxxxxxx). |
I'm having the same issue on macOS Catalina 10.15.7 and Docker Desktop 2.5.0.1 with Docker engine 19.03.13 |
@POD666 's solution fixed it for me. |
@Djiit Can you share your full command? |
@POD666 Awesome... It worked.
|
@soulmachine same as @muhammedbasilsk ! |
Hi @Djiit and @muhammedbasilsk , the command above works, I can see my container on my MacBook now, thanks a lot! |
@muhammedbasilsk I change all docker run -d --name=cadvisor \
-p 8080:8080 \
--volume=/var/run:/var/run:ro \
--volume=/sys:/sys:ro \
--volume=/var/lib/docker/:/var/lib/docker:ro \
--volume=/var/run/docker.sock:/var/run/docker.sock:ro \
google/cadvisor:latest |
This fixed the issue for me as well on mac 13.1! thank you |
adding this /var/run/docker.sock:/var/run/docker.sock:ro to my volume section worked for me, thanks everyone |
- Used the following Dockerfile as the main example - https://github.com/oijkn/Docker-Raspberry-PI-Monitoring/blob/760528af93b2d5ce3a2025a6c7beb90f3dd3c27c/docker-compose.yml#L22-L44 - Note that it differs from the docker command mentioned in the cAdvisor README quick-start due to the fixes mentioned further below - https://github.com/google/cadvisor?tab=readme-ov-file#quick-start-running-cadvisor-in-a-docker-container - Fixed "Failed to get system UUID" error by adding `/etc/machine-id` volume mount - google/cadvisor#2157 (comment) - Fixed container names not included on mac by adding `/var/run/docker.sock` volume mount - google/cadvisor#1565 (comment) - Note that `ro` was sufficient and `rw` wasn't needed as mentioned in google/cadvisor#1565 (comment) - Fix cAdvisor high memory usage with oijkn/Docker-Raspberry-PI-Monitoring#34 - Note that every 5 minutes, two error messages are logged. This is a known issue with cAdvisor:v0.49.1 that will hopefully be fixed in a future release - google/cadvisor#3493 - Add cAdvisor metrics to the prometheus.yml file - I initially tried to use port 8081 in this file, but it didn't work. The following answer led me to realize that it needed to be port 8080, since 8081 is only used on the host machine's network, not within the docker routing network itself - https://stackoverflow.com/q/54397463 - Explanation of `privileged: true` - https://thelinuxcode.com/privileged-in-docker-compose-with-code-examples/ - cAdvisor docs on prometheus - https://github.com/google/cadvisor/blob/master/docs/storage/prometheus.md
Dear CAdvisor team,
I am running Docker for Mac and have two containers running on my machine as shown below:
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
38d9770aafd4 google/cadvisor "/usr/bin/cadvisor -l" 5 minutes ago Up 5 minutes 0.0.0.0:8080->8080/tcp cadvisor
32bff84b713a tutum/hello-world "/bin/sh -c 'php-fpm " 13 minutes ago Up 5 minutes 80/tcp goofy_einstein
However, when I log into the CAdvisor Web UI on localhost:8080 and click on Docker Containers I get the following error:
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
Can you please let me know what is missing or whether this is a bug?
The text was updated successfully, but these errors were encountered: