Symptoms
- The connection step of the ClickPipe setup fails with a timeout after a long wait.
- The reverse private endpoint has the status
Readyin the ClickHouse Cloud console. - In AWS, the endpoint connection is accepted, the endpoint service is available, and every target in the target groups of the NLB is healthy.
- The connection attempts never arrive at the brokers or at the database.
Why the health checks stay green
Two documented properties of security groups for Network Load Balancers combine here:- Health checks are subject to the outbound rules of the security group, but not to its inbound rules. A healthy target tells you that the load balancer can reach the target. It tells you nothing about whether client traffic is let in.
- When inbound rules are enforced on PrivateLink traffic, they are evaluated against the private IP address of the client, not against the endpoint network interface. ClickPipes creates the reverse private endpoint in its own VPC, so the client address is not one of yours, and rules that allow your VPC range or your own security groups do not match it.
Confirm the cause
Check whether the load balancer has security groups and whether it enforces their inbound rules on PrivateLink traffic:on, run the connection step of the ClickPipe again and look at the CloudWatch metrics of the load balancer whose names start with SecurityGroupBlockedFlowCount_Inbound. They count the flows that the inbound rules of the load balancer security groups rejected. Blocked traffic does not appear in the other metrics of the load balancer.
AWS reports these metrics for the load balancer and its Availability Zones, not for a single client. If the ClickPipe is the only client that opens connections through the load balancer during the test, a value above zero confirms the cause. If other clients use the same load balancer, the rejected flows can be theirs, so a value above zero is a hint and not a proof.
Fix
Turn off the load balancer option Enforce inbound rules on PrivateLink traffic, either in the AWS console or with the AWS CLI:--security-groups. Pass the security groups that are attached already (the first command prints them) to leave them unchanged.
If you manage the load balancer as code, the same switch is the enforce_security_group_inbound_rules_on_private_link_traffic argument of the load balancer resource in Terraform, and the EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic property in CloudFormation. Set it to off.
Then repeat the connection step of the ClickPipe. If it still times out, the security group was not the cause, or not the only one: go through the other steps of the setup guides in Related pages.
The option belongs to the load balancer, not to a single endpoint connection. With off, the inbound rules no longer filter any traffic that reaches this load balancer through PrivateLink, whether it comes from ClickPipes or from another consumer of the endpoint service. If other consumers share the load balancer and you rely on the inbound rules for them, consider a separate load balancer and endpoint service for ClickPipes.
The inbound rules of the security group keep applying to traffic that does not arrive through PrivateLink. Access through the endpoint service remains limited by its allowed principals, where you added the ClickPipes account, and by the acceptance of connection requests if the endpoint service requires it.
Related pages
- AWS PrivateLink for ClickPipes: the supported approaches and how to create a reverse private endpoint.
- AWS PrivateLink setup to expose private RDS for ClickPipes and AWS PrivateLink VPC endpoint service for MSK cluster: setup guides that include this setting as a step.
- Custom private DNS: for Kafka, the broker host names that the cluster advertises must resolve to the reverse private endpoints. A host name that does not is a separate cause of failed connections.