google / cadvisor

Analyzes resource usage and performance characteristics of running containers.
Other
16.85k stars 2.31k forks source link

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

Open zeigerpuppy opened 6 years ago

zeigerpuppy commented 6 years ago

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 commented 6 years ago

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 commented 3 years ago

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 commented 3 years ago

Try replacing image by gcr.io/cadvisor/cadvisor

tmm360 commented 2 years ago

Try replacing image by gcr.io/cadvisor/cadvisor

I had same issue, and this solved!

steveolu commented 1 year ago

Try replacing image by gcr.io/cadvisor/cadvisor

This helped solve mine too. Thanks

stepanof commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

myheavyhead commented 1 year ago

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 commented 6 months ago

Try replacing image by gcr.io/cadvisor/cadvisor

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

BryamSK commented 3 months ago

Intente reemplazar la imagen porgcr.io/cadvisor/cadvisor

En efecto esto soluciono mi problema

WalidDevRes commented 2 months ago

Try replacing image by gcr.io/cadvisor/cadvisor

it solve my probleme !!!

idasilva commented 1 month ago

Try replacing image by gcr.io/cadvisor/cadvisor

This helped me.

yjcdon commented 2 weeks ago

gcr.io/cadvisor/cadvisor:v0.46.0

Thank you, this solved my problem