{"record":{"id":"335241aed80fb014","repo":"risingwavelabs/risingwave","slug":"sink-validation-failed","errorCode":null,"errorMessage":"sink validation failed: {}","messagePattern":"sink validation failed: (.+?)","errorType":"exception","errorClass":"anyhow","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/remote.rs","lineNumber":265,"sourceCode":"                sink_param: Some(sink_param),\n            };\n            let validate_sink_request_bytes =\n                env.byte_array_from_slice(&Message::encode_to_vec(&validate_sink_request))?;\n\n            let validate_sink_response_bytes = call_static_method!(\n                env,\n                {com.risingwave.connector.JniSinkValidationHandler},\n                {byte[] validate(byte[] validateSourceRequestBytes)},\n                &validate_sink_request_bytes\n            )?;\n\n            let validate_sink_response: ValidateSinkResponse = Message::decode(\n                risingwave_jni_core::to_guarded_slice(&validate_sink_response_bytes, env)?.deref(),\n            )?;\n\n            validate_sink_response.error.map_or_else(\n                || Ok(()), // If there is no error message, return Ok here.\n                |err| bail!(\"sink validation failed: {}\", err.error_message),\n            )\n        })\n    })\n    .await\n    .context(\"join handle returned an error\")??;\n\n    Ok(())\n}\n\npub struct RemoteLogSinker {\n    request_sender: BidiStreamSender<JniSinkWriterStreamRequest>,\n    response_stream: BidiStreamReceiver<SinkWriterStreamResponse>,\n    stream_chunk_converter: StreamChunkConverter,\n    sink_writer_metrics: SinkWriterMetrics,\n}\n\nimpl RemoteLogSinker {\n    async fn new(","sourceCodeStart":247,"sourceCodeEnd":283,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/remote.rs#L247-L283","documentation":"After RisingWave sends a validation request to the remote (JVM) sink via JNI, the remote side returns a ValidateSinkResponse containing an error message. RisingWave surfaces that remote-side failure verbatim as 'sink validation failed: <message>'.","triggerScenarios":"Calling sink validate where the remote connector (running in the embedded JVM) rejects the sink config/schema, returning error set in ValidateSinkResponse.error.error_message.","commonSituations":"Wrong connection settings for the downstream system (bad ES URL, JDBC credentials, Kafka broker address); remote connector rejects the schema during its own validation pass; the downstream service is unreachable from the JVM.","solutions":["Read the inner error_message appended to this error - it comes from the remote connector and names the actual problem.","Fix the sink's connection properties (endpoint, credentials, format/encode options).","Verify the downstream system is reachable from the RisingWave node.","Re-run validation after correcting the CREATE SINK options."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match sink_validate_result {\n    Err(e) if e.to_string().contains(\"sink validation failed\") => {\n        // surface the inner remote message, fix connector properties/endpoint\n        log::error(\"remote sink rejected validation: {}\", e);\n    }\n    Err(e) => return Err(e),\n    Ok(()) => { /* proceed */ }\n}","preventionTips":["Pre-validate connectivity to the downstream system (ES/JDBC/Kafka) from the RW node","Keep sink connection options in version-controlled config","Always read the inner error_message; it names the remote-side root cause"],"tags":["sink","validation","jni","remote-connector"],"backgroundTag":"schema-validation-failed","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}