I have self-hosted gitlab which was hosted on AWS behind the CLB. Later I used aws-lb-controller and migrated my CLB to NLB with the required annotations. When I try to clone the repo over https, it works fine however when I clone over ssh,it fails saying connection reset by peer on port 7999.
Two things only I can really think of.
- Ensure the Load Balancer is providing port 7999 and redirecting it.
- Ensure any ingress/egress rules have been configured to allow access via port 7999 to the load balancer, and also from the load balancer to your Gitlab instance.
If I tried to telnet of port 7999 on NLB, I got the successful connection. However when using the git client to clone the repo, this doesn’t work. Adding, previously it was working on CLB, we recently migrated to NLB.
If it was working on CLB, then there shouldn’t be anything specific to configure on the Gitlab instance. The problem here seems to be with the NLB configuration, not with Gitlab.
Connection reset by peer means that the connection is being blocked/dropped, most likely either between you and the load balancer, or between the load balancer and the Gitlab instance. As I mentioned you need to check your connectively at each level, and ensure that NLB is configured properly, as well as ensuring ingress/egress allows the ports.
Sure, I will check and cofirm