Skip to content
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

Unable to start cAdvisor as sudo #1027

Open
dan-lind opened this issue Dec 22, 2015 · 2 comments
Open

Unable to start cAdvisor as sudo #1027

dan-lind opened this issue Dec 22, 2015 · 2 comments

Comments

@dan-lind
Copy link

I'm just trying out cAdvisor, but I'm not able to start it using the provided instructions on my Mac OSX 10.11.

My docker-machine is indeed running, however when running the command to start cAdvisor it acts as if there is no docker-machine running. I guess this has something to do with running as sudo?

$ docker ps
CONTAINER ID        IMAGE                        COMMAND                  CREATED             STATUS              PORTS                              NAMES
cf5fc76aff66        ibmcom/db2express-c:latest   "/entrypoint.sh db2st"   3 days ago          Up 3 days           22/tcp, 0.0.0.0:50000->50000/tcp   notis-db2
f38aefa530ea        mysql                        "/entrypoint.sh mysql"   3 days ago          Up 3 days           0.0.0.0:3306->3306/tcp             notis-mysql
3241fddf07a5        postgres                     "/docker-entrypoint.s"   3 days ago          Up 3 days           0.0.0.0:5432->5432/tcp             notis-postgres
$ sudo docker run \
>   --volume=/:/rootfs:ro \
>   --volume=/var/run:/var/run:rw \
>   --volume=/sys:/sys:ro \
>   --volume=/var/lib/docker/:/var/lib/docker:ro \
>   --publish=8080:8080 \
>   --detach=true \
>   --name=cadvisor \
>   google/cadvisor:latest
Post http:///var/run/docker.sock/v1.20/containers/create?name=cadvisor: dial unix /var/run/docker.sock: no such file or directory.
* Are you trying to connect to a TLS-enabled daemon without TLS?
* Is your docker daemon up and running?
@dan-lind
Copy link
Author

It looks like it works if I start WITHOUT running as sudo. I tried this but got a bit thrown off by the fact that the container log was completely empty. But when accessing my docker-machine on 8080, the dashboard is indeed there.

@ohmystack
Copy link

Webpage on port 8080 is provided by cAdvisor, which means cAdvisor is up. However, from your log, it seems that the cAdvisor cannot connect to the Docker's socket.

You are using docker on Mac, all containers are running in VMs on your Mac. Maybe you should find out which /var/run path is really mounted, is the same one on the same VM of other containers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants