{"record":{"id":"cabc5e5a6eefbed0","repo":"louislam/uptime-kuma","slug":"failed-to-load-docker-host-config","errorCode":null,"errorMessage":"Failed to load docker host config","messagePattern":"Failed to load docker host config","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"server/model/monitor.js","lineNumber":800,"sourceCode":"                        url: `/containers/${this.docker_container}/json`,\n                        timeout: this.interval * 1000 * 0.8,\n                        headers: {\n                            Accept: \"*/*\",\n                        },\n                        httpsAgent: new https.Agent({\n                            maxCachedSessions: 0, // Use Custom agent to disable session reuse (https://github.com/nodejs/node/issues/3940)\n                            rejectUnauthorized: !this.getIgnoreTls(),\n                            secureOptions: crypto.constants.SSL_OP_LEGACY_SERVER_CONNECT,\n                        }),\n                        httpAgent: new http.Agent({\n                            maxCachedSessions: 0,\n                        }),\n                    };\n\n                    const dockerHost = await R.load(\"docker_host\", this.docker_host);\n\n                    if (!dockerHost) {\n                        throw new Error(\"Failed to load docker host config\");\n                    }\n\n                    if (dockerHost._dockerType === \"socket\") {\n                        options.socketPath = dockerHost._dockerDaemon;\n                    } else if (dockerHost._dockerType === \"tcp\") {\n                        options.baseURL = DockerHost.patchDockerURL(dockerHost._dockerDaemon);\n                        options.httpsAgent = new https.Agent(\n                            await DockerHost.getHttpsAgentOptions(dockerHost._dockerType, options.baseURL)\n                        );\n                    }\n\n                    log.debug(\"monitor\", `[${this.name}] Axios Request`);\n                    let res = await axios.request(options);\n\n                    if (!res.data.State) {\n                        throw Error(\"Container state is not available\");\n                    }\n                    if (!res.data.State.Running) {","sourceCodeStart":782,"sourceCodeEnd":818,"githubUrl":"https://github.com/louislam/uptime-kuma/blob/6b5ea0155793e666666745fb8d6fef1e829543a2/server/model/monitor.js#L782-L818","documentation":"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.","triggerScenarios":"The docker_host id stored on the monitor does not resolve to any row in the docker_host table.","commonSituations":"Docker host was deleted from Settings -> Docker Hosts while monitors still reference it; an incomplete DB restore/migration; a monitor imported without its host.","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Confirm the referenced docker host exists before saving/running the monitor\nconst host = await R.findOne(\"docker_host\", \" id = ? \", [monitor.docker_host]);\nif (!host) throw new Error(`docker_host id ${monitor.docker_host} does not exist`);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Delete or reassign monitors before deleting a Docker host","When importing monitors, import their docker_host rows too"],"tags":["docker","config","database","monitoring"],"backgroundTag":null,"analyzedSha":"6b5ea0155793e666666745fb8d6fef1e829543a2","analyzedAt":"2026-08-12T23:42:12.959Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}