Hello everybody, I have a problem with squid server, in the morning at the same time, every machine on our local network can’t have access to Internet and I have therefore to manually restart the computer on which squid is installed to make Internet accessible again. I have found following in /var/log/daemon.log at the time when the connection is interrupted: Feb 18 06:25:58 localhost squid[3501]: storeDirWriteCleanLogs: Starting... Feb 18 06:25:58 localhost squid[3501]: Finished. Wrote 8952 entries. Feb 18 06:25:58 localhost squid[3501]: Took 0.1 seconds (171787.1 entries/sec). Feb 18 06:25:58 localhost squid[3501]: logfileRotate: /var/log/squid/store.log Feb 18 06:25:58 localhost squid[3501]: logfileRotate: /var/log/squid/access.log Feb 18 06:25:58 localhost squid[3501]: helperOpenServers: Starting 5 'ldap_auth' processes Excepting this trouble, squid seems running fine. Is there something in squid.conf I should be changing to avoid this problem? Thank you for giving me any suggestions. Bye!
That is just a log of squid starting, you need to go through the logs to see exactly why squid dies, it is usually something to do with the OS not squid itself but in your case it does not seem like its disks being full.
Thanks for your suggestion, but I have already looked at the contents of the store.log and access.log in /var/log/squid/ but I've found noline telling why squid die. I have found following in /var/log/squid/cache.log at the time when the connection is interrupted too: 2008/02/18 06:25:57| storeDirWriteCleanLogs: Starting... 2008/02/18 06:25:58| Finished. Wrote 8952 entries. 2008/02/18 06:25:58| Took 0.1 seconds (171787.1 entries/sec). 2008/02/18 06:25:58| logfileRotate: /var/log/squid/store.log 2008/02/18 06:25:58| logfileRotate: /var/log/squid/access.log 2008/02/18 06:25:58| helperOpenServers: Starting 5 'ldap_auth' processes In the other hand, I've looked at the processes and I found this: dansgua 18261 0.0 3.8 21556 19724 ? Ss 06:25 0:00 /usr/sbin/dansguardian dansgua 18262 0.0 3.8 21560 19724 ? S 06:25 0:00 /usr/sbin/dansguardian dansgua 18263 0.0 3.8 22536 19728 ? S 06:25 0:00 /usr/sbin/dansguardian dansgua 18264 0.0 3.8 21568 19860 ? S 06:25 0:00 /usr/sbin/dansguardian dansgua 18265 0.0 3.8 21556 19724 ? S 06:25 0:00 /usr/sbin/dansguardian dansgua 18266 0.0 3.8 21556 19724 ? S 06:25 0:00 /usr/sbin/dansguardian dansgua 18267 0.0 3.8 21556 19724 ? S 06:25 0:00 /usr/sbin/dansguardian dansgua 18268 0.0 3.8 21556 19724 ? S 06:25 0:00 /usr/sbin/dansguardian dansgua 18269 0.0 3.8 21556 19724 ? S 06:25 0:00 /usr/sbin/dansguardian dansgua 18270 0.0 3.8 21556 19724 ? S 06:25 0:00 /usr/sbin/dansguardian dansgua 18271 0.0 3.8 21556 19724 ? S 06:25 0:00 /usr/sbin/dansguardian Is it in relation with? Thank you for helping me.
If you are running on a redhat like system check /var/log/messages if a debian like one then /var/log/syslog, Yes the dansguardian processes are used by squid but are not capable of killing squid, unless of course they are taking up all the system memory. Next time the squid fails dont reboot the box check the conditions on the box at the time try restarting squid itself and see if it can start if there is a system problem it will not start but it will issue out an error message. Rebooting the whole box seems to clear the system problem which means you dont get to the bottom of the issue.
Thank you for your suggestion but I've already done that using: # crontab -e 30 6 * * * /etc/init.d/squid restart This command makes squid restarting itself at 6h30 after the interruption at 6h25, but Internet is still inaccessible. And this morning I have found this following in the /var/log/syslog (debian) just after the interruption as first line: Feb 23 06:26:18 localhost syslogd 1.4.1#17 : restart
Here is my squid.conf's content: http_port 3128 hierarchy_stoplist cgi-bin ? acl QUERY urlpath_regex cgi-bin \? no_cache deny QUERY cache_mem 8 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 fqdncache_size 1024 emulate_httpd_log off hosts_file /etc/hosts auth_param basic program /usr/lib/squid/ldap_auth -h 127.0.0.1 -D "cn=admin,dc=univ-antsiranana,dc=mg" -w admin07die -b "dc=univ-antsiranana,dc=mg" -f (&(objectclass=posixAccount)(uid=%s)) auth_param basic children 5 auth_param basic realm Entrer votre identifiant et mot de passe auth_param basic credentialsttl 2 hours auth_param basic casesensitive off refresh_pattern ^ftp: 1440 20% 10080 refresh_pattern ^gopher: 1440 0% 1440 refresh_pattern . 0 20% 4320 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 clients src 192.168.82.0/255.255.255.0 acl AUTH proxy_auth REQUIRED acl url_mp3 urlpath_regex -i \.mp3$ acl url_avi urlpath_regex -i \.avi$ acl url_mpeg urlpath_regex -i \.mpeg$ acl SSL_ports port 443 563 # https, snews acl SSL_ports port 873 # rsync 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 Safe_ports port 631 # cups acl Safe_ports port 873 # rsync acl Safe_ports port 901 # SWAT acl purge method PURGE acl CONNECT method CONNECT http_access allow manager localhost http_access deny manager http_access allow purge localhost http_access deny purge http_access deny !Safe_ports http_access deny CONNECT !SSL_ports http_access allow localhost http_access allow clients AUTH http_access deny url_mp3 http_access deny url_avi http_access deny url_mpeg http_access deny all http_reply_access allow all icp_access allow all httpd_accel_host virtual httpd_accel_port 80 httpd_accel_single_host off httpd_accel_with_proxy on httpd_accel_uses_host_header on client_db on coredump_dir /var/spool/squid