henrygd/beszel · error
docker version request failed: %s
Error message
docker version request failed: %s
What it means
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.
Source
Thrown at agent/docker.go:727
// Best-effort startup probe. If the engine is not ready yet, getDockerStats will
// retry after the first successful /containers/json request.
_, _ = manager.checkDockerVersion()
return manager
}
// checkDockerVersion checks Docker version and sets goodDockerVersion if at least 25.0.0.
// Versions before 25.0.0 have a bug with one-shot which requires all requests to be made in one batch.
func (dm *dockerManager) checkDockerVersion() (bool, error) {
resp, err := dm.client.Get("http://localhost/version")
if err != nil {
return false, err
}
if resp.StatusCode != http.StatusOK {
status := resp.Status
resp.Body.Close()
return false, fmt.Errorf("docker version request failed: %s", status)
}
var versionInfo dockerVersionResponse
serverHeader := resp.Header.Get("Server")
if err := dm.decode(resp, &versionInfo); err != nil {
return false, err
}
dm.applyDockerVersionInfo(serverHeader, &versionInfo)
dm.dockerVersionChecked = true
return true, nil
}
// ensureDockerVersionChecked retries the version probe after a successful
// container list request.
func (dm *dockerManager) ensureDockerVersionChecked() {
if dm.dockerVersionChecked {
returnView on GitHub (pinned to b38fb7dafa)
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
Example fix
// before export DOCKER_HOST=tcp://localhost:2375 // after: point at a working socket with permissions export DOCKER_HOST=unix:///run/user/1000/podman/podman.sock usermod -aG docker <agent-user>
Defensive patterns
Strategy: retry
Validate before calling
// verify the daemon answers before starting version-dependent features
out, err := exec.Command("docker", "version", "--format", "{{.Server.Version}}").Output()
// or: curl --unix-socket /var/run/docker.sock http://localhost/version Try / catch
ok, err := dm.checkDockerVersion()
if err != nil {
log.Warn("version check failed, assuming no version-gated features", "err", err)
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- no logs in response
- no info in response
- container inspect request failed: %s
- %s - %w - see https://github.com/henrygd/beszel/issues/144
- invalid container id
AI-assisted analysis of henrygd/beszel@b38fb7dafa (2026-08-31).
Data as JSON: /api/errors/8f0b68b2a9eb747b.
Report an issue: GitHub.