RE: [squid-users] Squid & CARP

From: Scott Phalen <[email protected]>
Date: Sun, 12 Dec 2004 07:37:57 -0600

>This can't be your running configuration. With this configuration peers
>won't be used at all as you are forcing all requests going direct via
>always_direct. With this configuration access.log MUST say
>DIRECT/xx.xx.xx.xx or cache hits only, never TIMEOUT_* or any peering
>related tags as peers are excplicitly forbidden to be used.
>
>Again, are you really really sure you are looking into the correct
>squid.conf file on your Squid2 and Squid3 proxies? Perhaps you have more
>than one copy..
>
>> On squid2 and squid3 I am seeing the timeout_direct message in the
>> access.log.
>>
>Nothing else?

[Scott Phalen]
Yes, I am seeing all the normal traffic, just the timeout_direct stood out
in the access.log.

>
>You should focus on what Squid2 and Squid3 says when they forward the
>requests to your Squid1.
>>
>>
>> Snipet from access.log on squid1:
>> 1102825620.299 105 199.86.18.23 TCP_MISS/200 298 GET
>> http://wisapidata.weatherbug.com/WxAlertIsapi/WxAlertIsapi.dll? -
>> DIRECT/69.25.38.101 text/plain
>> 1102825620.400 0 carp1.mydomain.com TCP_DENIED/403 1474 GET
>> http://wisapidata.weatherbug.com/WxAlertIsapi/WxAlertIsapi.dll? - NONE/-
>> text/html
>
>How did that request end up at carp1.mydomain.com, and what did it say
>about how it forwarded the reqeust?
>

[Scott Phalen]
Some requests have been forwarded to CARP/carp1 or 2.mydomain.com but not as
expected. Maybe one out of every 1,000 requests.

>
>Regards
>Henrik

[Scott Phalen]
Ok, here are complete copies of squid2 and squid3 config files. I will be
removing the always_direct directive in them as you pointed out, all
requests go straight out bypassing any peers. The config from the 1st squid
box is at the very bottom if you wanted to see that.

Again, thanks Henrik, your help and knowledge is greatly appreciated!

Scott Phalen

##### SQUID2 ####
http_port 3128
icp_port 3130
cache_peer carp2.mydomain.com sibling 3128 3130 proxy-only
cache_peer 127.0.0.1 parent 8080 0 proxy-only
#
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
cache_mem 20 MB
cache_swap_low 90
cache_swap_high 95
maximum_object_size 4096 KB
minimum_object_size 0 KB
maximum_object_size_in_memory 8 KB
ipcache_size 1024
ipcache_low 90
ipcache_high 95
fqdncache_size 1024
#
cache_replacement_policy lru
memory_replacement_policy lru
#
cache_dir diskd /var/squid/cache 13000 16 256
cache_access_log /usr/local/squid/var/logs/access.log
cache_log /usr/local/squid/var/logs/cache.log
cache_store_log none
emulate_httpd_log off
log_ip_on_direct on
debug_options ALL,1
log_fqdn off
client_netmask 255.255.255.255
#
diskd_program /usr/local/squid/libexec/diskd
unlinkd_program /usr/local/squid/libexec/unlinkd
#
request_header_max_size 10 KB
request_body_max_size 0 KB
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
quick_abort_min 16 KB
quick_abort_max 16 KB
quick_abort_pct 95
negative_ttl 30 seconds
range_offset_limit 0 KB
peer_connect_timeout 30 seconds
read_timeout 15 minutes
request_timeout 5 minutes
persistent_request_timeout 1 minute
client_lifetime 1 day
half_closed_clients on
pconn_timeout 120 seconds
shutdown_lifetime 30 seconds
#
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
acl dansubnets src "/usr/local/squid/etc/dansubnets.txt"
#
http_access allow manager localhost
http_access allow manager
http_access allow !Safe_ports
http_access allow CONNECT !SSL_ports
http_access allow to_localhost
http_access allow all
http_reply_access allow all
icp_access allow all
miss_access allow all
#
cache_peer_access 127.0.0.1 allow dansubnets
cache_peer_access 127.0.0.1 deny all
#
cache_mgr ishelp@ci.stpaul.mn.us
visible_hostname Stimpy Squid Web Cache
unique_hostname carp1.mydomain.com
#
dns_testnames netscape.com internic.net nlanr.net microsoft.com
#
logfile_rotate 1
memory_pools on
memory_pools_limit 64 MB
forwarded_for off
store_avg_object_size 13 KB
store_objects_per_bucket 20
#
#always_direct allow all
#never_direct allow all
#prefer_direct on
#
coredump_dir /usr/local/squid/var/cache
client_persistent_connections on
server_persistent_connections on

#### SQUID3 ####
http_port 3128
icp_port 3130
cache_peer carp1.mydomain.com sibling 3128 3130 proxy-only
cache_peer 127.0.0.1 parent 8080 0 proxy-only
#
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
cache_mem 20 MB
cache_swap_low 90
cache_swap_high 95
maximum_object_size 4096 KB
minimum_object_size 0 KB
maximum_object_size_in_memory 8 KB
ipcache_size 1024
ipcache_low 90
ipcache_high 95
fqdncache_size 1024
#
cache_replacement_policy lru
memory_replacement_policy lru
#
cache_dir diskd /var/squid/cache 13000 16 256
cache_access_log /usr/local/squid/var/logs/access.log
cache_log /usr/local/squid/var/logs/cache.log
cache_store_log none
emulate_httpd_log off
log_ip_on_direct on
debug_options ALL,1
log_fqdn off
client_netmask 255.255.255.255
#
diskd_program /usr/local/squid/libexec/diskd
unlinkd_program /usr/local/squid/libexec/unlinkd
#
request_header_max_size 10 KB
request_body_max_size 0 KB
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
quick_abort_min 16 KB
quick_abort_max 16 KB
quick_abort_pct 95
negative_ttl 30 seconds
range_offset_limit 0 KB
peer_connect_timeout 30 seconds
read_timeout 15 minutes
request_timeout 5 minutes
persistent_request_timeout 1 minute
client_lifetime 1 day
half_closed_clients on
pconn_timeout 120 seconds
shutdown_lifetime 30 seconds
#
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
acl dansubnets src "/usr/local/squid/etc/dansubnets.txt"
#
http_access allow manager localhost
http_access allow manager
http_access allow !Safe_ports
http_access allow CONNECT !SSL_ports
http_access allow to_localhost
http_access allow all
http_reply_access allow all
icp_access allow all
miss_access allow all
#
cache_peer_access 127.0.0.1 allow dansubnets
cache_peer_access 127.0.0.1 deny all
#
cache_mgr ishelp@ci.stpaul.mn.us
visible_hostname Astro Squid Web Cache
unique_hostname carp2.mydomain.com
#
dns_testnames netscape.com internic.net nlanr.net microsoft.com
#
logfile_rotate 1
memory_pools on
memory_pools_limit 64 MB
forwarded_for off
store_avg_object_size 13 KB
store_objects_per_bucket 20
#
#always_direct allow all
#never_direct allow all
#prefer_direct on
coredump_dir /usr/local/squid/var/cache
client_persistent_connections on
server_persistent_connections on

#### SQUID1 ####
http_port 3128
cache_peer carp1.mydomain.com parent 3128 0 carp-load-factor=0.4
cache_peer carp2.mydomain.com parent 3128 0 carp-load-factor=0.6
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
#
cache_mem 20 MB
cache_swap_low 90
cache_swap_high 95
maximum_object_size 32 MB
minimum_object_size 0 KB
maximum_object_size_in_memory 16 KB
ipcache_size 1024
ipcache_low 90
ipcache_high 95
fqdncache_size 1024
#
cache_replacement_policy lru
memory_replacement_policy lru
#
cache_dir diskd /var/squid/cache0 13000 16 256
cache_access_log /usr/local/squid/var/logs/access.log
cache_store_log none
emulate_httpd_log off
log_ip_on_direct on
mime_table /usr/local/squid/etc/mime.conf
log_mime_hdrs off
debug_options ALL,1
log_fqdn off
client_netmask 255.255.255.255
diskd_program /usr/local/squid/libexec/diskd
unlinkd_program /usr/local/squid/libexec/unlinkd
request_header_max_size 10 KB
request_body_max_size 0 KB
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
quick_abort_min 0 KB
quick_abort_max 0 KB
quick_abort_pct 95
negative_ttl 30 seconds
range_offset_limit 0 KB
peer_connect_timeout 30 seconds
read_timeout 15 minutes
request_timeout 5 minutes
persistent_request_timeout 1 minute
client_lifetime 1 day
half_closed_clients off
pconn_timeout 120 seconds
shutdown_lifetime 30 seconds
#
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
#
###### No access restrictions #####
acl no_rest src "/usr/local/squid/etc/no_rest.txt"
#
acl safe_list dstdomain "/usr/local/squid/etc/safe_list_url.txt"
#
# Blocked Audio/Video & Instant Messaging
acl a_vdeny urlpath_regex -i "/usr/local/squid/etc/av_deny.txt"
acl media dstdomain .windowsmedia.com
acl msnmsgr req_mime_type -i ^applicaiton/x-msn-messenger$
acl msnmsgr1 dst 207.46.110.0/24
acl msnmsgr2 dstdomain .gateway.messenger.hotmail.com
acl msnmsgr3 dstdomain .messenger.msn.com
acl msnmsgr4 dstdomain chat.msn.com
acl yahoo dstdomain .messenger.yahoo.com
acl yahoo1 dstdomain .msg.yahoo.com
acl yahoo2 dstdomain .pgq.yahoo.com
acl yahoo3 dstdomain .dcn.yahoo.com
acl yahoo4 dstdomain .chat.yahoo.com
acl yahoo5 dstdomain .profiles.yahoo.com
acl yahoo6 dstdomain .companion.yahoo.com
acl aol dstdomain .oscar.aol.com
acl aim dstdomain .aim.com
#
# Blocked Sites
acl blocked_ip dst "/usr/local/squid/etc/blocked_ip.txt"
#
acl blocked_keywords url_regex -i
"/usr/local/squid/etc/blocked_keywords.txt"
#
acl blocked_sites_police dstdomain
"/usr/local/squid/etc/blocked_sites_police.txt"
acl file_type_block urlpath_regex -i
"/usr/local/squid/etc/file_type_block.txt"
acl allow_hosts src "/usr/local/squid/etc/allow_hosts.txt"
acl blocked_sites dstdomain "/usr/local/squid/etc/blocked_sites.txt"
acl blocked_porn dstdomain "/usr/local/squid/etc/blocked_porn.txt"
acl ads_spyw dstdomain "/usr/local/squid/etc/ads_spyw.txt"
#
# Blocked Computers
acl deny_hosts src "/usr/local/squid/etc/deny_hosts.txt"
#
###### Time Settings ######
acl working_hours1 time D 06:00-18:00
acl working_hours2 time D 07:00-18:00
acl after_hours1 time MTWHF 18:01-23:59
acl after_hours2 time MTWHF 00:00-06:59
acl after_hours3 time AS 00:00-23:59
acl after_hours_deny_hosts src
"/usr/local/squid/etc/after_hours_deny_hosts.txt"
#
http_access allow manager localhost
http_access deny manager
http_access allow !Safe_ports
http_access allow CONNECT !SSL_ports
http_access allow manager localhost
#
##### No access restrictions #####
http_access allow no_rest
#
http_access allow safe_list
#
# Blocked Audio/Video & Messengers
http_access deny a_vdeny
http_access deny media
http_access deny msnmsgr
http_access deny msnmsgr1
http_access deny msnmsgr2
http_access deny msnmsgr3
http_access deny msnmsgr4
http_access deny yahoo
http_access deny yahoo1
http_access deny yahoo2
http_access deny yahoo3
http_access deny yahoo4
http_access deny yahoo5
http_access deny yahoo6
http_access deny aol
http_access deny aim
#
#
# Blocked Porn, Ads/SpyWare & Sites
http_access deny blocked_ip
#
http_access deny blocked_keywords
#
http_access deny blocked_sites_police
http_access deny file_type_block
http_access allow allow_hosts
http_access deny blocked_sites
http_access deny blocked_porn
http_access deny ads_spyw
#
# Blocked Computers
http_access deny deny_hosts
#
######### Time HTTP_ACCESS Settings #########
http_access deny after_hours_deny_hosts after_hours1
http_access deny after_hours_deny_hosts after_hours2
http_access deny after_hours_deny_hosts after_hours3
http_access allow working_hours1
http_access allow working_hours2
http_access allow after_hours1
http_access allow after_hours2
http_access allow after_hours3
http_access allow all
http_reply_access allow all
icp_access deny all
#
cache_mgr ishelp@blah.com
#
visible_hostname Ren Squid Web Proxy Cache
unique_hostname first.squid.mydomain.com
#
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_single_host off
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
#
dns_testnames netscape.com internic.net yahoo.com microsoft.com cisco.com
logfile_rotate 1
memory_pools on
memory_pools_limit 64 MB
forwarded_for off
cachemgr_passwd xxxxxxx
store_avg_object_size 13 KB
store_objects_per_bucket 20
#client_db on
#
acl always_direct_urls dstdomain
"/usr/local/squid/etc/always_direct_urls.txt"
acl always_direct_ips src "/usr/local/squid/etc/always_direct_ips.txt"
acl firesql dst 208.210.145.0/24
#
always_direct allow always_direct_urls
always_direct allow always_direct_ips
always_direct allow firesql
always_direct deny all
#
wccp_router x.x.x.x
#
wccp_version 4
coredump_dir /usr/local/squid/var/cache0
client_persistent_connections off
server_persistent_connections off
Received on Sun Dec 12 2004 - 06:40:07 MST

This archive was generated by hypermail pre-2.1.9 : Sat Jan 01 2005 - 12:00:02 MST