Demo install detects port-8080 conflicts and tells you what's going on. install.sh --demo previously hardcoded the synthetic feeder to port 8080 and wrote that into config.yaml without checking whether 8080 was actually free. On a developer laptop where 8080 is one of the most-commonly-claimed ports (FastAPI defaults, dev servers, proxies, traceroute tools), the conflict could go undetected and produce a misleading symptom: the feeder service would crash-loop, the other service on 8080 would happily answer the collector's poll with HTML or non-ADS-B JSON, and the dashboard would show "Collector Stalled" with "ADS-B Receiver Reachable (2ms)" — accurate in isolation, confusing as a pair. v3.4.40 fixes that by resolving the feeder port before writing either file. A --feeder-port <n> flag is the explicit override; otherwise the script walks an 8080 → 8088 → 28080 fallback chain and picks the first port that isn't already listening. If a chosen alternative isn't the primary 8080, the script tells you (⚠ Port 8080 is in use; using port 8088 for the synthetic feeder). If all three are taken, the script fails with a clear message listing what's holding each port plus an explicit re-run example: ./install.sh --demo --feeder-port 38080.
-
Upgrade-style re-runs preserve your existing port choice. If the feeder unit file already exists (you're re-running
install.sh --demoon top of an already-installed system, possibly because of an update flow that touches the install scripts), the script reads--portout of the existing unit and reuses it rather than reverting to the default chain. So if you customized to--feeder-port 38080once, you keep it across releases without re-passing the flag. -
The collector now distinguishes "URL is reachable but isn't ADS-B" from "URL is unreachable." The previous behavior fell through the generic exception handler with the error message
Expecting value: line 1 column 1 (char 0)— accurate (the response wasn't valid JSON) but unhelpful (it said nothing about WHY the response wasn't valid JSON, which is almost always "you're pointing at the wrong service"). v3.4.40 adds a content-type check + JSON shape check betweenresp.raise_for_status()anddata = resp.json(). If the response istext/html, starts with<, or is JSON missing theaircraftkey, the collector logs a specific error:Receiver URL returned text/html content — this URL is reachable but isn't an ADS-B feed. Check that the configured port matches the feed source (on demo installs, see 'systemctl status aerodrome-synthetic-feeder').That message names the actual problem and points at the diagnostic command that confirms it. -
The offline-notification trigger learns the new failure mode too. After the existing
consecutive_failed_pollsthreshold (default 5), the notifier fires with title "Receiver returning non-ADS-B data" rather than "Receiver offline" — same threshold, different message body so a user with phone notifications can tell at a glance whether their network is down or their config is pointing at the wrong service.
Behind the scenes
- The port-resolution block in
install.shlives BEFORE the config.yaml-write branch and the systemd-unit-write block. Both write sites consume the resolvedFEEDER_PORTenv var; the resolution happens once, in one place. The earlier nested structure (resolver inside the fresh-config-write branch) would have silently reverted custom ports on upgrade installs whereconfig.yamlalready existed — caught during this release's build and lifted out. - The collector's new
_NonAdsbResponseexception is module-level so the offline-threshold counter flows through the same path asConnectionError(network down) and genericException(unexpected error). All three increment_consecutive_failed_pollsand gate the notification on the same threshold; only the message and log text differ. - The dashboard UI is unchanged in this release. The "Stalled" badge on the Collector card and the "Reachable" badge on the ADS-B Receiver card still display the same way as v3.4.39 — what improved is what the journal log says when both are in the misleading combination, and what the install-time error path does to prevent the combination from arising in the first place. A future release could surface "URL is reachable but isn't ADS-B" as a distinct Status-card state; the log + notification improvement is the substantive win for this one.
Operational notes
- Existing demo installs on port 8080 with a healthy feeder are unaffected — the upgrade-path branch reads
--port 8080out of the existing unit file and reuses it. - Existing demo installs where the feeder is wedged on port 8080 because of a conflict (the laptop-install case that prompted this release) need recovery via the manual sed + restart sequence in the release HANDOFF before v3.4.40 helps with anything. v3.4.40 prevents the situation from recurring on the NEXT install, but doesn't auto-detect-and-fix an already-broken install.