risingwavelabs/risingwave · error · ConnectorError
`catalog.uri` must not be set when `hosted_catalog` is set
Error message
`catalog.uri` must not be set when `hosted_catalog` is set
What it means
Same hosted-catalog validation block in `IcebergConnection::validate_connection`: with `hosted_catalog = true` the catalog endpoint is managed by the platform, so an explicit `catalog.uri` conflicts with hosted mode and validation rejects the connection.
Source
Thrown at src/connector/src/connector_common/connection.rs:277
_ => {
bail!("Unsupported scheme: {}", scheme);
}
}
}
if env_var_is_true(DISABLE_DEFAULT_CREDENTIAL)
&& matches!(common.enable_config_load, Some(true))
{
bail!("`enable_config_load` can't be enabled in this environment");
}
if common.hosted_catalog.unwrap_or(false) {
// If `hosted_catalog` is set, we don't need to test the catalog, but just ensure no catalog fields are set.
if common.catalog_type.is_some() {
bail!("`catalog.type` must not be set when `hosted_catalog` is set");
}
if common.catalog_uri.is_some() {
bail!("`catalog.uri` must not be set when `hosted_catalog` is set");
}
if common.catalog_name.is_some() {
bail!("`catalog.name` must not be set when `hosted_catalog` is set");
}
if self.jdbc_user.is_some() {
bail!("`catalog.jdbc.user` must not be set when `hosted_catalog` is set");
}
if self.jdbc_password.is_some() {
bail!("`catalog.jdbc.password` must not be set when `hosted_catalog` is set");
}
return Ok(());
}
if common.catalog_type.is_none() {
bail!("`catalog.type` must be set");
}
// Test catalogView on GitHub (pinned to 6469eb736d)
Solutions
- Remove `catalog.uri` from the connection options when `hosted_catalog = true`.
- Alternatively disable `hosted_catalog` and keep an explicit `catalog.uri` with the appropriate catalog type.
Example fix
// before WITH (connector='iceberg', hosted_catalog=true, catalog.uri='https://rest.example.com') // after WITH (connector='iceberg', hosted_catalog=true)
Defensive patterns
Strategy: validation
Validate before calling
if hosted_catalog && catalog_uri.is_some() { return Err("catalog.uri must be unset when hosted_catalog=true"); } Try / catch
match validate_connection(&conn).await {
Err(e) if e.to_string().contains("`catalog.uri` must not be set") => warn_user_and_abort(),
other => other,
} Prevention
- Remove catalog.uri in hosted-catalog configs
- Differentiate hosted vs self-managed config templates
- Validate options before DDL execution
When it happens
Trigger: Calling validate_connection where `hosted_catalog` is true AND `catalog.uri` is set.
Common situations: Copying a self-managed REST-catalog config (which always has `catalog.uri`) and additionally enabling `hosted_catalog`; leftover options from a previous connection DDL.
Related errors
- `catalog.type` must not be set when `hosted_catalog` is set
- `catalog.name` must not be set when `hosted_catalog` is set
- `catalog.jdbc.user` must not be set when `hosted_catalog` is
- `catalog.jdbc.password` must not be set when `hosted_catalog
- `warehouse.path` must be set
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/6313c6175a9f9ef3.
Report an issue: GitHub.