[squid-users] parseHTTPRequest problem with SQUID3

From: Gregori Parker <Gregori.Parker_at_theplatform.com>
Date: Mon, 10 Nov 2008 16:25:13 -0800

I've just rolled back a failed Squid migration from 2.6 to 3.0, and I'm
looking for reasons why it failed. I have been successfully using the
latest Squid 2.6 to http-accel a pool of backend web servers, with a
load-balancer in front to direct traffic.

The load-balancer hits the squid server with a health check, i.e. GET
/mgmt/alive and expects an HTTP 200, before allowing it to have traffic.
When I turned up Squid3, all health checks failed...showing the
following in access.log:

1226355682.853 0 <ip_of_load-balancer> NONE/400 1931 GET
http://cached.whatever.com/ps/management/alive - NONE/- text/html
1226355684.875 0 <ip_of_load-balancer> NONE/400 1931 GET
http://cached.whatever.com/ps/management/alive - NONE/- text/html
1226355687.905 0 <ip_of_load-balancer> NONE/400 1931 GET
http://cached.whatever.com/ps/management/alive - NONE/- text/html

After some troubleshooting and turning debug_options up, it appears that
perhaps it's the request done without a hostname that's the problem,
because I see 'parseHttpRequest: Missing HTTP identifier' in cache.log
with debug_options set to ALL,3.

Squid 2.6 handled these fine, and my configuration hasnt changed, so was
there something introduced in Squid3 that demands a hostname? I know
from packet captures that my load-balancer literally connects to the
squid server on port 80 and does a GET /mgmt/alive (not GET
http://cached.whatever.com/mgmt/alive)

Here are the relevant portions of my config:

    http_port 80 accel defaultsite=cached.whatever.com vhost
    cache_dir null /tmp

    cache_peer 1.1.1.1 parent 80 0 no-query no-digest originserver
name=Cached-Whatever
    cache_peer_domain Cached-Whatever cached.whatever.com

    acl our_site dstdomain cached.whatever.com
    acl Origin-Whatever dst 1.1.1.1
    acl acceleratedPort port 80
    acl HealthChecks urlpath_regex mgmt/alive

    always_direct allow HealthChecks
    cache deny HealthChecks
    cache allow Origin-Whatever
    http_access allow Origin-Whatever acceleratedPort
    http_access deny all
    http_reply_access allow all

    access_log /var/log/squid/access.log squid !HealthChecks
    visible_hostname cached.whatever.com
    unique_hostname squid03

Thanks - Gregori
Received on Tue Nov 11 2008 - 00:25:26 MST

This archive was generated by hypermail 2.2.0 : Wed Nov 12 2008 - 12:00:02 MST