{"record":{"id":"a228f2b07b8deb52","repo":"risingwavelabs/risingwave","slug":"privatelink-endpoint-not-found","errorCode":null,"errorMessage":"PrivateLink endpoint not found","messagePattern":"PrivateLink endpoint not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/connector/src/source/kafka/private_link.rs","lineNumber":157,"sourceCode":"        );\n    }\n\n    if let Some(endpoint) = privatelink_endpoint {\n        // new syntax: endpoint can either be a string or a json array of strings\n        // if it is a string, rewrite all broker addresses to the same endpoint\n        // eg. privatelink.endpoint='some_url' ==> broker1:9092 -> some_url:9092, broker2:9093 -> some_url:9093\n        // if it is a json array, rewrite each broker address to the corresponding endpoint\n        // eg. privatelink.endpoint = '[{\"host\": \"aaaa\"}, {\"host\": \"bbbb\"}, {\"host\": \"cccc\"}]'\n        // ==> broker1:9092 -> aaaa:9092, broker2:9093 -> bbbb:9093, broker3:9094 -> cccc:9094\n        handle_privatelink_endpoint(\n            &endpoint,\n            &mut broker_rewrite_map,\n            &link_targets,\n            &broker_addrs,\n        )?;\n    } else {\n        if svc.is_none() {\n            bail!(\"PrivateLink endpoint not found\");\n        }\n        let svc = svc.unwrap();\n        for (link, broker) in link_targets.iter().zip_eq_fast(broker_addrs.into_iter()) {\n            if svc.dns_entries.is_empty() {\n                bail!(\n                    \"No available private link endpoints for Kafka broker {}\",\n                    broker\n                );\n            }\n            // rewrite the broker address to the dns name w/o az\n            // requires the NLB has enabled the cross-zone load balancing\n            broker_rewrite_map.insert(\n                broker.to_owned(),\n                format!(\"{}:{}\", svc.endpoint_dns_name, link.port),\n            );\n        }\n    }\n","sourceCodeStart":139,"sourceCodeEnd":175,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/source/kafka/private_link.rs#L139-L175","documentation":"For MSK multi-VPC private link connections, RisingWave looks up the attached PrivateLink service/endpoint information. When the target is multi-VPC ('msk' type path) but no matching service endpoint entry was found, this bail fires because there is nothing to resolve broker DNS names against.","triggerScenarios":"`insert_privatelink_broker_rewrite_map` reaches the multi-VPC branch where `svc` (the looked-up PrivateLink service endpoint, derived from the provided endpoint JSON) is None — the user supplied no `privatelink.endpoints` entry or it didn't match the expected key.","commonSituations":"User configured msk multi-VPC private link targets but forgot the `privatelink.endpoints` WITH option; endpoint JSON keyed by wrong broker host; typo in option name so the endpoints value never reaches the handler.","solutions":["Provide `privatelink.endpoints` JSON in WITH options, e.g. '{\"broker-1.host\":\"vpce-xxx...\"}' mapping each broker host to its VPC endpoint","Verify the JSON keys exactly match the broker addresses from bootstrap servers","Check the WITH option spelling (`privatelink.endpoints`) and that it wasn't removed before this code runs","For MSK multi-VPC, use the broker/az association from `aws msk describe-cluster` to build the mapping"],"exampleFix":"// before\nWITH (connector='kafka', privatelink.targets='[...]' /* no endpoints */)\n// after\nWITH (\n  connector='kafka',\n  privatelink.targets='[...] ',\n  privatelink.endpoints='{\"b-1.msk.us-east-1.amazonaws.com:9096\":\"vpce-0abc123\"}'\n)","handlingStrategy":"validation","validationCode":"if using_multi_vpc && with_options.get(\"privatelink.endpoints\").is_none() {\n    return Err(\"privatelink.endpoints is required for MSK multi-VPC private link\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always supply privatelink.endpoints alongside privatelink.targets for multi-VPC MSK","Match endpoint JSON keys to broker hostnames exactly","Double-check WITH option spelling"],"tags":["kafka","aws","privatelink","msk","endpoint","config"],"backgroundTag":"missing-required-config-field","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}