Skip to content

fix(agent): validate HUB_URL host to prevent misleading "lookup api" DNS error#2011

Open
svenvg93 wants to merge 2 commits into
henrygd:mainfrom
svenvg93:1958-api-dns-lookup
Open

fix(agent): validate HUB_URL host to prevent misleading "lookup api" DNS error#2011
svenvg93 wants to merge 2 commits into
henrygd:mainfrom
svenvg93:1958-api-dns-lookup

Conversation

@svenvg93
Copy link
Copy Markdown
Collaborator

📃 Description

When HUB_URL is set to an empty string (e.g. via a systemd drop-in that doesn't take effect), url.Parse("") succeeds silently and the agent constructs the WebSocket address ws://api/beszel/agent-connect, causing a confusing dial tcp: lookup api DNS error with no indication of what went wrong.

Fixes #1958

🪵 Changelog

🔧 Fixed

  • Agent now validates that HUB_URL contains a host after parsing and fails immediately with a clear error message instead of attempting to connect to api as a hostname

@svenvg93 svenvg93 requested a review from henrygd as a code owner May 16, 2026 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Agent: hostname-based HUB_URL surfaces literal "api" in DNS-lookup error, not the configured hostname

1 participant