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

cadvisor docker container fails to start "mountpoint for cpu not found" (clearcontainers) #1943

Closed
zeigerpuppy opened this issue May 21, 2018 · 18 comments

Comments

@zeigerpuppy
Copy link

I am attempting to run cadvisor on Debian Stretch (without systemd). My docker setup is using clearcontainers and a backend with block-based sparse LVM storage (layered onto ZFS). Everything is functioning well with a broad range of containers.

When I try to start cadvisor, it gives the following log output:

2018-05-21T08:51:31.105718776Z I0521 08:51:31.085339       1 storagedriver.go:50] Caching stats in memory for 2m0s
2018-05-21T08:51:31.105772425Z F0521 08:51:31.085940       1 cadvisor.go:134] Failed to create a Container Manager: mountpoint for cpu not found

I think this may be to do with some difficulties in accessing the volume for /sys, perhaps it is not permitted to be shared in this way...

My docker-compose.yml is as follows:

version: '2'

# this compose file builds cadvisor
# networked on docker2 bridge
# IPs
# 172.18.18.60    cadvisor

services:
    cadvisor:
        restart: always
        image: google/cadvisor:latest
        container_name: cadvisor
        ipc: private
        shm_size: 128M
        networks:
          docker2:
            ipv4_address: 172.18.18.60
        expose:
            - "8080"
        volumes:
            - /:/rootfs:ro
            - /var/run:/var/run:rw
            - /sys:/sys:ro
            - /var/lib/docker/:/var/lib/docker:ro
            - /dev/disk/:/dev/disk:ro
            - /zpool2/docker_config/dns/resolv.conf:/etc/resolv.conf
            - /zpool2/docker_config/cache/01proxy:/etc/apt/apt.conf.d/01proxy

networks:
  docker2:
    external:
      name: docker2
@dashpole
Copy link
Collaborator

The volumes look correct... I bet it is related to this limitation. You are trying to mount in /dev/..., which clearcontainers doesn't support.

@gregbert42
Copy link

I am getting this same error message. here is the relevant portion of my docker-compose

  cadvisor:
    image: google/cadvisor:latest
    container_name: monitoring_cadvisor
    restart: unless-stopped
    devices:
      - "/dev/kmsg:/dev/kmsg"
    volumes:
      - /:/rootfs:ro
      - /var/run:/var/run:rw
      - /var/run/docker.sock:/var/run/docker.sock:rw
      - /sys:/sys:ro
      - /var/lib/docker/:/var/lib/docker:ro
      - /dev/disk/:/dev/disk:ro
    expose:
      - 8080
    ports:
      - 8085:8080

Here is the error I get:

monitoring_cadvisor | F0424 20:46:33.869962       1 cadvisor.go:146] Failed to create a Container Manager: mountpoint for cpu not found
monitoring_cadvisor exited with code 255

any ideas?

@jlegido
Copy link

jlegido commented Jul 30, 2021

Try replacing image by gcr.io/cadvisor/cadvisor

@tmm360
Copy link

tmm360 commented Sep 10, 2021

Try replacing image by gcr.io/cadvisor/cadvisor

I had same issue, and this solved!

andreas-mausch added a commit to andreas-mausch/grafana-prometheus-loki-alertmanager-setup that referenced this issue Sep 14, 2021
nachikamod added a commit to nachikamod/docker-monitoring that referenced this issue Jul 31, 2022
```
gcr.io/google-containers/cadvisor:latest
```

Mentioned image causes following issue when tried to run, please do visit the issue page of google cadvisor to know more about the issue.

[cadvisor docker container fails to start "mountpoint for cpu not found" ](google/cadvisor#1943)

Solution mentioned here was to use,

```
gcr.io/cadvisor/cadvisor
```
@steveolu
Copy link

steveolu commented Sep 2, 2022

Try replacing image by gcr.io/cadvisor/cadvisor

This helped solve mine too. Thanks

@stepanof
Copy link

I had problem with pulling image from gcr.io/cadvisor/cadvisor because this resourse is not allowed on our proxy.
So I pulled image on another server, transfer it to taget server and run the container. It solved my problem as well.
Thanx!

@KES777
Copy link

KES777 commented Oct 26, 2022

After changing to gcr.io/cadvisor/cadvisor I get next error:

W1026 14:24:19.027828       1 manager.go:159] Cannot detect current cgroup on cgroup v2

@pichayean
Copy link

pichayean commented Dec 17, 2022

FIX: Use a version tag like gcr.io/cadvisor/cadvisor:v0.46.0

@myheavyhead
Copy link

oh,gcr.io/cadvisor/cadvisor maybe can solve the problem,but i can't pull this image in china,has anyone as same as me?error message:
⠿ cadvisor Error 1.7s
Error response from daemon: Head "https://gcr.io/v2/cadvisor/cadvisor/manifests/latest": Get "https://gcr.io/v2/token?scope=repository%3Acadvisor%2Fcadvisor%3Apull&service=gcr.io": EOF

@MexHigh
Copy link

MexHigh commented Feb 23, 2024

Try replacing image by gcr.io/cadvisor/cadvisor

This issue is fixed and needs to be closed, isn't it?

@BryamSK
Copy link

BryamSK commented May 23, 2024

Intente reemplazar la imagen porgcr.io/cadvisor/cadvisor

En efecto esto soluciono mi problema

@WalidDevRes
Copy link

Try replacing image by gcr.io/cadvisor/cadvisor

it solve my probleme !!!

@idasilva
Copy link

idasilva commented Jul 6, 2024

Try replacing image by gcr.io/cadvisor/cadvisor

This helped me.

@yjcdon
Copy link

yjcdon commented Aug 11, 2024

gcr.io/cadvisor/cadvisor:v0.46.0

Thank you, this solved my problem

@Mukhsin0508
Copy link

Try replacing image by gcr.io/cadvisor/cadvisor

It worked for me! on prod, on ubuntu, EC2 AWS.

@zeigerpuppy
Copy link
Author

Thanks for tips, yes, agree this should be closed

@kvinayagamoorthy
Copy link

gcr.io/cadvisor/cadvisor

This helped. Thank you.

@nurbek2003o
Copy link

gcr.io/cadvisor/cadvisor

this helps me to solve this problem. Thanks

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