[PR #5871] [self-hosted] fix(getting-started): Infinite healthcheck loop with existing traefik #24200

Open
opened 2026-08-05 06:08:23 -04:00 by saavagebueno · 0 comments
Owner

Original Pull Request: https://github.com/netbirdio/netbird/pull/5871

State: closed
Merged: Yes


Describe your changes

Fixed an infinite wait loop when using an existing Traefik instance (option [1]). wait_management_direct was called for this case, which checks http://127.0.0.1:8081 , a port never exposed on the host by render_docker_compose_traefik. This caused the script to loop indefinitely despite netbird-server being fully healthy.

Replaced wait_management_direct with wait_management_proxy for type 1, and extended wait_management_proxy to support auto-detection of the external Traefik container ID (by image name and exposed ports 80/443) when called with detect-traefik.

#5869
Issue

Stack

Installed with this script on a VPS with an existing Traefik instance

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)

By submitting this pull request, you confirm that you have read and agree to the terms of the Contributor License Agreement.

Documentation

Select exactly one:

  • I added/updated documentation for this change
  • Documentation is not needed for this change (explain why)

Fixes the installation script only, no public API or feature changes.

Docs PR URL (required if "docs added" is checked)

Paste the PR link from https://github.com/netbirdio/docs here:
https://github.com/netbirdio/docs/pull/__

Summary by CodeRabbit

  • New Features

    • Automatic detection of Traefik during setup to simplify reverse-proxy configuration.
  • Bug Fixes

    • Timeout logging now only includes proxy logs when a proxy is detected, reducing noise.
    • External Traefik startup flow updated to use automatic detection for more reliable readiness checks and clearer troubleshooting.
**Original Pull Request:** https://github.com/netbirdio/netbird/pull/5871 **State:** closed **Merged:** Yes --- ## Describe your changes Fixed an infinite wait loop when using an existing Traefik instance (option `[1]`). `wait_management_direct` was called for this case, which checks `http://127.0.0.1:8081` , a port never exposed on the host by `render_docker_compose_traefik`. This caused the script to loop indefinitely despite `netbird-server` being fully healthy. Replaced `wait_management_direct` with `wait_management_proxy` for type 1, and extended `wait_management_proxy` to support auto-detection of the external Traefik container ID (by image name and exposed ports 80/443) when called with `detect-traefik`. ## Issue ticket number and link #5869 [Issue](https://github.com/netbirdio/netbird/issues/5869) ## Stack Installed with this script on a VPS with an existing Traefik instance ### Checklist - [x] Is it a bug fix - [ ] Is a typo/documentation fix - [ ] Is a feature enhancement - [x] It is a refactor - [ ] Created tests that fail without the change (if possible) > By submitting this pull request, you confirm that you have read and agree to the terms of the [Contributor License Agreement](https://github.com/netbirdio/netbird/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT.md). ## Documentation Select exactly one: - [ ] I added/updated documentation for this change - [x] Documentation is **not needed** for this change (explain why) Fixes the installation script only, no public API or feature changes. ### Docs PR URL (required if "docs added" is checked) Paste the PR link from https://github.com/netbirdio/docs here: https://github.com/netbirdio/docs/pull/__ <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Automatic detection of Traefik during setup to simplify reverse-proxy configuration. * **Bug Fixes** * Timeout logging now only includes proxy logs when a proxy is detected, reducing noise. * External Traefik startup flow updated to use automatic detection for more reliable readiness checks and clearer troubleshooting. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
saavagebueno added the pull-request label 2026-08-05 06:08:23 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#24200