louislam/uptime-kuma · error · Error
Failed to load docker host config
Error message
Failed to load docker host config
What it means
Thrown by a Docker monitor when R.load("docker_host", this.docker_host) returns nothing. The monitor cannot run without the host's connection details, and there is no fallback, so a missing host row aborts the beat.
Source
Thrown at server/model/monitor.js:800
url: `/containers/${this.docker_container}/json`,
timeout: this.interval * 1000 * 0.8,
headers: {
Accept: "*/*",
},
httpsAgent: new https.Agent({
maxCachedSessions: 0, // Use Custom agent to disable session reuse (https://github.com/nodejs/node/issues/3940)
rejectUnauthorized: !this.getIgnoreTls(),
secureOptions: crypto.constants.SSL_OP_LEGACY_SERVER_CONNECT,
}),
httpAgent: new http.Agent({
maxCachedSessions: 0,
}),
};
const dockerHost = await R.load("docker_host", this.docker_host);
if (!dockerHost) {
throw new Error("Failed to load docker host config");
}
if (dockerHost._dockerType === "socket") {
options.socketPath = dockerHost._dockerDaemon;
} else if (dockerHost._dockerType === "tcp") {
options.baseURL = DockerHost.patchDockerURL(dockerHost._dockerDaemon);
options.httpsAgent = new https.Agent(
await DockerHost.getHttpsAgentOptions(dockerHost._dockerType, options.baseURL)
);
}
log.debug("monitor", `[${this.name}] Axios Request`);
let res = await axios.request(options);
if (!res.data.State) {
throw Error("Container state is not available");
}
if (!res.data.State.Running) {View on GitHub (pinned to 6b5ea01557)
Solutions
- Open Settings -> Docker Hosts and recreate or verify the host exists
- Re-assign the monitor to an existing Docker host, or delete the orphaned monitor
- Inspect the docker_host table for integrity if the issue recurs
Defensive patterns
Strategy: validation
Validate before calling
// Confirm the referenced docker host exists before saving/running the monitor
const host = await R.findOne("docker_host", " id = ? ", [monitor.docker_host]);
if (!host) throw new Error(`docker_host id ${monitor.docker_host} does not exist`); Prevention
- Delete or reassign monitors before deleting a Docker host
- When importing monitors, import their docker_host rows too
When it happens
Trigger: The docker_host id stored on the monitor does not resolve to any row in the docker_host table.
Common situations: Docker host was deleted from Settings -> Docker Hosts while monitors still reference it; an incomplete DB restore/migration; a monitor imported without its host.
Related errors
- Invalid db-config.json, type must be a string
- Unknown Database type: ${dbConfig.type}
- Unknown Monitor Type
- Both ${envName} and ${envName}_FILE are set. Please use only
- Failed to read ${envName}_FILE at ${fileValue}: ${err.messag
AI-assisted analysis of louislam/uptime-kuma@6b5ea01557 (2026-08-12).
Data as JSON: /api/errors/cabc5e5a6eefbed0.
Report an issue: GitHub.