A failed listen leaves a live, non-serving process that fx still reports RUNNING #200
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Start a second instance while the port is bound and the process does not exit. Observed, then it sat there for 183 s:
Cause:
Server's fxOnStarthook returnsnilimmediately and runss.Run()in a goroutine (internal/server/server.go:104-116). The listen error only callss.cancelFunc()(internal/server/http.go:43-50), which endsserve()'s wait but never invokesfx.Shutdowner, so the process stays alive with no listener.Operational impact: systemd
Restart=on-failureand Docker restart policies never fire. The service is down and looks up. It is also the precondition for the duplicate-delivery defect filed alongside this one.Definition of done:
fx.Shutdowner.Shutdown()(or equivalent) so the process exits non-zeroPORTbound by another process: a second start exits non-zero within a second or so, and logs the bind errordocker stopstill drains within the existing grace window