ZCube/cadvisor-docker

Error While Statting cgroupv2

Closed this issue · 2 comments

Hi,

I'm facing some issues with cAdvisor on my Pi.

test_cadvisor | W0324 12:24:20.698575       1 container.go:586] Failed to update stats for container "/system.slice/dietpi-postboot.service": error while statting cgroup v2: [open /sys/kernel/mm/hugepages: no such file or directory
test_cadvisor | failed to fetch hugetlb info
test_cadvisor | github.com/opencontainers/runc/libcontainer/cgroups/fs2.statHugeTlb
test_cadvisor |         /go/pkg/mod/github.com/opencontainers/runc@v1.0.0-rc95/libcontainer/cgroups/fs2/hugetlb.go:35
test_cadvisor | github.com/opencontainers/runc/libcontainer/cgroups/fs2.(*manager).GetStats
test_cadvisor |         /go/pkg/mod/github.com/opencontainers/runc@v1.0.0-rc95/libcontainer/cgroups/fs2/fs2.go:125
test_cadvisor | github.com/google/cadvisor/container/libcontainer.(*Handler).GetStats
test_cadvisor |         /go/src/github.com/google/cadvisor/container/libcontainer/handler.go:83
test_cadvisor | github.com/google/cadvisor/container/raw.(*rawContainerHandler).GetStats
test_cadvisor |         /go/src/github.com/google/cadvisor/container/raw/handler.go:232
test_cadvisor | github.com/google/cadvisor/manager.(*containerData).updateStats
test_cadvisor |         /go/src/github.com/google/cadvisor/manager/container.go:637
test_cadvisor | github.com/google/cadvisor/manager.(*containerData).housekeepingTick
test_cadvisor |         /go/src/github.com/google/cadvisor/manager/container.go:583
test_cadvisor | github.com/google/cadvisor/manager.(*containerData).housekeeping
test_cadvisor |         /go/src/github.com/google/cadvisor/manager/container.go:531
test_cadvisor | runtime.goexit
test_cadvisor |         /usr/lib/go/src/runtime/asm_arm64.s:1133], continuing to push stats

test_cadvisor | W0324 12:24:20.696671       1 container.go:586] Failed to update stats for container "/system.slice/systemd-journald.service": error while statting cgroup v2: [open /sys/kernel/mm/hugepages: no such file or directory
test_cadvisor | failed to fetch hugetlb info
test_cadvisor | github.com/opencontainers/runc/libcontainer/cgroups/fs2.statHugeTlb
test_cadvisor |         /go/pkg/mod/github.com/opencontainers/runc@v1.0.0-rc95/libcontainer/cgroups/fs2/hugetlb.go:35
test_cadvisor | github.com/opencontainers/runc/libcontainer/cgroups/fs2.(*manager).GetStats
test_cadvisor |         /go/pkg/mod/github.com/opencontainers/runc@v1.0.0-rc95/libcontainer/cgroups/fs2/fs2.go:125
test_cadvisor | github.com/google/cadvisor/container/libcontainer.(*Handler).GetStats
test_cadvisor |         /go/src/github.com/google/cadvisor/container/libcontainer/handler.go:83
test_cadvisor | github.com/google/cadvisor/container/raw.(*rawContainerHandler).GetStats
test_cadvisor |         /go/src/github.com/google/cadvisor/container/raw/handler.go:232
test_cadvisor | github.com/google/cadvisor/manager.(*containerData).updateStats
test_cadvisor |         /go/src/github.com/google/cadvisor/manager/container.go:637
test_cadvisor | github.com/google/cadvisor/manager.(*containerData).housekeepingTick
test_cadvisor |         /go/src/github.com/google/cadvisor/manager/container.go:583
test_cadvisor | github.com/google/cadvisor/manager.(*containerData).housekeeping
test_cadvisor |         /go/src/github.com/google/cadvisor/manager/container.go:531
test_cadvisor | runtime.goexit
test_cadvisor |         /usr/lib/go/src/runtime/asm_arm64.s:1133], continuing to push stats

getting a lot of these errors, just for different containers.

My OS is Dietpi. Could this be the issue?

ZCube commented

@jerptrs Sorry, I'm distributing this image using docker's features to build and support multiple architectures, but I don't know much about cadvisor. It's hard for me to help, especially if it's Dietpi dependent.

If you want to know more about this error, you might want to refer to an issue like opencontainers/runc#3232.

Hi @jerptrs! Experience the same issues, a workaround is to use an older version of the image (eg. zcube/cadvisor:v0.38.8). Hope it helps.