{"record":{"id":"8f0b68b2a9eb747b","repo":"henrygd/beszel","slug":"docker-version-request-failed-s","errorCode":null,"errorMessage":"docker version request failed: %s","messagePattern":"docker version request failed: (.+?)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agent/docker.go","lineNumber":727,"sourceCode":"\n\t// Best-effort startup probe. If the engine is not ready yet, getDockerStats will\n\t// retry after the first successful /containers/json request.\n\t_, _ = manager.checkDockerVersion()\n\n\treturn manager\n}\n\n// checkDockerVersion checks Docker version and sets goodDockerVersion if at least 25.0.0.\n// Versions before 25.0.0 have a bug with one-shot which requires all requests to be made in one batch.\nfunc (dm *dockerManager) checkDockerVersion() (bool, error) {\n\tresp, err := dm.client.Get(\"http://localhost/version\")\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tif resp.StatusCode != http.StatusOK {\n\t\tstatus := resp.Status\n\t\tresp.Body.Close()\n\t\treturn false, fmt.Errorf(\"docker version request failed: %s\", status)\n\t}\n\n\tvar versionInfo dockerVersionResponse\n\tserverHeader := resp.Header.Get(\"Server\")\n\tif err := dm.decode(resp, &versionInfo); err != nil {\n\t\treturn false, err\n\t}\n\n\tdm.applyDockerVersionInfo(serverHeader, &versionInfo)\n\tdm.dockerVersionChecked = true\n\treturn true, nil\n}\n\n// ensureDockerVersionChecked retries the version probe after a successful\n// container list request.\nfunc (dm *dockerManager) ensureDockerVersionChecked() {\n\tif dm.dockerVersionChecked {\n\t\treturn","sourceCodeStart":709,"sourceCodeEnd":745,"githubUrl":"https://github.com/henrygd/beszel/blob/b38fb7dafa60812cc22e6a84ce313e94f1ce0a32/agent/docker.go#L709-L745","documentation":"checkDockerVersion pings the daemon's /version endpoint to decide feature availability. This error is returned when the version HTTP request completes but with a non-200 status; the response status text is included. It means the agent could not determine the Docker/Podman version, so version-gated behavior stays disabled.","triggerScenarios":"GET /version on the configured socket returns non-200 — daemon restarting (503), proxy interception, wrong socket serving a different API, or an endpoint that requires auth returning 401/403.","commonSituations":"DOCKER_HOST pointing at a TCP endpoint behind an authenticating proxy; Podman socket with restricted permissions; daemon momentarily unavailable during boot; stale DOCKER_HOST after migrating to a rootless socket path.","solutions":["Confirm the daemon responds: docker version or curl --unix-socket <sock> http://localhost/version","Fix DOCKER_HOST / socket path and permissions so /version returns 200","If a proxy sits in front, allow /version unauthenticated","Re-check after daemon start; ensureDockerVersionChecked will retry"],"exampleFix":"// before\nexport DOCKER_HOST=tcp://localhost:2375\n// after: point at a working socket with permissions\nexport DOCKER_HOST=unix:///run/user/1000/podman/podman.sock\nusermod -aG docker <agent-user>","handlingStrategy":"retry","validationCode":"// verify the daemon answers before starting version-dependent features\nout, err := exec.Command(\"docker\", \"version\", \"--format\", \"{{.Server.Version}}\").Output()\n// or: curl --unix-socket /var/run/docker.sock http://localhost/version","typeGuard":null,"tryCatchPattern":"ok, err := dm.checkDockerVersion()\nif err != nil {\n    log.Warn(\"version check failed, assuming no version-gated features\", \"err\", err)\n}","preventionTips":["Ensure DOCKER_HOST points at a reachable daemon socket","Fix socket permissions for the agent user","Bypass/allow-list /version on authenticating proxies","Retry on transient 5xx during daemon startup"],"tags":["http","docker","version-check"],"backgroundTag":"http-non-200-response","analyzedSha":"b38fb7dafa60812cc22e6a84ce313e94f1ce0a32","analyzedAt":"2026-08-31T15:10:10.149Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}