[GH-ISSUE #5066] Service startup blocked waiting for GeoLite2 database download (Request: Async download) #10429

Open
opened 2026-08-05 01:25:53 -04:00 by saavagebueno · 2 comments
Owner

Originally created by @heroixinu on GitHub (Jan 8, 2026).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/5066

Description
My netbird-management service hangs during startup because it is waiting for the GeoLite2 database file (GeoLite2-City_20251217.mmdb) to download. The log indicates the file is missing and a download is initiated, but the process appears to block the entire startup sequence.

If the network is slow, the file server is unresponsive, or if there are other issues (like system time discrepancies), the service fails to start entirely.

Suggestion
To improve service robustness and availability, I suggest implementing asynchronous downloading or lazy loading for the geolocation database.

The service should start up and become available immediately.
The GeoLite2 database should be downloaded in the background.
Geolocation features can be enabled only after the download completes successfully.

Log

netbird-management | 2026-01-08T10:22:31Z INFO management/server/geolocation/database.go:34: Geolocation database file GeoLite2-City_20251217.mmdb not found, file will be downloaded
(Service hangs here)

Originally created by @heroixinu on GitHub (Jan 8, 2026). Original GitHub issue: https://github.com/netbirdio/netbird/issues/5066 Description My netbird-management service hangs during startup because it is waiting for the GeoLite2 database file (GeoLite2-City_20251217.mmdb) to download. The log indicates the file is missing and a download is initiated, but the process appears to block the entire startup sequence. If the network is slow, the file server is unresponsive, or if there are other issues (like system time discrepancies), the service fails to start entirely. Suggestion To improve service robustness and availability, I suggest implementing asynchronous downloading or lazy loading for the geolocation database. The service should start up and become available immediately. The GeoLite2 database should be downloaded in the background. Geolocation features can be enabled only after the download completes successfully. Log netbird-management | 2026-01-08T10:22:31Z INFO management/server/geolocation/database.go:34: Geolocation database file GeoLite2-City_20251217.mmdb not found, file will be downloaded *(Service hangs here)*
saavagebueno added the triage-needed label 2026-08-05 01:25:53 -04:00
Author
Owner

@ElectronicElephant commented on GitHub (Jan 15, 2026):

I met up with the same problem and I believe it would be a good idea to add an option here

<!-- gh-comment-id:3754288401 --> @ElectronicElephant commented on GitHub (Jan 15, 2026): I met up with the same problem and I believe it would be a good idea to add an option here
Author
Owner

@thebiblelover7 commented on GitHub (Feb 24, 2026):

In my case, because of a firewall issue, netbird-management wouldn't even start because it couldn't download the GeoLite2 database. It would crash/exit every time it timed out. The management interface was unavailable.

The only solution was to disable geolocation entirely by setting the NB_DISABLE_GEOLOCATION=true environment variable.

Relevant logs:

netbird-server  | 2026-02-24T13:29:53.126Z FATL management/internals/server/modules.go:45: could not initialize geolocation service: failed to get database filename: Head "https://pkgs.netbird.io/geolocation-dbs/GeoLite2-City/download?suffix=tar.gz": dial tcp 194.113.73.12:443: i/o timeout
netbird-server exited with code 1 (restarting)
netbird-server  | 2026-02-24T13:29:53.377Z INFO combined/cmd/root.go:144: Starting combined NetBird server
<!-- gh-comment-id:3951868295 --> @thebiblelover7 commented on GitHub (Feb 24, 2026): In my case, because of a firewall issue, netbird-management wouldn't even start because it couldn't download the GeoLite2 database. It would crash/exit every time it timed out. The management interface was unavailable. The only solution was to disable geolocation entirely by setting the `NB_DISABLE_GEOLOCATION=true` environment variable. Relevant logs: ``` netbird-server | 2026-02-24T13:29:53.126Z FATL management/internals/server/modules.go:45: could not initialize geolocation service: failed to get database filename: Head "https://pkgs.netbird.io/geolocation-dbs/GeoLite2-City/download?suffix=tar.gz": dial tcp 194.113.73.12:443: i/o timeout netbird-server exited with code 1 (restarting) netbird-server | 2026-02-24T13:29:53.377Z INFO combined/cmd/root.go:144: Starting combined NetBird server ```
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#10429