risingwavelabs/risingwave · error
missing `username` in CDC properties
Error message
missing `username` in CDC properties
What it means
Raised by `query_sql_server_lsns` when `username` is missing from the CDC properties. SQL Server authentication (via `tiberius::AuthMethod::sql_server`) requires a username and password to open the monitoring connection.
Source
Thrown at src/connector/src/source/cdc/enumerator/mod.rs:290
}
}
/// Query min/max LSNs from SQL Server CDC.
async fn query_sql_server_lsns(&self) -> ConnectorResult<Option<(String, String)>> {
let hostname = self
.properties
.get("hostname")
.ok_or_else(|| anyhow!("missing `hostname` in CDC properties"))?;
let port = self
.properties
.get("port")
.ok_or_else(|| anyhow!("missing `port` in CDC properties"))?
.parse::<u16>()
.context("failed to parse `port` as a u16")?;
let username = self
.properties
.get("username")
.ok_or_else(|| anyhow!("missing `username` in CDC properties"))?;
let password = self
.properties
.get("password")
.ok_or_else(|| anyhow!("missing `password` in CDC properties"))?;
let database = self
.properties
.get("database.name")
.ok_or_else(|| anyhow!("missing `database.name` in CDC properties"))?;
let mut config = Config::new();
config.host(hostname);
config.port(port);
config.database(database);
config.authentication(tiberius::AuthMethod::sql_server(username, password));
config.trust_cert();
let mut client = SqlServerClient::new_with_config(config).await?;
let row = clientView on GitHub (pinned to 6469eb736d)
Solutions
- Add `username` to the CDC source properties
- Verify secret injection/templating populated the username key
- Recreate the table with the full credential set (username and password)
- Confirm the SQL Server login exists and is enabled for CDC access
Example fix
// before WITH (connector = 'cdc', hostname = 'h', port = '1433') // after WITH (connector = 'cdc', hostname = 'h', port = '1433', username = 'cdc_user', password = '***')
Defensive patterns
Strategy: validation
Validate before calling
if !properties.contains_key("username") {
return Err("CDC source requires `username` for SQL Server auth".into());
}
if !properties.contains_key("password") {
return Err("CDC source requires `password` for SQL Server auth".into());
} Prevention
- Inject credentials via a secrets manager and assert non-empty after resolution
- Validate username/password together since sql_server auth requires both
When it happens
Trigger: Calling `monitor_sql_server_lsns` on a SqlServerEnumerator whose `properties` map lacks a `username` entry.
Common situations: User configures Windows/Integrated auth assumptions but the code path requires sql_server auth credentials; credentials omitted for brevity in a dev config; secrets manager fails to inject the username.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- missing `password` in CDC properties
- missing `hostname` in CDC properties
- missing `port` in CDC properties
- missing `database.name` in CDC properties
- Both `access_key` and `secret_key` must be provided
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/b2b629647a1b7a63.
Report an issue: GitHub.