Self-hosted: Clients are unable to connect to gRPC port :33073. Port clashing? #164

Closed
opened 2025-11-20 05:07:17 -05:00 by saavagebueno · 3 comments
Owner

Originally created by @kid-alan on GitHub (Aug 15, 2022).

Hello there, team!

I highly appreciate the effort you are putting in the project.
I faced an issue while trying to run self-hosted Netbird, so I decided to report and perhaps to help you with solving it.

An issue

I installed and configured self-hosted Netbird according to https://netbird.io/docs/getting-started/self-hosting
The dashboard works well. I am able to log in and generate auth keys for clients.

But the clients are failing to connect:

root@node-01:~# netbird up --setup-key <key> --management-url https://netbird.example.com:33073
WARN[2022-08-15T14:44:59Z] retrying Login to the Management service in 1.104660288s due to error rpc error: code = Unknown desc = context deadline exceeded 
WARN[2022-08-15T14:45:10Z] retrying Login to the Management service in 2.160763633s due to error rpc error: code = Unknown desc = context deadline exceeded 
Error: login backoff cycle failed: rpc error: code = Unknown desc = context deadline exceeded

Inspecting the logs on the server with docker-compose logs — there are no new log entries when attempting to connect to :33073.

Same behaviour when trying to connect to :443
Now there are log records from dashboard container, indicating that client is attempting to connect to dashboard, instead of manager.

dashboard_1   | 167.71.53.220 - - [15/Aug/2022:14:14:14 +0000] "PRI * HTTP/2.0" 400 150 "-" "-" "-"
dashboard_1   | 167.71.53.220 - - [15/Aug/2022:14:14:15 +0000] "PRI * HTTP/2.0" 400 150 "-" "-" "-"
dashboard_1   | 167.71.53.220 - - [15/Aug/2022:14:14:16 +0000] "PRI * HTTP/2.0" 400 150 "-" "-" "-"
...

TCP ports are open and available:

root@node-01:~# nc -zv netbird.example.com 33073
Connection to netbird.example.com (167.71.61.23) 33073 port [tcp/*] succeeded!
root@node-01:~# nc -zv netbird.example.com 443
Connection to netbird.example.com (167.71.61.23) 443 port [tcp/*] succeeded!

Docker ps output

              Name                             Command               State                                   Ports                                 
---------------------------------------------------------------------------------------------------------------------------------------------------
infrastructure_files_coturn_1       docker-entrypoint.sh --log ...   Up                                                                            
infrastructure_files_dashboard_1    /usr/bin/supervisord -c /e ...   Up      0.0.0.0:443->443/tcp,:::443->443/tcp, 0.0.0.0:80->80/tcp,:::80->80/tcp
infrastructure_files_management_1   /go/bin/netbird-mgmt manag ...   Up      0.0.0.0:33073->443/tcp,:::33073->443/tcp                              
infrastructure_files_signal_1       /go/bin/netbird-signal run ...   Up      0.0.0.0:10000->80/tcp,:::10000->80/tcp 

Port clashing?

I thought maybe the issue is in the ports collision — since both dashboard and gRPC are exposed on the same host port :443.

I changed the port mapping of manager in docker-compose.yml:

ports:
# - 33073:443 #old
  - 33073:33073 #new

Now clients are able to connect instantly.
But the dashboard stops working, showing a red banner on every interactive page, indicating that front-end is unable to connect to the backend.
NetBird 2022-08-15 18-15-22

I tried different combinations of ports in docker-compose configuration, but was not able to get both gRPC API and webpage working. Only one is working at the time.

Could you please guide me to the solution?
I am really not quite sure how the Netbird components are supposed to work being exposed to the same port on the host machine. Perhaps I am missing something or lacking the proper understanding.

If you need any additional info, I will be glad to provide it!

Originally created by @kid-alan on GitHub (Aug 15, 2022). Hello there, team! I highly appreciate the effort you are putting in the project. I faced an issue while trying to run self-hosted Netbird, so I decided to report and perhaps to help you with solving it. ## An issue I installed and configured self-hosted Netbird according to https://netbird.io/docs/getting-started/self-hosting The dashboard works well. I am able to log in and generate auth keys for clients. **But the clients are failing to connect:** ``` root@node-01:~# netbird up --setup-key <key> --management-url https://netbird.example.com:33073 WARN[2022-08-15T14:44:59Z] retrying Login to the Management service in 1.104660288s due to error rpc error: code = Unknown desc = context deadline exceeded WARN[2022-08-15T14:45:10Z] retrying Login to the Management service in 2.160763633s due to error rpc error: code = Unknown desc = context deadline exceeded Error: login backoff cycle failed: rpc error: code = Unknown desc = context deadline exceeded ``` Inspecting the logs on the server with `docker-compose logs` — there are no new log entries when attempting to connect to :33073. **Same behaviour when trying to connect to :443** Now there are log records from _dashboard_ container, indicating that client is attempting to connect to dashboard, instead of manager. ``` dashboard_1 | 167.71.53.220 - - [15/Aug/2022:14:14:14 +0000] "PRI * HTTP/2.0" 400 150 "-" "-" "-" dashboard_1 | 167.71.53.220 - - [15/Aug/2022:14:14:15 +0000] "PRI * HTTP/2.0" 400 150 "-" "-" "-" dashboard_1 | 167.71.53.220 - - [15/Aug/2022:14:14:16 +0000] "PRI * HTTP/2.0" 400 150 "-" "-" "-" ... ``` TCP ports are open and available: ``` root@node-01:~# nc -zv netbird.example.com 33073 Connection to netbird.example.com (167.71.61.23) 33073 port [tcp/*] succeeded! root@node-01:~# nc -zv netbird.example.com 443 Connection to netbird.example.com (167.71.61.23) 443 port [tcp/*] succeeded! ``` Docker ps output ``` Name Command State Ports --------------------------------------------------------------------------------------------------------------------------------------------------- infrastructure_files_coturn_1 docker-entrypoint.sh --log ... Up infrastructure_files_dashboard_1 /usr/bin/supervisord -c /e ... Up 0.0.0.0:443->443/tcp,:::443->443/tcp, 0.0.0.0:80->80/tcp,:::80->80/tcp infrastructure_files_management_1 /go/bin/netbird-mgmt manag ... Up 0.0.0.0:33073->443/tcp,:::33073->443/tcp infrastructure_files_signal_1 /go/bin/netbird-signal run ... Up 0.0.0.0:10000->80/tcp,:::10000->80/tcp ``` ## Port clashing? I thought maybe the issue is in the ports collision — since both dashboard and gRPC are exposed on the same host port :443. I changed the port mapping of manager in `docker-compose.yml`: ``` ports: # - 33073:443 #old - 33073:33073 #new ``` **Now clients are able to connect instantly.** But the dashboard stops working, showing a red banner on every interactive page, indicating that front-end is unable to connect to the backend. <img width="808" alt="NetBird 2022-08-15 18-15-22" src="https://user-images.githubusercontent.com/33395904/184662939-d43b3b0e-55a4-4b32-8e4d-8ebdfe648286.png"> I tried different combinations of ports in docker-compose configuration, but was not able to get _both_ gRPC API and webpage working. Only one is working at the time. Could you please guide me to the solution? I am really not quite sure how the Netbird components are supposed to work being exposed to the same port on the host machine. Perhaps I am missing something or lacking the proper understanding. If you need any additional info, I will be glad to provide it!
Author
Owner

@braginini commented on GitHub (Aug 15, 2022):

hey @kid-alan
Thank you for the feedback and for the details explanation of the issue!
We will check out this issue now. You could also join our Slack for faster response times :)
Slack Channel

@braginini commented on GitHub (Aug 15, 2022): hey @kid-alan Thank you for the feedback and for the details explanation of the issue! We will check out this issue now. You could also join our Slack for faster response times :) [Slack Channel](https://join.slack.com/t/netbirdio/shared_invite/zt-vrahf41g-ik1v7fV8du6t0RwxSrJ96A)
Author
Owner

@braginini commented on GitHub (Aug 15, 2022):

@kid-alan fixed in https://github.com/netbirdio/netbird/releases/tag/v0.8.7

Pull the latest Management image and use defaults from docker-compose (mapping 33073:443 is correct).
There was an issue with disabled HTTP/2 when loading from the provided cert files.

Let us know if it worked for you.

Thanks a lot for pointing this out!

@braginini commented on GitHub (Aug 15, 2022): @kid-alan fixed in https://github.com/netbirdio/netbird/releases/tag/v0.8.7 Pull the latest Management image and use defaults from docker-compose (mapping 33073:443 is correct). There was an issue with disabled HTTP/2 when loading from the provided cert files. Let us know if it worked for you. Thanks a lot for pointing this out!
Author
Owner

@kid-alan commented on GitHub (Aug 15, 2022):

@braginini Works like a charm. Thank you for such a quick fix! 🖤

@kid-alan commented on GitHub (Aug 15, 2022): @braginini Works like a charm. Thank you for such a quick fix! 🖤
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#164