{"record":{"id":"f70d69b3e0fcf4e0","repo":"risingwavelabs/risingwave","slug":"failed-to-parse-meta-address-1-0","errorCode":null,"errorMessage":"failed to parse meta address `{1}`: {0}","messagePattern":"failed to parse meta address `(.+?)`: (.+?)","errorType":"validation","errorClass":"MetaAddressStrategyParseError","httpStatus":null,"severity":"error","filePath":"src/common/src/util/meta_addr.rs","lineNumber":38,"sourceCode":"const META_ADDRESS_LOAD_BALANCE_MODE_PREFIX: &str = \"load-balance+\";\n\n/// The strategy for meta client to connect to meta node.\n///\n/// Used in the command line argument `--meta-address`.\n#[derive(Debug, Eq, PartialEq, Clone)]\npub enum MetaAddressStrategy {\n    LoadBalance(http::Uri),\n    List(Vec<http::Uri>),\n}\n\n/// Error type for parsing meta address strategy.\n#[derive(thiserror::Error, Debug, thiserror_ext::ContextInto)]\npub enum MetaAddressStrategyParseError {\n    #[error(\"empty meta addresses\")]\n    Empty,\n    #[error(\"there should be only one load balance address\")]\n    MultipleLoadBalance,\n    #[error(\"failed to parse meta address `{1}`: {0}\")]\n    UrlParse(#[source] http::uri::InvalidUri, String),\n}\n\nimpl FromStr for MetaAddressStrategy {\n    type Err = MetaAddressStrategyParseError;\n\n    fn from_str(meta_addr: &str) -> Result<Self, Self::Err> {\n        if let Some(addr) = meta_addr.strip_prefix(META_ADDRESS_LOAD_BALANCE_MODE_PREFIX) {\n            // UFCS pins this to `itertools::Itertools::exactly_one`; a future\n            // stabilization of `Iterator::exactly_one` (rust#48919) would otherwise\n            // make the bare method call ambiguous / silently rebind.\n            let addr = Itertools::exactly_one(addr.split(','))\n                .map_err(|_| MetaAddressStrategyParseError::MultipleLoadBalance)?;\n\n            let uri = addr.parse().into_url_parse(addr)?;\n\n            Ok(Self::LoadBalance(uri))\n        } else {","sourceCodeStart":20,"sourceCodeEnd":56,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/common/src/util/meta_addr.rs#L20-L56","documentation":"RisingWave's meta address parser validates each entry in the comma-separated meta address list as an HTTP URL. `UrlParse(InvalidUri, String)` wraps the underlying `http::uri::InvalidUri` produced by the `http` crate together with the offending address string, so the message shows both the cause and which address failed.","triggerScenarios":"Passing an address that is not a valid http URI, e.g. `meta:5690` missing the scheme, `http:/missing-slash`, `http://[bad-ipv6`, an address with stray spaces `http://node1 , http://node2`, or a hostname with illegal characters.","commonSituations":"Omitting the `http://` scheme when copying endpoints, hostnames containing underscores or ports with typos (`http://meta-node:569o`), environment templates that inject extra whitespace, IPv6 addresses not bracketed correctly.","solutions":["Prefix the address with a valid scheme: `http://host:port` (or https if configured)","Remove whitespace around addresses in the comma-separated list","Fix malformed host/port/IPv6 syntax (bracket IPv6 literals: `http://[::1]:5690`)","Check the inner `InvalidUri` message printed after the colon for the exact URL defect"],"exampleFix":"// before\n--meta-address \"meta-node-0:5690\"\n// after\n--meta-address \"http://meta-node-0:5690\"","handlingStrategy":"validation","validationCode":"// validate each address is a parseable absolute http URI before passing it on\nfor addr in raw.split(',').map(str::trim).filter(|s| !s.is_empty()) {\n    if !(addr.starts_with(\"http://\") || addr.starts_with(\"https://\")) {\n        return Err(format!(\"meta address `{addr}` needs an http:// or https:// scheme\"));\n    }\n}\n","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always include the `http://` (or https) scheme in meta addresses","Trim whitespace around each comma-separated address","Bracket IPv6 literals and double-check ports","Validate address templates in deployment configs before rollout"],"tags":["url","risingwave","config","meta-node"],"backgroundTag":"invalid-url-format","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}