Re: [squid-users] squid needs restarting after internet connect

From: Nik <squid@dont-contact.us>
Date: Wed, 06 Apr 2005 18:33:23 +1000

Marc, thank you for your reply

Elsen Marc wrote:
>
>
>>I have found on a number of installations that squid fails/ceases to
>>work if the machine connects to the internet *after* boot time (and
>>therefore, after squid has been started).
>>
>>...
>
>
> You could use :
>
> # squid -D

I am apparently already running squid with this option. The script in
/etc/init.d sets the -D option, without my even knowing.

> to disable the initial DNS tests when squid starts.
> This may overcome this issue. However for further errors
> and or problems, when this is tried : check cache.log

Thank you for the tip. The cache.log certinaly has more information than
I remember - has this changed from rev 1 to rev 2?

I will debug the server separately.

On the laptop, there are no errors being reported in the cache.log.

Cache.log does show squid adding nameservers from resolv.conf:

2005/04/05 21:15:30| Starting Squid Cache version 2.5.STABLE1 for
i386-redhat-linux-gnu...
2005/04/05 21:15:30| Process ID 4193
2005/04/05 21:15:30| With 1024 file descriptors available
2005/04/05 21:15:30| DNS Socket created at 0.0.0.0, port 32769, FD 5
2005/04/05 21:15:30| Adding nameserver 192.168.0.10 from /etc/resolv.conf

and when I restart squid after starting the ADSL:

2005/04/05 21:18:24| Squid Cache (Version 2.5.STABLE1): Exiting normally.
2005/04/05 21:18:25| Starting Squid Cache version 2.5.STABLE1 for
i386-redhat-linux-gnu...
2005/04/05 21:18:25| Process ID 4926
2005/04/05 21:18:25| With 1024 file descriptors available
2005/04/05 21:18:25| DNS Socket created at 0.0.0.0, port 32770, FD 5
2005/04/05 21:18:25| Adding nameserver 202.1.117.1 from /etc/resolv.conf
2005/04/05 21:18:25| Adding nameserver 203.31.238.1 from /etc/resolv.conf

I notice that when I boot the laptop after having been in the office,
resolv.conf still contains the LAN nameserver (192.168.0.10) from the
office, which squid duly adds. However, since there is no network
interface for this server, this nameserver will never respond.

Then, when I start the ADSL, resolv.conf is modified, but squid doesn't
  acknowledge that change without a restart (I haven't actually tested,
but I presume a "squid -k reconfigure" would work as well.)

Cheers!
Nik
Received on Wed Apr 06 2005 - 02:35:06 MDT

This archive was generated by hypermail pre-2.1.9 : Sun May 01 2005 - 12:00:03 MDT