[GH-ISSUE #5177] Fresh installation not working due to connection refused on /oauth2/keys #10723

Open
opened 2026-08-05 01:27:03 -04:00 by saavagebueno · 0 comments
Owner

Originally created by @Derison on GitHub (Jan 25, 2026).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/5177

Describe the problem

I was just trying to setup Netbird using the getting-started.sh script behind a traefik reverse-proxy, but the setup is not successfully due to this error:

[+] Running 5/5
 ✔ Volume "netbird_netbird_management"  Created                                                                                                                                                                                                                                       0.0s
 ✔ Container netbird-management         Started                                                                                                                                                                                                                                       0.6s
 ✔ Container netbird-dashboard          Started                                                                                                                                                                                                                                       0.6s
 ✔ Container netbird-signal             Started                                                                                                                                                                                                                                       0.6s
 ✔ Container netbird-relay              Started                                                                                                                                                                                                                                       0.7s
Waiting for Management server to become ready . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Taking too long. Checking logs...
netbird-management  | 2026-01-25T13:50:58Z INFO management/server/migration/migration.go:429: successfully created index idx_peers_key_unique on table peers
netbird-management  | 2026-01-25T13:50:58Z INFO management/server/geolocation/database.go:34: Geolocation database file GeoLite2-City_20251230.mmdb not found, file will be downloaded
netbird-management  | 2026-01-25T13:50:59Z INFO management/server/geolocation/database.go:34: Geolocation database file geonames_20251230.db not found, file will be downloaded
netbird-management  | 2026-01-25T13:51:03Z INFO management/internals/server/modules.go:45: geolocation service has been initialized from /var/lib/netbird/
netbird-management  | 2026-01-25T13:51:03Z INFO management/server/telemetry/app_metrics.go:193: enabled application metrics and exposing on http://0.0.0.0:9090
netbird-management  | 2026-01-25T13:51:03Z WARN management/internals/server/boot.go:108: TrustedPeers are configured to default value '0.0.0.0/0', '::/0'. This allows connection IP spoofing.
netbird-management  | 2026-01-25T13:51:03Z INFO management/server/account_request_buffer.go:45: set account request buffer interval to 100ms
netbird-management  | 2026-01-25T13:51:03Z INFO management/server/activity/store/sql_store.go:261: using sqlite as activity event store engine
netbird-management  | 2026-01-25T13:51:03Z INFO management/server/activity/store/sql_store.go:290: Set max open db connections to 1, max idle to 1, max lifetime to 1h0m0s, max idle time to 3m0s
netbird-management  | 2026-01-25T13:51:03Z WARN management/internals/controllers/network_map/controller/controller.go:84: failed to parse NB_EXPERIMENT_NETWORK_MAP, using default value false: strconv.ParseBool: parsing "": invalid syntax
netbird-management  | 2026-01-25T13:51:03Z INFO management/server/idp/embedded.go:200: embedded Dex IDP initialized with issuer: https://netbird.DOMAIN.TLD/oauth2
netbird-management  | 2026-01-25T13:51:03Z INFO management/server/account_request_buffer.go:45: set account request buffer interval to 100ms
netbird-management  | 2026-01-25T13:51:03Z WARN management/internals/controllers/network_map/controller/controller.go:626: failed to parse peer update interval, using default value 1ms: strconv.Atoi: parsing "": invalid syntax
netbird-management  | 2026-01-25T13:51:03Z INFO management/internals/controllers/network_map/controller/controller.go:642: set peer update buffer interval to 1ms
netbird-management  | 2026-01-25T13:51:03Z INFO management/server/account.go:238: single account mode enabled, accounts number 0
netbird-management  | 2026-01-25T13:51:03Z ERRO [keysLocation: http://localhost:80/oauth2/keys] shared/auth/jwt/validator.go:76: could not get keys from location: Get "http://localhost:80/oauth2/keys": dial tcp [::1]:80: connect: connection refused
netbird-management  | 2026-01-25T13:51:03Z INFO management/internals/server/server.go:149: running gRPC backward compatibility server: [::]:33073
netbird-management  | 2026-01-25T13:51:03Z INFO management/internals/server/server.go:187: management server version 0.64.0
netbird-management  | 2026-01-25T13:51:03Z INFO management/internals/server/server.go:188: running HTTP server and gRPC server on the same port: [::]:80
netbird-management  | 2026-01-25T13:51:03Z INFO management/internals/server/server.go:194: your management version, "0.64.0", is outdated, a new management version is available. Learn more here: https://github.com/netbirdio/netbird/releases
 . . . . . . . . . . . . 

However, the Dashboard is available and I can create a user or other resources, but as soon as I want to add a peer, I get this error:

user@Dev:~# curl -fsSL https://pkgs.netbird.io/install.sh | sh
NetBird UI installation will be omitted as Linux does not run desktop environment
The installation will be performed using apt package manager
NetBird seems to be installed already, please remove it before proceeding
user@Dev:~# netbird up --management-url https://netbird.DOMAIN.TLD --setup-key XXX
2026-01-25T13:55:04Z WARN client/cmd/root.go:248: retrying Login to the Management service in 1.440631715s due to error rpc error: code = Unknown desc = failed while getting Management Service public key
2026-01-25T13:55:06Z WARN client/cmd/root.go:248: retrying Login to the Management service in 947.414129ms due to error rpc error: code = Unknown desc = failed while getting Management Service public key
2026-01-25T13:55:07Z WARN client/cmd/root.go:248: retrying Login to the Management service in 1.513106205s due to error rpc error: code = Unknown desc = failed while getting Management Service public key
2026-01-25T13:55:08Z WARN client/cmd/root.go:248: retrying Login to the Management service in 2.994044417s due to error rpc error: code = Unknown desc = failed while getting Management Service public key
2026-01-25T13:55:11Z WARN client/cmd/root.go:248: retrying Login to the Management service in 4.020950617s due to error rpc error: code = Unknown desc = failed while getting Management Service public key
2026-01-25T13:55:16Z WARN client/cmd/root.go:248: retrying Login to the Management service in 8.052059555s due to error rpc error: code = Unknown desc = failed while getting Management Service public key
2026-01-25T13:55:24Z WARN client/cmd/root.go:248: retrying Login to the Management service in 8.323004862s due to error rpc error: code = Unknown desc = failed while getting Management Service public key
Error: daemon up failed: login backoff cycle failed: rpc error: code = Unknown desc = failed while getting Management Service public key

It works however when I select eh internal caddy webserver on another VM without traefik. I don't know if thats related, but there is an independent Zitadel instance in the same proxy network?

To Reproduce

Steps to reproduce the behavior:

  1. Execute curl -fsSL https://github.com/netbirdio/netbird/releases/download/v0.64.1/getting-started.sh | bash
  2. Select [1] traefik
  3. Wait for Waiting for Management server to become ready...

Expected behavior

I expect the setup to be successfull without any errors.

Are you using NetBird Cloud?

Self-Hosted Netbird v0.64.1 behind traefik reverse-proxy using the getting-started.sh skript.

NetBird version

v0.64.1

Is any other VPN software installed?

No

Have you tried these troubleshooting steps?

  • Reviewed client troubleshooting (if applicable)
  • Checked for newer NetBird versions
  • Searched for similar issues on GitHub (including closed ones)
  • Restarted the NetBird client
  • Disabled other VPN software
  • Checked firewall settings
Originally created by @Derison on GitHub (Jan 25, 2026). Original GitHub issue: https://github.com/netbirdio/netbird/issues/5177 **Describe the problem** I was just trying to setup Netbird using the `getting-started.sh` script behind a traefik reverse-proxy, but the setup is not successfully due to this error: ``` [+] Running 5/5 ✔ Volume "netbird_netbird_management" Created 0.0s ✔ Container netbird-management Started 0.6s ✔ Container netbird-dashboard Started 0.6s ✔ Container netbird-signal Started 0.6s ✔ Container netbird-relay Started 0.7s Waiting for Management server to become ready . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Taking too long. Checking logs... netbird-management | 2026-01-25T13:50:58Z INFO management/server/migration/migration.go:429: successfully created index idx_peers_key_unique on table peers netbird-management | 2026-01-25T13:50:58Z INFO management/server/geolocation/database.go:34: Geolocation database file GeoLite2-City_20251230.mmdb not found, file will be downloaded netbird-management | 2026-01-25T13:50:59Z INFO management/server/geolocation/database.go:34: Geolocation database file geonames_20251230.db not found, file will be downloaded netbird-management | 2026-01-25T13:51:03Z INFO management/internals/server/modules.go:45: geolocation service has been initialized from /var/lib/netbird/ netbird-management | 2026-01-25T13:51:03Z INFO management/server/telemetry/app_metrics.go:193: enabled application metrics and exposing on http://0.0.0.0:9090 netbird-management | 2026-01-25T13:51:03Z WARN management/internals/server/boot.go:108: TrustedPeers are configured to default value '0.0.0.0/0', '::/0'. This allows connection IP spoofing. netbird-management | 2026-01-25T13:51:03Z INFO management/server/account_request_buffer.go:45: set account request buffer interval to 100ms netbird-management | 2026-01-25T13:51:03Z INFO management/server/activity/store/sql_store.go:261: using sqlite as activity event store engine netbird-management | 2026-01-25T13:51:03Z INFO management/server/activity/store/sql_store.go:290: Set max open db connections to 1, max idle to 1, max lifetime to 1h0m0s, max idle time to 3m0s netbird-management | 2026-01-25T13:51:03Z WARN management/internals/controllers/network_map/controller/controller.go:84: failed to parse NB_EXPERIMENT_NETWORK_MAP, using default value false: strconv.ParseBool: parsing "": invalid syntax netbird-management | 2026-01-25T13:51:03Z INFO management/server/idp/embedded.go:200: embedded Dex IDP initialized with issuer: https://netbird.DOMAIN.TLD/oauth2 netbird-management | 2026-01-25T13:51:03Z INFO management/server/account_request_buffer.go:45: set account request buffer interval to 100ms netbird-management | 2026-01-25T13:51:03Z WARN management/internals/controllers/network_map/controller/controller.go:626: failed to parse peer update interval, using default value 1ms: strconv.Atoi: parsing "": invalid syntax netbird-management | 2026-01-25T13:51:03Z INFO management/internals/controllers/network_map/controller/controller.go:642: set peer update buffer interval to 1ms netbird-management | 2026-01-25T13:51:03Z INFO management/server/account.go:238: single account mode enabled, accounts number 0 netbird-management | 2026-01-25T13:51:03Z ERRO [keysLocation: http://localhost:80/oauth2/keys] shared/auth/jwt/validator.go:76: could not get keys from location: Get "http://localhost:80/oauth2/keys": dial tcp [::1]:80: connect: connection refused netbird-management | 2026-01-25T13:51:03Z INFO management/internals/server/server.go:149: running gRPC backward compatibility server: [::]:33073 netbird-management | 2026-01-25T13:51:03Z INFO management/internals/server/server.go:187: management server version 0.64.0 netbird-management | 2026-01-25T13:51:03Z INFO management/internals/server/server.go:188: running HTTP server and gRPC server on the same port: [::]:80 netbird-management | 2026-01-25T13:51:03Z INFO management/internals/server/server.go:194: your management version, "0.64.0", is outdated, a new management version is available. Learn more here: https://github.com/netbirdio/netbird/releases . . . . . . . . . . . . ``` However, the Dashboard is available and I can create a user or other resources, but as soon as I want to add a peer, I get this error: ``` user@Dev:~# curl -fsSL https://pkgs.netbird.io/install.sh | sh NetBird UI installation will be omitted as Linux does not run desktop environment The installation will be performed using apt package manager NetBird seems to be installed already, please remove it before proceeding user@Dev:~# netbird up --management-url https://netbird.DOMAIN.TLD --setup-key XXX 2026-01-25T13:55:04Z WARN client/cmd/root.go:248: retrying Login to the Management service in 1.440631715s due to error rpc error: code = Unknown desc = failed while getting Management Service public key 2026-01-25T13:55:06Z WARN client/cmd/root.go:248: retrying Login to the Management service in 947.414129ms due to error rpc error: code = Unknown desc = failed while getting Management Service public key 2026-01-25T13:55:07Z WARN client/cmd/root.go:248: retrying Login to the Management service in 1.513106205s due to error rpc error: code = Unknown desc = failed while getting Management Service public key 2026-01-25T13:55:08Z WARN client/cmd/root.go:248: retrying Login to the Management service in 2.994044417s due to error rpc error: code = Unknown desc = failed while getting Management Service public key 2026-01-25T13:55:11Z WARN client/cmd/root.go:248: retrying Login to the Management service in 4.020950617s due to error rpc error: code = Unknown desc = failed while getting Management Service public key 2026-01-25T13:55:16Z WARN client/cmd/root.go:248: retrying Login to the Management service in 8.052059555s due to error rpc error: code = Unknown desc = failed while getting Management Service public key 2026-01-25T13:55:24Z WARN client/cmd/root.go:248: retrying Login to the Management service in 8.323004862s due to error rpc error: code = Unknown desc = failed while getting Management Service public key Error: daemon up failed: login backoff cycle failed: rpc error: code = Unknown desc = failed while getting Management Service public key ``` It works however when I select eh internal caddy webserver on another VM without traefik. I don't know if thats related, but there is an independent Zitadel instance in the same proxy network? **To Reproduce** Steps to reproduce the behavior: 1. Execute `curl -fsSL https://github.com/netbirdio/netbird/releases/download/v0.64.1/getting-started.sh | bash` 2. Select [1] traefik 3. Wait for `Waiting for Management server to become ready...` **Expected behavior** I expect the setup to be successfull without any errors. **Are you using NetBird Cloud?** Self-Hosted Netbird v0.64.1 behind traefik reverse-proxy using the getting-started.sh skript. **NetBird version** v0.64.1 **Is any other VPN software installed?** No **Have you tried these troubleshooting steps?** - [x] Reviewed [client troubleshooting](https://docs.netbird.io/how-to/troubleshooting-client) (if applicable) - [x] Checked for newer NetBird versions - [x] Searched for similar issues on GitHub (including closed ones) - [x] Restarted the NetBird client - [x] Disabled other VPN software - [x] Checked firewall settings
saavagebueno added the triage-needed label 2026-08-05 01:27:03 -04:00
Sign in to join this conversation.
No Label triage-needed
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#10723