Skip to content

Docker factory fails to register on Docker Desktop/WSL2 due to API mismatch (client 1.41 vs required ≥1.44) — labels missing, dashboards impacted #3793

@Alan-Jowett

Description

@Alan-Jowett

Hi cAdvisor maintainers,

First, thank you for your work on cAdvisor — it’s invaluable for observability in containerized environments.

Summary

  • Environment: Windows 11 + Docker Desktop (WSL2 backend). cAdvisor deployed via Docker Compose within a local dev stack.
  • cAdvisor image: gcr.io/cadvisor/cadvisor:latest (attempted to pin to newer tags such as v0.54.1/v0.54.0/v0.53.0, but these tags did not resolve in the environment’s accessible registries; latest pulls and runs).
  • Behavior: cAdvisor repeatedly fails to register the Docker container factory due to a Docker API client version mismatch. Logs report the client is 1.41 while minimum supported is 1.44. As a result, Docker/Compose labels are missing from Prometheus metrics.
  • Impact: Dashboards (Grafana) that rely on Compose labels (e.g., container_label_com_docker_compose_project and container_label_com_docker_compose_service) show no data or cannot group by service. We can mitigate by using the generic name label, but we lose per-service grouping.

Detailed Logs (excerpts)

Registration of the docker container factory failed: failed to validate Docker info: failed to detect Docker info: Error response from daemon: client version 1.41 is too old. Minimum supported API version is 1.44, please upgrade your client to a newer version
...
Starting cAdvisor version: v0.49.1-6f3f25ba on port 8080

What we tried

  • Set DOCKER_API_VERSION=1.44 in the cadvisor service environment to force a newer API; the error still persists.
  • Updated image tag to ghcr.io/google/cadvisor:v0.54.1 (per recent release notes) and gcr.io/cadvisor/cadvisor:v0.54.1/v0.54.0/v0.53.0; our environment failed to resolve these specific tags ("not found") even though the GitHub Releases page shows them. We reverted to gcr.io/cadvisor/cadvisor:latest to keep the stack running.
  • Rewrote Grafana PromQL queries in our resource-usage dashboard to avoid Compose labels and use sum by (name) etc., which works as a temporary mitigation.

Request

  • Could you clarify the supported Docker API versions for cAdvisor on Docker Desktop/WSL2 and whether the image bundles a Docker client that can negotiate to ≥1.44 in this environment?
  • If there’s a recommended tag/registry combination that ensures Docker factory registration on Docker Desktop (WSL2) with API ≥1.44, please advise. Alternatively, if there’s a configuration to enable the Docker factory in this scenario, guidance would be appreciated.
  • If this is an incompatibility or packaging gap, would you consider publishing an image that includes a Docker client/library compatible with Desktop/WSL2 requiring API ≥1.44 so Compose labels are available again?

Why this matters

  • Many users rely on cAdvisor’s Docker/Compose labels for service-level dashboards and alerts. On Docker Desktop/WSL2, losing those labels reduces the usefulness of metrics and requires ad-hoc mitigations.

Environment specifics

  • OS: Windows 11, Docker Desktop with WSL2 backend
  • Stack: Prometheus, Grafana, RabbitMQ, MongoDB, Qdrant, cAdvisor
  • Compose: mounts /var/run, /var/lib/docker, /sys, / (rootfs) read-only per cAdvisor guidance; privileged: true

Note

  • This issue report was prepared with the assistance of an LLM to collate logs and summarize troubleshooting steps. The observations and mitigation have been verified locally.

Thank you again for your time and for maintaining cAdvisor. Happy to provide additional logs or run targeted diagnostics if helpful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions