On Wed, 16 Dec 2009 12:00:08 -0900, Chris Robertson <crobertson_at_gci.net>
wrote:
> david.kauffmann_at_it-partner.de wrote:
>> I have two machines, both running squid3. One runs stable1 and the
other
>> stable19. The one running stable1 is on a virtual machine.
>> When i execute /etc/init.d/squid3 on both machines, this is what i get
on
>>
>> stable1:
>> /etc/init.d/squid3
>> Usage: /etc/init.d/squid3 {start|stop|reload|force-reload|restart}
>>
>
> Init scripts are not supplied with Squid. They are a nicety added by
> the distribution. /path/to/squid -k shutdown is the supported/expected
> method of stopping Squid. That said...
>
>> stable19:
>> /etc/init.d/squid3
>> Usage: /etc/init.d/squid3 { start | stop }
>>
>> Sometimes when i start the stable19 system, squid doesn't start giving
>> me an error, that there's already a running squid process. i suspect
this
>> has something to do with squid not shutting down properly.
>>
>> When i stop squid using /etc/init.d/squid3 stop on both machines, i get
>> no response at all on the stable19 platform.
>> But on the stable1 machine i get this when i stop squid:
>>
>> /etc/init.d/squid3 stop
>> * Stopping Squid HTTP Proxy 3.0 squid3
>> * Waiting...
>> * ...
>> * ...
>> * ...
>> * ...
>> * ...
>> * ...
>> [ OK ]
>>
[
>>
OK
>>
]
>>
>
> Either the init scripts on the two servers are different, or the compile
> options put an executable or a PID file in a location not expected by
> the init script.
>
>> I compiled the squid stable19 version myself. here are the compiler
>> options:
>> Version 3.0.STABLE19
>> configure options: '--build=i486-linux-gnu' '--prefix=/usr'
>> '--includedir=${prefix}/include' '--mandir=${prefix}/share/man'
>> '--infodir=${prefix}/share/info' '--sysconfdir=/etc'
>> '--localstatedir=/var' '--libexecdir=${prefix}/lib/squid3'
>> '--disable-maintainer-mode' '--disable-dependency-tracking'
'--srcdir=.'
>> '--datadir=/usr/share/squid3' '--sysconfdir=/etc/squid3'
>> '--mandir=/usr/share/man' '--with-cppunit-basedir=/usr'
'--enable-inline'
>> '--enable-async-io=8' '--enable-storeio=ufs,aufs,diskd'
>> '--enable-removal-policies=lru,heap' '--enable-poll'
>> '--enable-delay-pools' '--enable-cache-digests' '--enable-snmp'
>> '--enable-htcp' '--enable-select' '--enable-carp'
'--enable-large-files'
>> '--enable-underscores' '--enable-icap-client'
>> '--enable-auth=basic,digest,ntlm' '--enable-basic-auth-helpers=all'
>> '--enable-ntlm-auth-helpers=SMB'
>> '--enable-digest-auth-helpers=ldap,password'
>>
'--enable-external-acl-helpers=ip_user,ldap_group,session,unix_group,wbinfo_group'
>> '--with-filedescriptors=65536' '--with-default-user=proxy'
>> '--enable-epoll' '--enable-linux-netfilter'
'build_alias=i486-linux-gnu'
>> 'CC=cc' 'CFLAGS=-g -O2 -g -Wall -O2' 'LDFLAGS=-Wl,-Bsymbolic-functions'
>> 'CPPFLAGS=' 'CXX=g++' 'CXXFLAGS=-g -O2 -g -Wall -O2' 'FFLAGS=-g -O2'
>> '--enable-http-violations'
>> The VM compiler options look like this:
>> Version 3.0.STABLE1
>> configure options: '--build=i486-linux-gnu' '--prefix=/usr'
>> '--includedir=${prefix}/include' '--mandir=${prefix}/share/man'
>> '--infodir=${prefix}/share/info' '--sysconfdir=/etc'
>> '--localstatedir=/var' '--libexecdir=${prefix}/lib/squid3'
>> '--disable-maintainer-mode' '--disable-dependency-tracking'
'--srcdir=.'
>> '--datadir=/usr/share/squid3' '--sysconfdir=/etc/squid3'
>> '--mandir=/usr/share/man' '--with-cppunit-basedir=/usr'
'--enable-inline'
>> '--enable-async-io=8' '--enable-storeio=ufs,aufs,coss,diskd'
>> '--enable-removal-policies=lru,heap' '--enable-poll'
>> '--enable-delay-pools' '--enable-cache-digests' '--enable-snmp'
>> '--enable-htcp' '--enable-select' '--enable-carp'
'--enable-large-files'
>> '--enable-underscores' '--enable-icap-client'
>> '--enable-auth=basic,digest,ntlm'
>>
'--enable-basic-auth-helpers=LDAP,MSNT,NCSA,PAM,SASL,SMB,YP,getpwnam,multi-domain-NTLM'
>> '--enable-ntlm-auth-helpers=SMB'
>> '--enable-digest-auth-helpers=ldap,password'
>>
'--enable-external-acl-helpers=ip_user,ldap_group,session,unix_group,wbinfo_group'
>> '--with-filedescriptors=65536' '--with-default-user=proxy'
>> '--enable-epoll' '--enable-linux-netfilter'
'build_alias=i486-linux-gnu'
>> 'CC=cc' 'CFLAGS=-g -O2 -g -Wall -O2' 'LDFLAGS=-Wl,-Bsymbolic-functions'
>> 'CPPFLAGS=' 'CXX=g++' 'CXXFLAGS=-g -O2 -g -Wall -O2' 'FFLAGS=-g -O2'
>>
>> Do i have to reconfigure and rebuild my squid to get the same behaviour
>> on both machines?
>
> Probably not. Check the init script for mention of a PID file. Then
> have a look at http://www.squid-cache.org/Doc/config/pid_filename/.
>
> My assumption (based on the way my init scripts work) is that the script
> sends a shutdown signal to Squid and then periodically (once a second or
> so) checks for the presence of the PID file, writing out a period if it
> still exists. When Squid quits, it should remove the PID file. Once
> the PID file disappears the shutdown is successful. If the PID file is
> not where the init script expects, when the script is called to shut
> down Squid, it appears to not be running, so the script just exits.
>
Yes. I've been trying to track that down for a while.
I think the problem is a side effect of the auto-recovery code working
properly. If the child fails with any errors the master process identifies
the shutdown as a run-time failure and spawns a new child process.
Any bugs in the shutdown process can trigger this when a close is actually
wanted.
Amos
Received on Wed Dec 16 2009 - 21:11:24 MST
This archive was generated by hypermail 2.2.0 : Thu Dec 17 2009 - 12:00:02 MST