{"record":{"id":"c2c2f6fb02feb6a5","repo":"tinyhumansai/openhuman","slug":"invalid-bind-address-bind-host-port-err","errorCode":null,"errorMessage":"invalid bind address `{bind_host}:{port}`: {err}","messagePattern":"invalid bind address `(.+?):(.+?)`: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/mcp/server/stdio.rs","lineNumber":96,"sourceCode":"    }\n\n    init_mcp_logging(verbose);\n\n    let rt = tokio::runtime::Builder::new_multi_thread()\n        .enable_all()\n        .build()?;\n\n    match transport {\n        McpTransport::Stdio => {\n            log::debug!(\"[mcp_server] starting stdio MCP server\");\n            rt.block_on(async { run_stdio(tokio::io::stdin(), tokio::io::stdout()).await })?;\n        }\n        McpTransport::Http => {\n            #[cfg(feature = \"http-server\")]\n            {\n                let bind_addr: SocketAddr =\n                    format!(\"{bind_host}:{port}\").parse().map_err(|err| {\n                        anyhow::anyhow!(\"invalid bind address `{bind_host}:{port}`: {err}\")\n                    })?;\n                log::debug!(\n                    \"[mcp_server] starting HTTP/SSE MCP server bind={bind_addr} auth={}\",\n                    auth_token.is_some()\n                );\n                rt.block_on(run_http(HttpServerConfig {\n                    bind_addr,\n                    auth_token,\n                }))?;\n            }\n            // Built without the axum transport (#5048): the stdio path above\n            // still works; `--transport http` reports the build fact.\n            #[cfg(not(feature = \"http-server\"))]\n            {\n                let _ = (&bind_host, port, &auth_token);\n                bail!(\"mcp --transport http unavailable: built without the http-server feature\");\n            }\n        }","sourceCodeStart":78,"sourceCodeEnd":114,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/mcp/server/stdio.rs#L78-L114","documentation":"Formatting bind_host:port into a SocketAddr failed to parse — the host is not a valid IP literal (a hostname like \"localhost\" is rejected by SocketAddr::parse) or the port is out of range. Fires before the HTTP MCP server binds.","triggerScenarios":"Thrown at src/openhuman/mcp/server/stdio.rs:96 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use an IP literal for --host, e.g. 127.0.0.1 instead of localhost","Confirm --port is within 0-65535","Resolve hostnames to IPs before passing them to the server CLI"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}