Re: [squid-users] SQUID Logrotate problem

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Fri, 22 Jul 2011 16:32:43 +1200

On 22/07/11 13:32, Will Roberts wrote:
> Here are simple steps to reproduce the problem I see with 3.1.12:
>
> 1. Add "127.0.0.1 bogus" to your /etc/hosts
> 2. Add "http_port bogus:8080" to your squid.conf
> 3. Restart squid
> 4. Modify /etc/hosts so that "bogus" no longer resolves
> 5. Force a log rotation: logrotate -f /etc/logrotate.d/squid3
> which produces:
>
> 2011/07/21 21:22:05| http(s)_port: failed to resolve Host/IP: bogus
> FATAL: Bungled squid.conf line 13: http_port bogus:8080
> Squid Cache (Version 3.1.12): Terminated abnormally.
> CPU Usage: 0.016 seconds = 0.004 user + 0.012 sys
> Maximum Resident Size: 17936 KB
> Page faults with physical i/o: 0
> error: error running shared postrotate script for '/var/log/squid3/*.log '
>
> Logrotate will have already moved the files, but no new
> access.log/cache.log will be created.
>
> 6. Fix /etc/hosts so that "bogus" once again resolves to localhost
> 7. Force log rotation again.
> 8. Logs aren't rotated (my logrotate won't rotate if missing), and squid
> still won't create the log files.
>
> Also see the same with 3.1.6 from the Debian repositories.
>
> Regards,
> --Will

Aha thank you. So this is all triggered by a crash.

Can you check the contents of the squid.pid file vs the processes that
are actually running between step (6) and (7).

Amos

-- 
Please be using
   Current Stable Squid 2.7.STABLE9 or 3.1.14
   Beta testers wanted for 3.2.0.9
Received on Fri Jul 22 2011 - 04:32:49 MDT

This archive was generated by hypermail 2.2.0 : Fri Jul 22 2011 - 12:00:03 MDT