risingwavelabs/risingwave · error
source validation failed
Error message
source validation failed
What it means
During CDC source validation, RisingWave invokes the Java (Debezium) connector via JNI and decodes a ValidateSourceResponse. If the response carries an error field, the inner error_message is wrapped with the context 'source validation failed', meaning the external connector rejected the source configuration (bad broker address, credentials, topic, table, etc.).
Source
Thrown at src/connector/src/source/cdc/enumerator/mod.rs:144
};
let validate_source_request_bytes =
env.byte_array_from_slice(&Message::encode_to_vec(&validate_source_request))?;
let validate_source_response_bytes = call_static_method!(
env,
{com.risingwave.connector.source.JniSourceValidateHandler},
{byte[] validate(byte[] validateSourceRequestBytes)},
&validate_source_request_bytes
)?;
let validate_source_response: ValidateSourceResponse = Message::decode(
risingwave_jni_core::to_guarded_slice(&validate_source_response_bytes, env)?
.deref(),
)?;
if let Some(error) = validate_source_response.error {
return Err(anyhow!(error.error_message).context("source validation failed"));
}
Ok(())
})
})
.await
.context("failed to validate source")??;
tracing::debug!("validate cdc source properties success");
Ok(Self {
source_id,
worker_node_addrs: server_addrs,
metrics: context.metrics.clone(),
pg_cdc_upstream_max_lsn: None,
pg_cdc_confirmed_flush_lsn: None,
mysql_cdc_binlog_file_seq_min: None,
mysql_cdc_binlog_file_seq_max: None,
sqlserver_cdc_upstream_min_lsn: None,View on GitHub (pinned to 6469eb736d)
Solutions
- Read the inner error_message (shown below the context) and fix the Debezium config it points at (hostname, port, user, password, database, table)
- Verify the upstream database is reachable from RisingWave (network/firewall/DNS)
- Confirm the CDC user has required privileges (e.g. REPLICATION for Postgres)
- Fix or remove invalid options in the WITH clause and retry CREATE SOURCE
Example fix
// before WITH (connector='cdc', hostname='db.internal', port='5433', ...) // after WITH (connector='cdc', hostname='db.internal', port='5432', username='rw', password='***', ...)
Defensive patterns
Strategy: validation
Validate before calling
// pre-check upstream DB before CREATE SOURCE ... CONNECTOR TYPE CDC let client = tokio_postgres::connect(&pg_config, NoTls).await?; // verifies host/port/credentials
Try / catch
match create_source_result {
Err(e) if e.root_cause().to_string() != "source validation failed" => return Err(e),
Err(e) => {
// surface the nested Debezium error_message to the user
tracing::error!("CDC validation: {}", e);
Err(e)
}
ok => ok,
} Prevention
- Verify hostname/port/user/password/replication privileges for the upstream database before creating a CDC source
- Ensure RisingWave can reach the database over the network (firewall, DNS)
- Read the inner Debezium error_message; it names the exact misconfiguration
When it happens
Trigger: CREATE SOURCE ... CONNECTOR TYPE CDC (JDBC/Postgres/MySQL/SQL Server) where the Debezium-side validation returns error — unreachable database, wrong hostname/port/user/password, missing table, or unsupported connector config; raised in CdcSplitEnumerator::new validation path.
Common situations: Wrong JDBC connection parameters; database firewall blocking access; user lacks replication privileges; typos in CDC config options.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- invalid backfill_num_rows_per_split, must be greater than 0
- The database name '{}' in FROM clause does not match the dat
- PostgreSQL schema `{schema}` does not exist
- PostgreSQL table `{schema}`.`{table}` does not exist
- PostgreSQL table {} exists, but the connection user `{}` doe
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/31cb1b4b087558d4.
Report an issue: GitHub.