Skip to main content
If a ClickPipe that connects through a VPC endpoint service cannot reach your Kafka brokers or your database, although the reverse private endpoint is ready and all targets of your Network Load Balancer (NLB) are healthy, check whether the NLB has a security group attached. A load balancer with a security group applies its inbound rules to AWS PrivateLink traffic by default, and those rules usually do not match the ClickPipes clients. Turn off the enforcement of inbound rules on PrivateLink traffic for that load balancer. This applies only to the VPC endpoint service approach, where you run an NLB in front of the data source. The VPC resource and MSK multi-VPC approaches do not use a load balancer of yours.

Symptoms

  • The connection step of the ClickPipe setup fails with a timeout after a long wait.
  • The reverse private endpoint has the status Ready in 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.
A timeout, as opposed to a refused connection or a TLS error, means that the packets are dropped somewhere on the way.

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.
A security group drops the packets that no rule allows without answering them, so the client waits until its timeout expires.

Confirm the cause

Check whether the load balancer has security groups and whether it enforces their inbound rules on PrivateLink traffic:
If the load balancer has no security group, the cause is elsewhere. If it has one and the enforcement is 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:
The command requires --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.