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

Open
zeigerpuppy opened this issue May 21, 2018 · 8 comments

Comments

@zeigerpuppy
Copy link

zeigerpuppy commented May 21, 2018

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

dashpole commented May 21, 2018

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

gregbert42 commented Apr 24, 2021

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

stepanof commented Sep 26, 2022

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

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

9 participants