{"record":{"id":"5ac1107351dc044e","repo":"risingwavelabs/risingwave","slug":"transport-build-error-e","errorCode":null,"errorMessage":"transport build error: {e}","messagePattern":"transport build error: (.+?)","errorType":"validation","errorClass":"SinkError","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/elasticsearch_opensearch/elasticsearch_opensearch_config.rs","lineNumber":220,"sourceCode":"            Ok(())\n        };\n        let url =\n            Url::parse(&self.url).map_err(|e| SinkError::ElasticSearchOpenSearch(anyhow!(e)))?;\n        if connector.eq(ES_SINK) {\n            let mut transport_builder = elasticsearch::http::transport::TransportBuilder::new(\n                elasticsearch::http::transport::SingleNodeConnectionPool::new(url),\n            );\n            if let Some(username) = &self.username\n                && let Some(password) = &self.password\n            {\n                transport_builder = transport_builder.auth(\n                    elasticsearch::auth::Credentials::Basic(username.clone(), password.clone()),\n                );\n            }\n            check_username_password()?;\n            let transport = transport_builder\n                .build()\n                .map_err(|e| SinkError::ElasticSearchOpenSearch(anyhow!(e)))?;\n            let client = elasticsearch::Elasticsearch::new(transport);\n            Ok(ElasticSearchOpenSearchClient::ElasticSearch(client))\n        } else if connector.eq(OPENSEARCH_SINK) {\n            let mut transport_builder = opensearch::http::transport::TransportBuilder::new(\n                opensearch::http::transport::SingleNodeConnectionPool::new(url),\n            );\n            if let Some(username) = &self.username\n                && let Some(password) = &self.password\n            {\n                transport_builder = transport_builder.auth(opensearch::auth::Credentials::Basic(\n                    username.clone(),\n                    password.clone(),\n                ));\n            }\n            check_username_password()?;\n            let transport = transport_builder\n                .build()\n                .map_err(|e| SinkError::ElasticSearchOpenSearch(anyhow!(e)))?;","sourceCodeStart":202,"sourceCodeEnd":238,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/elasticsearch_opensearch/elasticsearch_opensearch_config.rs#L202-L238","documentation":"After parsing the URL, build_client assembles the elasticsearch/opensearch crate TransportBuilder and builds a Transport; any error from TransportBuilder::build() (e.g. bad proxy configuration, TLS setup failure, empty connection pool) is wrapped with this message.","triggerScenarios":"new() -> build_client() -> transport_builder.build() returns Err. Commonly misconfigured proxy settings (transport builder proxy), invalid TLS configuration, or an underlying transport construction failure after URL parsing succeeded.","commonSituations":"HTTPS endpoint with unparseable certificate setup; proxy env/config incompatibilities; issues constructing the single-node connection pool; version drift between the elasticsearch/opensearch crate and the cluster.","solutions":["Read the wrapped underlying error from the message to identify which transport parameter failed.","Recheck url correctness and scheme (http vs https) — a wrong scheme can break TLS transport setup.","Remove/correct proxy settings (e.g. conflicting HTTP_PROXY env vars) if a proxy is involved.","Verify the cluster is reachable with curl from the RisingWave node and that the crate version supports the cluster's API/TLS version."],"exampleFix":"// before\n'url' = 'https://localhost:9200'  // https on a plain-http node\n// after\n'url' = 'http://localhost:9200'","handlingStrategy":"try-catch","validationCode":"curl -sk 'https://es.example.com:9243' -u elastic:secret   # confirm reachability, scheme and TLS before building the sink","typeGuard":null,"tryCatchPattern":"match err { SinkError::ElasticSearchOpenSearch(e) if e.to_string().contains(\"transport build error\") => inspect_source_and_fix_transport_config(), _ => return Err(err) }","preventionTips":["Match the URL scheme to the cluster (http vs https) before creating the sink.","Clear conflicting HTTP_PROXY/HTTPS_PROXY env vars on the RisingWave process when no proxy is intended.","Verify the cluster's TLS version/cert is compatible with the crate's native-tls setup."],"tags":["elasticsearch","opensearch","transport","tls","initialization"],"backgroundTag":"module-init-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"}