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

Sniffer unable to start if health port already in use #260

Open
majikman111 opened this issue Dec 12, 2024 · 0 comments
Open

Sniffer unable to start if health port already in use #260

majikman111 opened this issue Dec 12, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@majikman111
Copy link

In our cluster, we have a variety of nodes without various services attached and occasionally port 9090 is already in use, which causes the sniffer to terminate with the following error

{"level":"info","msg":"starting error telemetry for component 'NETWORK_MAPPER' with version 'v2.0.15'","time":"2024-12-12T16:19:53Z"}
{"level":"info","msg":"error reporting disabled","time":"2024-12-12T16:19:53Z"}
http server started on [::]:2112
{"error":"http: Server closed","level": "error","msg":"Error when starting metrics server, however not returning an error as this may be due to the same port being used on the host node, and the sniffer runs in hostNetwork mode.","time":"2024-12-12T16:19:53Z"}
{"error":"listen tcp :9090: bind: address already in use","level": "panic","msg":"Error when running server or HTTP server.","time":"2024-12-12T16:19:58Z"}

Error source:
https://github.com/otterize/network-mapper/blob/main/src/sniffer/cmd/main.go#L106

As it is not required for the sniffer, the health server port should either be configurable per deployment or allowed to fail like the metrics server without crashing the sniffer (possibly as a configurable opt-in setting)

@amitlicht amitlicht added the bug Something isn't working label Dec 15, 2024
@amitlicht amitlicht self-assigned this Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants