tellet / el-q-test

Example of node-exporter + cadvisor + prometheus + grafana
Apache License 2.0
0 stars 1 forks source link

Permissions problem #1

Open generall opened 7 months ago

generall commented 7 months ago

When I try to run docker-compose with provided instructions, 3 out of 5 containers refuse to start during the file permission problems:

GF_PATHS_DATA='/var/lib/grafana' is not writable.
You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migrate-to-v51-or-later
mkdir: can't create directory '/var/lib/grafana/plugins': Permission denied
ts=2024-03-21T15:23:38.513Z caller=query_logger.go:93 level=error component=activeQueryTracker msg="Error opening query log file" file=/prometheus/queries.active err="open /prometheus/queries.active: permission denied"
panic: Unable to create mmap-ed active query log

goroutine 1 [running]:
github.com/prometheus/prometheus/promql.NewActiveQueryTracker({0x7ffcee7eef02, 0xb}, 0x14, {0x42ae200, 0xc000548460})
    /app/promql/query_logger.go:123 +0x425
main.main()
    /app/cmd/prometheus/main.go:748 +0x82fe
F0321 15:22:18.592560       1 cadvisor.go:146] Failed to create a Container Manager: mountpoint for cpu not found
F0321 15:22:44.476625       1 cadvisor.go:146] Failed to create a Container Manager: mountpoint for cpu not found
F0321 15:23:35.993874       1 cadvisor.go:146] Failed to create a Container Manager: mountpoint for cpu not found

I was able to temporary fix the first two problems by commenting out

./grafana/grafana_storage:/var/lib/grafana
./prometheus/prometheus_data:/prometheus

I assume it is only needed for the persistence between restarts.

But I don't yet know how to fix cadvisor problem

tellet commented 7 months ago

@generall I haven't encountered those errors, so unfortunately I can not reproduce them to be able to identify the core problem. For cadvisor maybe you should try different image gcr.io/cadvisor/cadvisor, it works for me as well as the google/cadvisor

generall commented 7 months ago

I think I could partially solve the problem https://github.com/tellet/el-q-test/pull/2