[squid-users] Squid-internal-mgr/forward help

Alex Rousskov rousskov at measurement-factory.com
Mon Dec 23 14:57:29 UTC 2024


On 2024-12-23 00:27, Eternal Dreamer wrote:

> I need some help with my squid-6.7 installation. I need to see 
> forwarding status codes for my monitoring system, but squidclient -h 
> 3128 mgr:forward is empty. Another stats from mgr:* works fine.

You are suffering from a Squid bug: In many cases, Squid incorrectly 
concludes that there are no mgr:forward stats available. Long time ago, 
the same code happened to work, but we accidentally violated its hidden 
invariant while fixing other problems related to counting forwarding 
attempts (e.g., Bug #4788).

There are also bugs related to how the number of forwarding attempts are 
currently shown in "tryN" columns of mgr:forward output: At least one 
"tryN" column _heading_ is missing, and "try#1" column corresponds to 
the rare case where no forwarding attempts had been made (rather than 
the implied common case where one forwarding attempt has happened).

Finally, due to poor code duplication, some forwarding attempts related 
to tunneling traffic (e.g., when handling CONNECT requests) may not be 
reflected in mgr:forward stats.


> How can I fix it?

Properly fixing mgr:forward report requires non-trivial development. 
Until somebody facilitates that[1], you can try an unofficial workaround 
patch[2] that alleviates _some_ of mgr:forward pains. The patch is 
against current master/v7, but it applies cleanly to Squid v6.7 AFAICT.


[1]: 
https://wiki.squid-cache.org/SquidFaq/AboutSquid#how-to-add-a-new-squid-feature-enhance-of-fix-something

[2]: 
https://github.com/measurement-factory/squid/commit/ec91885e04aeab5597c8792a14854ef653cb5cbf.patch


HTH,

Alex.


More information about the squid-users mailing list