harness / gitness

Gitness is an Open Source developer platform with Source Control management, Continuous Integration and Continuous Delivery.
https://gitness.com
Apache License 2.0
31.96k stars 2.79k forks source link

No error when the process cannot bind to the HTTP/S port #3456

Open markormesher opened 6 months ago

markormesher commented 6 months ago

I recently ran into an issue when running the Drone server as a non-root user in Kubernetes. It was failing to bind to port 80 because it didn't have the required permissions (context). This isn't a problem, you just need to run on a different port or add the necessary capabilities; the issue is that no message is printed when this edge case is hit -- the process just appears to freeze while it waits indefinitely.

It's only when the process exits after being killed that the following error message is printed:

listen tcp :80: bind: permission denied

I totally accept this is a pretty niche edge case, but if the port bind had some timeout period, after which is gave up, it could save other users some frustrating debugging in the future.