Port conflict for metrics (Error: listen tcp4 :9090: bind: address already in use) #1269

Closed
opened 2025-11-20 05:27:13 -05:00 by saavagebueno · 5 comments
Owner

Originally created by @kbudde on GitHub (Sep 23, 2024).

Same metrics port is used for all services

Since #2599 (v0.29.3) the same port is used for the metrics endpoint for each service.
If the services are installed on the same machine without docker, the port conflict prevents the service from starting and needs to be overwritten using the --metrics-port flag.

This affects signal, relay and management service:
https://github.com/search?q=repo%3Anetbirdio%2Fnetbird%20metrics-port&type=code

To Reproduce

Steps to reproduce the behavior:

  1. Install all services on a VM as service without changing the default configuration for metrics port.

Expected behavior

The default configuraiton should not create conflicts.

NetBird version

0.29.4

Originally created by @kbudde on GitHub (Sep 23, 2024). **Same metrics port is used for all services** Since #2599 (v0.29.3) the same port is used for the metrics endpoint for each service. If the services are installed on the same machine without docker, the port conflict prevents the service from starting and needs to be overwritten using the `--metrics-port` flag. This affects signal, relay and management service: https://github.com/search?q=repo%3Anetbirdio%2Fnetbird%20metrics-port&type=code **To Reproduce** Steps to reproduce the behavior: 1. Install all services on a VM as service without changing the default configuration for metrics port. **Expected behavior** The default configuraiton should not create conflicts. **NetBird version** 0.29.4
Author
Owner

@mlsmaycon commented on GitHub (Sep 23, 2024):

Hello @kbudde we are just standardizing the metrics ports between services. In a docker deployment, you should just apply different mapping, but for binary deployments, you will need the --metrics-port to be set. Overall, this is a problem on single boxes with unsupported binary deployments, and it should be easy to update them.

@mlsmaycon commented on GitHub (Sep 23, 2024): Hello @kbudde we are just standardizing the metrics ports between services. In a docker deployment, you should just apply different mapping, but for binary deployments, you will need the `--metrics-port` to be set. Overall, this is a problem on single boxes with unsupported binary deployments, and it should be easy to update them.
Author
Owner

@kbudde commented on GitHub (Sep 23, 2024):

@mlsmaycon fine for me. I even expected this answer.
But this way people will find the background and solution in case they are running into the same issue 😎

@kbudde commented on GitHub (Sep 23, 2024): @mlsmaycon fine for me. I even expected this answer. But this way people will find the background and solution in case they are running into the same issue 😎
Author
Owner

@mlsmaycon commented on GitHub (Sep 23, 2024):

Thanks for opening the ticket @kbudde . We have proper self-hosted documentation in our roadmap.

@mlsmaycon commented on GitHub (Sep 23, 2024): Thanks for opening the ticket @kbudde . We have proper self-hosted documentation in our roadmap.
Author
Owner

@nazarewk commented on GitHub (Apr 28, 2025):

Hello @kbudde,

We're currently reviewing our open issues and would like to verify if this problem still exists in the latest NetBird version.

Could you please confirm if the issue is still there?

We may close this issue temporarily if we don't hear back from you within 2 weeks, but feel free to reopen it with updated information.

Thanks for your contribution to improving the project!

@nazarewk commented on GitHub (Apr 28, 2025): Hello @kbudde, We're currently reviewing our open issues and would like to verify if this problem still exists in the [latest NetBird version](https://github.com/netbirdio/netbird/releases). Could you please confirm if the issue is still there? We may close this issue temporarily if we don't hear back from you within **2 weeks**, but feel free to reopen it with updated information. Thanks for your contribution to improving the project!
Author
Owner

@mlsmaycon commented on GitHub (Jun 1, 2025):

closing issue due to no recent feedback. Feel free to open a new one if the issue persist or reopen if this was a feature request.

@mlsmaycon commented on GitHub (Jun 1, 2025): closing issue due to no recent feedback. Feel free to open a new one if the issue persist or reopen if this was a feature request.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#1269