Skip to content

Conversation

@Garandor
Copy link
Contributor

@Garandor Garandor commented Jan 9, 2026

What

Improve error handling and diagnostics for Rocket HTTP server launch failures.

Why

Previously, Rocket launch errors (such as port bind failures) were silently ignored, making it difficult to diagnose server startup issues. This change ensures that launch failures are properly logged and propagated, causing the application to exit with a non-zero status code.

Risks

join_all (wait for all futures to exit) was changed and now exits lit-node when a single rocket fails to launch and with nonzero exit, which could have downstream effects on systemd and other supervisors.

Copy link
Contributor Author

Garandor commented Jan 9, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@Garandor Garandor marked this pull request as ready for review January 9, 2026 10:08
@Garandor Garandor requested review from GTC6244 and glitch003 January 9, 2026 10:08
@Garandor Garandor self-assigned this Jan 9, 2026
@github-actions
Copy link

github-actions bot commented Jan 9, 2026

PASS [ 43.267s] (2/3) lit_node::test toxiproxy::perf_tests::load_with_50ms_latency_single_link
PASS [ 43.275s] (3/3) lit_node::test toxiproxy::perf_tests::load_with_no_latency
PASS [ 94.047s] (1/3) lit_node::test toxiproxy::perf_tests::load_with_50ms_latency_all_links

@Garandor Garandor changed the title log and fail fast on Rocket bind/listen failures (surface target + nonzero exit) log and fail fast on Rocket bind/listen failures (bind target + nonzero exit) Jan 10, 2026
Copy link
Contributor

@glitch003 glitch003 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice improvement to get these logs out on failure. very annoying to diagnost with no logs for that.

…nzero exit)

- Log configured Rocket listener targets (address/port/proto/role) during startup.
- Launch multiple Rocket listeners with FuturesUnordered and fail fast on the first launch() error (avoids join_all hanging if at least one server starts up successfully).
- On bind/listen failure, log a clear error including the resolved bind target details.
- Treat launcher launch() errors as fatal in the Rocket engine (panic) so startup failure becomes explicit and exits non-zero.
- Add explicit error log if launch() is called before ignite() (should not happen).
Copy link
Contributor Author

Garandor commented Jan 13, 2026

Merge activity

  • Jan 13, 5:00 PM UTC: Graphite rebased this pull request as part of a merge.
  • Jan 13, 5:27 PM UTC: @Garandor merged this pull request with Graphite.

@Garandor Garandor merged commit 3635bce into master Jan 13, 2026
31 checks passed
@Garandor Garandor deleted the node-4816 branch January 13, 2026 17:27
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.

3 participants