Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Startup not failing if port is already in use #241

Closed
slovdahl opened this issue May 2, 2019 · 2 comments
Closed

Startup not failing if port is already in use #241

slovdahl opened this issue May 2, 2019 · 2 comments
Labels

Comments

@slovdahl
Copy link
Contributor

slovdahl commented May 2, 2019

While trying to write a systemd unit for elasticsearch_exporter, I noticed that startup doesn't fail if the process can't bind to the requested port.

A line is logged (level=error ts=2019-05-02T08:28:32.578028364Z caller=main.go:190 msg="http server quit" err="listen tcp 0.0.0.0:9114: bind: address already in use"), but the process just keeps running. In my opinion, this is a bit unexpected behaviour. Instead, the process should exist with a non-zero status code.

Is this intentional, or just an oversight?

@zwopir zwopir added the bug label May 15, 2019
@zwopir
Copy link
Member

zwopir commented May 15, 2019

that's a bug

@zwopir zwopir closed this as completed in c17dd85 May 16, 2019
@slovdahl
Copy link
Contributor Author

Awesome, thank you, that was quick! 🙇‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants