risingwavelabs/risingwave · error · MetaAddressStrategyParseError
empty meta addresses
Error message
empty meta addresses
What it means
`MetaAddressStrategy::from_str` in RisingWave's util crate parses a meta-node address list (comma-separated URLs from config/CLI) into an addressing strategy. `MetaAddressStrategyParseError::Empty` is returned when the supplied list contains no addresses at all (empty or blank string, or nothing left after splitting). The meta client cannot start without at least one meta node address.
Source
Thrown at src/common/src/util/meta_addr.rs:34
use std::str::FromStr;
use itertools::Itertools;
const META_ADDRESS_LOAD_BALANCE_MODE_PREFIX: &str = "load-balance+";
/// The strategy for meta client to connect to meta node.
///
/// Used in the command line argument `--meta-address`.
#[derive(Debug, Eq, PartialEq, Clone)]
pub enum MetaAddressStrategy {
LoadBalance(http::Uri),
List(Vec<http::Uri>),
}
/// Error type for parsing meta address strategy.
#[derive(thiserror::Error, Debug, thiserror_ext::ContextInto)]
pub enum MetaAddressStrategyParseError {
#[error("empty meta addresses")]
Empty,
#[error("there should be only one load balance address")]
MultipleLoadBalance,
#[error("failed to parse meta address `{1}`: {0}")]
UrlParse(#[source] http::uri::InvalidUri, String),
}
impl FromStr for MetaAddressStrategy {
type Err = MetaAddressStrategyParseError;
fn from_str(meta_addr: &str) -> Result<Self, Self::Err> {
if let Some(addr) = meta_addr.strip_prefix(META_ADDRESS_LOAD_BALANCE_MODE_PREFIX) {
// UFCS pins this to `itertools::Itertools::exactly_one`; a future
// stabilization of `Iterator::exactly_one` (rust#48919) would otherwise
// make the bare method call ambiguous / silently rebind.
let addr = Itertools::exactly_one(addr.split(','))
.map_err(|_| MetaAddressStrategyParseError::MultipleLoadBalance)?;
View on GitHub (pinned to 6469eb736d)
Solutions
- Provide at least one valid meta node URL, e.g. `--meta-address http://127.0.0.1:5690`
- If using an env var or template, ensure the variable is set before interpolation (e.g. `${META_NODES:-http://meta:5690}`)
- Strip stray commas/whitespace from the address list before passing it
- If only one load-balanced address is intended, make sure it is a real URL, not an empty placeholder
Example fix
// before ./risingwave meta-node --meta-address "" // after ./risingwave meta-node --meta-address http://127.0.0.1:5690
Defensive patterns
Strategy: validation
Validate before calling
// before parsing the meta address list
let raw = std::env::var("META_ADDRESS").unwrap_or_default();
let addrs: Vec<&str> = raw.split(',').map(str::trim).filter(|s| !s.is_empty()).collect();
if addrs.is_empty() {
return Err("META_ADDRESS must contain at least one http://host:port entry");
}
Prevention
- Always pass at least one explicit `http://host:port` meta address at startup
- Default unset env vars to a known-good meta endpoint in deployment templates
- Trim whitespace and empty entries from comma-separated lists before use
- Validate config in CI/helm templates so empty META_ADDRESS fails before rollout
When it happens
Trigger: Setting `--meta-address` (or the `META_ADDRESS` env var / config field) to an empty string, a string of only whitespace/commas (e.g. ",,", " "), or passing an empty vector-equivalent on the meta client builder.
Common situations: Misconfigured Kubernetes/launcher env where the meta service DNS list resolves to empty, a truncated YAML/CLI flag (`--meta-address ""`), or scripts that interpolate an unset variable into the flag value.
Understand the failure class
Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.
Related errors
- there should be only one load balance address
- failed to parse meta address `{1}`: {0}
- unrecognized configs: {:?}
- Unsupported parallelism: {0}
- Unsupported strategy: {0}
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/b489f89cbc5dd4aa.
Report an issue: GitHub.