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

WSL2: Prometheus Daemon Set "node-exporter" failed to run #2933

Closed
anthopark opened this issue Feb 19, 2022 · 4 comments
Closed

WSL2: Prometheus Daemon Set "node-exporter" failed to run #2933

anthopark opened this issue Feb 19, 2022 · 4 comments
Labels

Comments

@anthopark
Copy link

Hi

I'm running 1.23.3 on a WSL2 Ubuntu 20.04 (Windows build: 19042).

When I enabled the Prometheus add-on, I noticed the pod for node-exporter is not starting. (CreateContainerError)

The container image is quay.io/prometheus/node-exporter:v1.1.2

I see the message on the dashboard

failed to generate container "<random pod name>" spec: failed to generate spec: path "/sys" is mounted on "/sys" but it is not a shared or slave mount

Because node exporter not working, I'm getting the Bad Gateway error on Grafana as well.

How should I fix this?

Thank you

@ktsakalozos
Copy link
Member

Hi @anthopark

Could you try this prometheus-community/helm-charts#467 (comment) ?

@anthopark
Copy link
Author

Hi @ktsakalozos,

I was able to get it working by removing the mountPropagation under the volume mount sys while editing the daemon set (microk8s kubectl edit ds node-exporter -n monitoring).

But I'm not sure what effect this solution will have. and I still don't get any metrics from Grafana. Even the node/cluster is not detected on Grafana.

I didn't have this issue when running with Multipass, but I encounter this in WSL2.

Lastly, The literal command from the thread you shared does not work because the index for the volume mount is different for the Microk8s version of ds/node-exporter, which has only 2 volume mounts (hence 0, 1).

@billyors
Copy link

billyors commented Apr 7, 2022

Issue persists. I was able to use the workaround from @anthopark but still experiencing the Bad Gateway error with the grafana datasource (prometheus).

@stale
Copy link

stale bot commented Mar 3, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the inactive label Mar 3, 2023
@stale stale bot closed this as completed Apr 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants