Skip to content

Don't log web's Squid warm-up request as a failure - #73

Merged
jochen-testingbot merged 1 commit into
mainfrom
fix/quiet-squid-warmup
Oct 27, 2026
Merged

jochen-testingbot merged 1 commit into
mainfrom
fix/quiet-squid-warmup

Conversation

@jochen-testingbot

Copy link
Copy Markdown
Contributor

Problem

Every tunnel start prints two warnings like this, which a customer reads as a broken tunnel:

WARNING: [43400c71acb7] GET http://127.0.0.1:1/squid-internal-tunnel-warmup -> 502 (4 ms)
    User-Agent: Ruby
    Via: 1.1 tunnel-vm (squid/6.12)
    ...

They come from web: DynamicTunnel.warm_up_tunnel_proxy sends that request through both Squid ports (2009, 2011) to absorb Squid's cold-start 502 before the customer's first request does. Port 1 is always refused, so the 502 is by design. Web's comment says the squid-internal path "keeps the tunnel client from logging a warning for it". That was true of TunnelProxyHandler's own failure line, but HttpLogHandler (added for --log-http, TB-319) logs every failed request in the default errors mode, so the warning came back.

Change

HttpLogHandler leaves out requests whose path starts with /squid-internal, in errors mode only. url and headers asked for every request, so they still log them.

Tests

  • HttpLoggingTest:
    • errors_staysQuietForSquidsWarmupRequest fails without the change;
    • url_stillLogsSquidsWarmupRequest checks that url mode still logs it.
  • mvn verify: 1055 tests, 0 failures.

Web warms up every new tunnel with GET http://127.0.0.1:1/squid-internal-tunnel-warmup
through both Squid ports, to absorb the cold-start 502 before a customer's first request
does. Port 1 is refused, so each answers 502 here, and under the default --log-http errors
that printed two WARNING blocks with headers on every start, which read as a failed tunnel.

HttpLogHandler now leaves /squid-internal requests out in errors mode, as
TunnelProxyHandler already does for its own failure line. url and headers still log them,
since those modes asked for every request.
@jochen-testingbot
jochen-testingbot merged commit 7cf1638 into main Oct 27, 2026
10 checks passed
@jochen-testingbot jochen-testingbot mentioned this pull request Oct 27, 2026
jochen-testingbot added a commit that referenced this pull request Oct 27, 2026
Version 5.1, the changelog for #58-#73, and --ssh-connections in the README.
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.

1 participant