[squid-users] squid stops replying

Vieri rentorbuy at yahoo.com
Sun Aug 27 14:43:12 UTC 2017


________________________________
From: Amos Jeffries <squid3 at treenet.co.nz>

> 

> cache_log is one of the Squid directives which require a unique file path+name per instance when running multiple instances.


I defined a unique name for this directive for each squid service (squid.conf used by the failing caching proxy: not defined -> default value):

# grep cache_log squid.*.conf
squid.http.conf:cache_log /var/log/squid/cache.http.log
squid.https.conf:cache_log /var/log/squid/cache.https.log
squid.owa.conf:cache_log /var/log/squid/cache.owa.log
squid.owa2.conf:cache_log /var/log/squid/cache.owa2.log

# grep pid_filename squid.*.conf
squid.http.conf:pid_filename /run/squid.http.pid
squid.https.conf:pid_filename /run/squid.https.pid
squid.owa.conf:pid_filename /run/squid.owa.pid
squid.owa2.conf:pid_filename /run/squid.owa2.pid

# grep access_log squid.*.conf
squid.http.conf:access_log none
squid.https.conf:access_log none
squid.owa.conf:access_log none
squid.owa2.conf:access_log none

I also just added unique_hostname for all reverse proxies, but did not define it for the "failing" proxy cache:
unique_hostname rev_https
unique_hostname rev_http
unique_hostname rev_owa
unique_hostname rev_owa2

The man page states:

-n name    Specify Windows Service name to use for service operations,
default is: Squid

I didn't know it could be used in Linux.
So I set it up as you suggested (thanks for pointing me to the Multiple Instances wiki page).

I modified my init scripts with the -n option. I also checked the squid logs to confirm that the service names were properly set.
eg. for one of the reverse proxies: kid1| Service Name: squidhttp

So, after applying everything:

# ps aux | grep squid
root     19635  0.0  0.0  84856  5116 ?        Ss   14:41   0:00 /usr/sbin/squid -YC -f /etc/squid/squid.http.conf -n squidhttp
squid    19639  0.0  0.0  93452 19184 ?        S    14:41   0:00 (squid-1) -YC -f /etc/squid/squid.http.conf -n squidhttp
squid    19641  0.0  0.0  19852  1812 ?        S    14:41   0:00 (pinger)
root     20019  0.0  0.0  86912  5168 ?        Ss   14:42   0:00 /usr/sbin/squid -YC -f /etc/squid/squid.https.conf -n squidhttps
squid    20022  0.0  0.0  95372 19588 ?        S    14:42   0:00 (squid-1) -YC -f /etc/squid/squid.https.conf -n squidhttps
squid    20024  0.0  0.0  19852  1716 ?        S    14:42   0:00 (pinger)
root     20615  0.0  0.0  86908  5164 ?        Ss   14:44   0:00 /usr/sbin/squid -YC -f /etc/squid/squid.owa.conf -n squidowa
squid    20617  0.1  0.0  98076 23000 ?        S    14:44   0:06 (squid-1) -YC -f /etc/squid/squid.owa.conf -n squidowa
squid    20620  0.0  0.0  19852  1720 ?        S    14:44   0:00 (pinger)
root     20978  0.0  0.0  86908  5180 ?        Ss   14:45   0:00 /usr/sbin/squid -YC -f /etc/squid/squid.owa2.conf -n squidowa2
squid    20981  0.0  0.0  98420 22852 ?        S    14:45   0:01 (squid-1) -YC -f /etc/squid/squid.owa2.conf -n squidowa2
squid    20983  0.0  0.0  19852  1812 ?        S    14:45   0:00 (pinger)
root     22620  0.0  0.0  87440  5160 ?        Ss   Aug25   0:00 /usr/sbin/squid -YC -f /etc/squid/squid.conf -n squid
squid    28916  0.0  0.0   4156   644 ?        S    16:25   0:00 (logfile-daemon) /var/log/squid/access.log
squid    28917  1.5  0.0  41788  7996 ?        S    16:25   0:01 (ssl_crtd) -s /var/lib/squid/ssl_db -M 16MB
squid    28918  0.1  0.0  41772  7596 ?        S    16:25   0:00 (ssl_crtd) -s /var/lib/squid/ssl_db -M 16MB
squid    28919  0.0  0.0  41772  7604 ?        S    16:25   0:00 (ssl_crtd) -s /var/lib/squid/ssl_db -M 16MB
squid    28920  0.0  0.0  40444  5176 ?        S    16:25   0:00 (ssl_crtd) -s /var/lib/squid/ssl_db -M 16MB
squid    28921  0.0  0.0  40444  5364 ?        S    16:25   0:00 (ssl_crtd) -s /var/lib/squid/ssl_db -M 16MB
squid    28922  0.0  0.0  27204  9156 ?        S    16:25   0:00 /usr/bin/perl -w /usr/libexec/squid/ext_wbinfo_group_acl -K
squid    28923  0.0  0.0  27140  8912 ?        S    16:25   0:00 /usr/bin/perl -w /usr/libexec/squid/ext_wbinfo_group_acl -K
squid    28924  0.0  0.0  27140  8872 ?        S    16:25   0:00 /usr/bin/perl -w /usr/libexec/squid/ext_wbinfo_group_acl -K
squid    28925  0.0  0.0  27140  8912 ?        S    16:25   0:00 /usr/bin/perl -w /usr/libexec/squid/ext_wbinfo_group_acl -K
squid    28926  0.0  0.0  27140  8872 ?        S    16:25   0:00 /usr/bin/perl -w /usr/libexec/squid/ext_wbinfo_group_acl -K
squid    28927  0.4  0.0  68916 15468 ?        S    16:25   0:00 /usr/bin/perl -w -s /opt/custom/scripts/run/scripts/firewall/squid_url_lookup.pl -tbl_name=shallalist_bl adv,aggressive,alcohol,anonvpn,automobile_bikes,automobile_boats,automobile_cars,automobile_planes,chat,costtraps,dating,drugs,dynamic,finance_insurance,finance_moneylending,finance_other,finance_realestate,finance_trading,fortunetelling,forum,gamble,hacking,hobby_cooking,hobby_games-misc,hobby_games-online,hobby_gardening,hobby_pets,homestyle,imagehosting,isp,jobsearch,military,models,movies,music,podcasts,politics,porn,radiotv,recreation_humor,recreation_martialarts,recreation_restaurants,recreation_sports,recreation_travel,recreation_wellness,redirector,religion,remotecontrol,ringtones,science_astronomy,science_chemistry,sex_education,sex_lingerie,shopping,socialnet,spyware,tracker,updatesites,urlshortener,violence,warez,weapons,webphone,webradio,webtv
squid    28928  0.1  0.0  68792 15384 ?        S    16:25   0:00 /usr/bin/perl -w -s /opt/custom/scripts/run/scripts/firewall/squid_url_lookup.pl -tbl_name=shallalist_bl adv,aggressive,alcohol,anonvpn,automobile_bikes,automobile_boats,automobile_cars,automobile_planes,chat,costtraps,dating,drugs,dynamic,finance_insurance,finance_moneylending,finance_other,finance_realestate,finance_trading,fortunetelling,forum,gamble,hacking,hobby_cooking,hobby_games-misc,hobby_games-online,hobby_gardening,hobby_pets,homestyle,imagehosting,isp,jobsearch,military,models,movies,music,podcasts,politics,porn,radiotv,recreation_humor,recreation_martialarts,recreation_restaurants,recreation_sports,recreation_travel,recreation_wellness,redirector,religion,remotecontrol,ringtones,science_astronomy,science_chemistry,sex_education,sex_lingerie,shopping,socialnet,spyware,tracker,updatesites,urlshortener,violence,warez,weapons,webphone,webradio,webtv
squid    28929  0.0  0.0  68792 15292 ?        S    16:25   0:00 /usr/bin/perl -w -s /opt/custom/scripts/run/scripts/firewall/squid_url_lookup.pl -tbl_name=shallalist_bl adv,aggressive,alcohol,anonvpn,automobile_bikes,automobile_boats,automobile_cars,automobile_planes,chat,costtraps,dating,drugs,dynamic,finance_insurance,finance_moneylending,finance_other,finance_realestate,finance_trading,fortunetelling,forum,gamble,hacking,hobby_cooking,hobby_games-misc,hobby_games-online,hobby_gardening,hobby_pets,homestyle,imagehosting,isp,jobsearch,military,models,movies,music,podcasts,politics,porn,radiotv,recreation_humor,recreation_martialarts,recreation_restaurants,recreation_sports,recreation_travel,recreation_wellness,redirector,religion,remotecontrol,ringtones,science_astronomy,science_chemistry,sex_education,sex_lingerie,shopping,socialnet,spyware,tracker,updatesites,urlshortener,violence,warez,weapons,webphone,webradio,webtv
squid    28930  0.0  0.0  68792 15400 ?        S    16:25   0:00 /usr/bin/perl -w -s /opt/custom/scripts/run/scripts/firewall/squid_url_lookup.pl -tbl_name=shallalist_bl adv,aggressive,alcohol,anonvpn,automobile_bikes,automobile_boats,automobile_cars,automobile_planes,chat,costtraps,dating,drugs,dynamic,finance_insurance,finance_moneylending,finance_other,finance_realestate,finance_trading,fortunetelling,forum,gamble,hacking,hobby_cooking,hobby_games-misc,hobby_games-online,hobby_gardening,hobby_pets,homestyle,imagehosting,isp,jobsearch,military,models,movies,music,podcasts,politics,porn,radiotv,recreation_humor,recreation_martialarts,recreation_restaurants,recreation_sports,recreation_travel,recreation_wellness,redirector,religion,remotecontrol,ringtones,science_astronomy,science_chemistry,sex_education,sex_lingerie,shopping,socialnet,spyware,tracker,updatesites,urlshortener,violence,warez,weapons,webphone,webradio,webtv
squid    28931  0.0  0.0  68792 15284 ?        S    16:25   0:00 /usr/bin/perl -w -s /opt/custom/scripts/run/scripts/firewall/squid_url_lookup.pl -tbl_name=shallalist_bl adv,aggressive,alcohol,anonvpn,automobile_bikes,automobile_boats,automobile_cars,automobile_planes,chat,costtraps,dating,drugs,dynamic,finance_insurance,finance_moneylending,finance_other,finance_realestate,finance_trading,fortunetelling,forum,gamble,hacking,hobby_cooking,hobby_games-misc,hobby_games-online,hobby_gardening,hobby_pets,homestyle,imagehosting,isp,jobsearch,military,models,movies,music,podcasts,politics,porn,radiotv,recreation_humor,recreation_martialarts,recreation_restaurants,recreation_sports,recreation_travel,recreation_wellness,redirector,religion,remotecontrol,ringtones,science_astronomy,science_chemistry,sex_education,sex_lingerie,shopping,socialnet,spyware,tracker,updatesites,urlshortener,violence,warez,weapons,webphone,webradio,webtv
squid    28932  0.0  0.0  19852  1716 ?        S    16:25   0:00 (pinger)
squid    28939  0.0  0.0  68792 15396 ?        S    16:25   0:00 /usr/bin/perl -w -s /opt/custom/scripts/run/scripts/firewall/squid_url_lookup.pl -tbl_name=shallalist_bl adv,aggressive,alcohol,anonvpn,automobile_bikes,automobile_boats,automobile_cars,automobile_planes,chat,costtraps,dating,drugs,dynamic,finance_insurance,finance_moneylending,finance_other,finance_realestate,finance_trading,fortunetelling,forum,gamble,hacking,hobby_cooking,hobby_games-misc,hobby_games-online,hobby_gardening,hobby_pets,homestyle,imagehosting,isp,jobsearch,military,models,movies,music,podcasts,politics,porn,radiotv,recreation_humor,recreation_martialarts,recreation_restaurants,recreation_sports,recreation_travel,recreation_wellness,redirector,religion,remotecontrol,ringtones,science_astronomy,science_chemistry,sex_education,sex_lingerie,shopping,socialnet,spyware,tracker,updatesites,urlshortener,violence,warez,weapons,webphone,webradio,webtv
squid    28942  0.0  0.0  68792 15400 ?        S    16:25   0:00 /usr/bin/perl -w -s /opt/custom/scripts/run/scripts/firewall/squid_url_lookup.pl -tbl_name=shallalist_bl adv,aggressive,alcohol,anonvpn,automobile_bikes,automobile_boats,automobile_cars,automobile_planes,chat,costtraps,dating,drugs,dynamic,finance_insurance,finance_moneylending,finance_other,finance_realestate,finance_trading,fortunetelling,forum,gamble,hacking,hobby_cooking,hobby_games-misc,hobby_games-online,hobby_gardening,hobby_pets,homestyle,imagehosting,isp,jobsearch,military,models,movies,music,podcasts,politics,porn,radiotv,recreation_humor,recreation_martialarts,recreation_restaurants,recreation_sports,recreation_travel,recreation_wellness,redirector,religion,remotecontrol,ringtones,science_astronomy,science_chemistry,sex_education,sex_lingerie,shopping,socialnet,spyware,tracker,updatesites,urlshortener,violence,warez,weapons,webphone,webradio,webtv
squid    29505  1.2  0.7 326680 251396 ?       S    10:50   4:10 (squid-1) -YC -f /etc/squid/squid.conf -n squid
squid    29522  0.0  0.0   4008   632 ?        S    10:50   0:00 (unlinkd)
squid    29523  0.0  0.0  13904  3292 ?        S    10:50   0:02 diskd 30213124 30213125 30213126

If the issue comes back up again I will run the following:

squid -n squid -d 9
strace -o squid.strace /usr/sbin/squid -YC -f /etc/squid/squid.conf -n squid

...followed by
squid -n squid -k shutdown
several times until I desperately kill -s 9.

I'm not using CentOS.
I'm using Gentoo with kernel 4.9.34.


Well, I'm going to sit and wait now... Thanks.


Vieri


More information about the squid-users mailing list