Re: since CentOS 5.6 upgrade, squid crashes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Wed, 4 May 2011 13:35:37 +0200
Philippe Naudin <philippe.naudin@xxxxxxxxxxxxxxx> wrote:

> Le mer 04 mai 2011 12:48:39 CEST, Laurent CREPET a écrit:
> 
> > [...]
> > However, since:
> > - my settings have not been modified recently
> > - logrorate and squid packages have not been updated by CentOS 5.6 (see below)
> > ...an issue with glibc ?
> 
> Squid and logrotate work just fine here :
> $ rpm -q squid logrotate
> squid-2.6.STABLE21-6.el5
> logrotate-3.7.4-9.el5_5.2
> 
> $ ls -l /var/log/squid/
> total 92624
> -rw------- 1 squid squid 43709603 mai  4 13:08 access.log
> -rw------- 1 squid squid  9424047 mai  1 04:02 access.log.1.gz
> -rw------- 1 squid squid  9751039 avr 24 04:02 access.log.2.gz
> -rw------- 1 squid squid 10745924 avr 17 04:02 access.log.3.gz
> -rw------- 1 squid squid 11373152 avr 10 04:02 access.log.4.gz
> -rw------- 1 squid squid  9620745 avr  3 04:02 access.log.5.gz
> -rw-r----- 1 squid squid     2794 mai  4 11:58 cache.log
> -rw-r----- 1 squid squid     2503 mai  1 04:02 cache.log.1.gz
> -rw-r----- 1 squid squid     1580 avr 24 04:02 cache.log.2.gz
> -rw-r----- 1 squid squid     1881 avr 17 04:02 cache.log.3.gz
> -rw-r----- 1 squid squid     1591 avr 10 04:02 cache.log.4.gz
> -rw-r----- 1 squid squid     2772 avr  3 04:02 cache.log.5.gz
> -rw-r--r-- 1 squid squid      511 nov 26 09:13 squid.out
> 
> Have you double checked that your problem is not a permission 
> problem, or some SELinux issue ?

SELinux is disabled.

[root@stargate ~]# grep SELINUX /etc/selinux/config 
# SELINUX= can take one of these three values:
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
SELINUXTYPE=targeted


> You can also try, as root :
> $ logrotate -d -v -f /etc/logrotate.d/squid # and without -d 
> $ squid -k rotate

[root@stargate ~]# /etc/init.d/squid status
squid (pid  6173) is running...
[root@stargate ~]# logrotate -d -v -f /etc/logrotate.d/squid
reading config file /etc/logrotate.d/squid
reading config info for /var/log/squid/access.log 
reading config info for /var/log/squid/cache.log 
reading config info for /var/log/squid/store.log 

Handling 3 logs

rotating pattern: /var/log/squid/access.log  forced from command line (5 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/squid/access.log
  log needs rotating
rotating log /var/log/squid/access.log, log->rotateCount is 5
renaming /var/log/squid/access.log.5.gz to /var/log/squid/access.log.6.gz (rotatecount 5, logstart 1, i 5), 
renaming /var/log/squid/access.log.4.gz to /var/log/squid/access.log.5.gz (rotatecount 5, logstart 1, i 4), 
renaming /var/log/squid/access.log.3.gz to /var/log/squid/access.log.4.gz (rotatecount 5, logstart 1, i 3), 
renaming /var/log/squid/access.log.2.gz to /var/log/squid/access.log.3.gz (rotatecount 5, logstart 1, i 2), 
renaming /var/log/squid/access.log.1.gz to /var/log/squid/access.log.2.gz (rotatecount 5, logstart 1, i 1), 
renaming /var/log/squid/access.log.0.gz to /var/log/squid/access.log.1.gz (rotatecount 5, logstart 1, i 0), 
copying /var/log/squid/access.log to /var/log/squid/access.log.1
truncating /var/log/squid/access.log
compressing log with: /bin/gzip
removing old log /var/log/squid/access.log.6.gz

rotating pattern: /var/log/squid/cache.log  forced from command line (5 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/squid/cache.log
  log needs rotating
rotating log /var/log/squid/cache.log, log->rotateCount is 5
renaming /var/log/squid/cache.log.5.gz to /var/log/squid/cache.log.6.gz (rotatecount 5, logstart 1, i 5), 
renaming /var/log/squid/cache.log.4.gz to /var/log/squid/cache.log.5.gz (rotatecount 5, logstart 1, i 4), 
renaming /var/log/squid/cache.log.3.gz to /var/log/squid/cache.log.4.gz (rotatecount 5, logstart 1, i 3), 
renaming /var/log/squid/cache.log.2.gz to /var/log/squid/cache.log.3.gz (rotatecount 5, logstart 1, i 2), 
renaming /var/log/squid/cache.log.1.gz to /var/log/squid/cache.log.2.gz (rotatecount 5, logstart 1, i 1), 
renaming /var/log/squid/cache.log.0.gz to /var/log/squid/cache.log.1.gz (rotatecount 5, logstart 1, i 0), 
copying /var/log/squid/cache.log to /var/log/squid/cache.log.1
truncating /var/log/squid/cache.log
compressing log with: /bin/gzip
removing old log /var/log/squid/cache.log.6.gz

rotating pattern: /var/log/squid/store.log  forced from command line (5 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/squid/store.log
  log needs rotating
rotating log /var/log/squid/store.log, log->rotateCount is 5
renaming /var/log/squid/store.log.5.gz to /var/log/squid/store.log.6.gz (rotatecount 5, logstart 1, i 5), 
renaming /var/log/squid/store.log.4.gz to /var/log/squid/store.log.5.gz (rotatecount 5, logstart 1, i 4), 
renaming /var/log/squid/store.log.3.gz to /var/log/squid/store.log.4.gz (rotatecount 5, logstart 1, i 3), 
renaming /var/log/squid/store.log.2.gz to /var/log/squid/store.log.3.gz (rotatecount 5, logstart 1, i 2), 
renaming /var/log/squid/store.log.1.gz to /var/log/squid/store.log.2.gz (rotatecount 5, logstart 1, i 1), 
renaming /var/log/squid/store.log.0.gz to /var/log/squid/store.log.1.gz (rotatecount 5, logstart 1, i 0), 
copying /var/log/squid/store.log to /var/log/squid/store.log.1
truncating /var/log/squid/store.log
running postrotate script
running script with arg /var/log/squid/store.log : "
      /usr/sbin/squid -k rotate
"
compressing log with: /bin/gzip
removing old log /var/log/squid/store.log.6.gz
[root@stargate ~]# /etc/init.d/squid status
squid (pid  6173) is running...
[root@stargate ~]# logrotate -v -f /etc/logrotate.d/squid
reading config file /etc/logrotate.d/squid
reading config info for /var/log/squid/access.log 
reading config info for /var/log/squid/cache.log 
reading config info for /var/log/squid/store.log 

Handling 3 logs

rotating pattern: /var/log/squid/access.log  forced from command line (5 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/squid/access.log
  log needs rotating
rotating log /var/log/squid/access.log, log->rotateCount is 5
renaming /var/log/squid/access.log.5.gz to /var/log/squid/access.log.6.gz (rotatecount 5, logstart 1, i 5), 
renaming /var/log/squid/access.log.4.gz to /var/log/squid/access.log.5.gz (rotatecount 5, logstart 1, i 4), 
renaming /var/log/squid/access.log.3.gz to /var/log/squid/access.log.4.gz (rotatecount 5, logstart 1, i 3), 
renaming /var/log/squid/access.log.2.gz to /var/log/squid/access.log.3.gz (rotatecount 5, logstart 1, i 2), 
renaming /var/log/squid/access.log.1.gz to /var/log/squid/access.log.2.gz (rotatecount 5, logstart 1, i 1), 
renaming /var/log/squid/access.log.0.gz to /var/log/squid/access.log.1.gz (rotatecount 5, logstart 1, i 0), 
old log /var/log/squid/access.log.0.gz does not exist
copying /var/log/squid/access.log to /var/log/squid/access.log.1
truncating /var/log/squid/access.log
compressing log with: /bin/gzip
removing old log /var/log/squid/access.log.6.gz

rotating pattern: /var/log/squid/cache.log  forced from command line (5 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/squid/cache.log
  log needs rotating
rotating log /var/log/squid/cache.log, log->rotateCount is 5
renaming /var/log/squid/cache.log.5.gz to /var/log/squid/cache.log.6.gz (rotatecount 5, logstart 1, i 5), 
renaming /var/log/squid/cache.log.4.gz to /var/log/squid/cache.log.5.gz (rotatecount 5, logstart 1, i 4), 
renaming /var/log/squid/cache.log.3.gz to /var/log/squid/cache.log.4.gz (rotatecount 5, logstart 1, i 3), 
renaming /var/log/squid/cache.log.2.gz to /var/log/squid/cache.log.3.gz (rotatecount 5, logstart 1, i 2), 
renaming /var/log/squid/cache.log.1.gz to /var/log/squid/cache.log.2.gz (rotatecount 5, logstart 1, i 1), 
renaming /var/log/squid/cache.log.0.gz to /var/log/squid/cache.log.1.gz (rotatecount 5, logstart 1, i 0), 
old log /var/log/squid/cache.log.0.gz does not exist
copying /var/log/squid/cache.log to /var/log/squid/cache.log.1
truncating /var/log/squid/cache.log
compressing log with: /bin/gzip
removing old log /var/log/squid/cache.log.6.gz

rotating pattern: /var/log/squid/store.log  forced from command line (5 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/squid/store.log
  log needs rotating
rotating log /var/log/squid/store.log, log->rotateCount is 5
renaming /var/log/squid/store.log.5.gz to /var/log/squid/store.log.6.gz (rotatecount 5, logstart 1, i 5), 
renaming /var/log/squid/store.log.4.gz to /var/log/squid/store.log.5.gz (rotatecount 5, logstart 1, i 4), 
renaming /var/log/squid/store.log.3.gz to /var/log/squid/store.log.4.gz (rotatecount 5, logstart 1, i 3), 
renaming /var/log/squid/store.log.2.gz to /var/log/squid/store.log.3.gz (rotatecount 5, logstart 1, i 2), 
renaming /var/log/squid/store.log.1.gz to /var/log/squid/store.log.2.gz (rotatecount 5, logstart 1, i 1), 
renaming /var/log/squid/store.log.0.gz to /var/log/squid/store.log.1.gz (rotatecount 5, logstart 1, i 0), 
old log /var/log/squid/store.log.0.gz does not exist
copying /var/log/squid/store.log to /var/log/squid/store.log.1
truncating /var/log/squid/store.log
running postrotate script
compressing log with: /bin/gzip
removing old log /var/log/squid/store.log.6.gz
[root@stargate ~]# /etc/init.d/squid status
squid (pid  6173) is running...


> $ ls -lZ /var/log/squid/
> to see if there is any error message.

[root@stargate ~]# cat /var/log/squid/cache.log
2011/05/04 14:37:36| storeDirWriteCleanLogs: Starting...
2011/05/04 14:37:36|     65536 entries written so far.
2011/05/04 14:37:36|    131072 entries written so far.
2011/05/04 14:37:36|    196608 entries written so far.
2011/05/04 14:37:36|    262144 entries written so far.
2011/05/04 14:37:36|    327680 entries written so far.
2011/05/04 14:37:36|    393216 entries written so far.
2011/05/04 14:37:36|    458752 entries written so far.
2011/05/04 14:37:36|    524288 entries written so far.
2011/05/04 14:37:36|    589824 entries written so far.
2011/05/04 14:37:36|    655360 entries written so far.
2011/05/04 14:37:36|    720896 entries written so far.
2011/05/04 14:37:36|    786432 entries written so far.
2011/05/04 14:37:36|    851968 entries written so far.
2011/05/04 14:37:36|    917504 entries written so far.
2011/05/04 14:37:36|    983040 entries written so far.
2011/05/04 14:37:36|   1048576 entries written so far.
2011/05/04 14:37:36|   1114112 entries written so far.
2011/05/04 14:37:36|   1179648 entries written so far.
2011/05/04 14:37:36|   Finished.  Wrote 1242965 entries.
2011/05/04 14:37:36|   Took 0.3 seconds (3692695.5 entries/sec).
2011/05/04 14:37:36| aioSync: flushing pending I/O operations
2011/05/04 14:37:36| aioSync: done
2011/05/04 14:37:36| logfileRotate: /var/log/squid/store.log
2011/05/04 14:37:36| logfileRotate: /var/log/squid/access.log
2011/05/04 14:39:51| storeDirWriteCleanLogs: Starting...
2011/05/04 14:39:51|     65536 entries written so far.
2011/05/04 14:39:51|    131072 entries written so far.
2011/05/04 14:39:51|    196608 entries written so far.
2011/05/04 14:39:51|    262144 entries written so far.
2011/05/04 14:39:51|    327680 entries written so far.
2011/05/04 14:39:51|    393216 entries written so far.
2011/05/04 14:39:51|    458752 entries written so far.
2011/05/04 14:39:51|    524288 entries written so far.
2011/05/04 14:39:51|    589824 entries written so far.
2011/05/04 14:39:51|    655360 entries written so far.
2011/05/04 14:39:51|    720896 entries written so far.
2011/05/04 14:39:51|    786432 entries written so far.
2011/05/04 14:39:51|    851968 entries written so far.
2011/05/04 14:39:51|    917504 entries written so far.
2011/05/04 14:39:51|    983040 entries written so far.
2011/05/04 14:39:51|   1048576 entries written so far.
2011/05/04 14:39:51|   1114112 entries written so far.
2011/05/04 14:39:51|   1179648 entries written so far.
2011/05/04 14:39:51|   Finished.  Wrote 1242997 entries.
2011/05/04 14:39:51|   Took 0.4 seconds (3462811.6 entries/sec).
2011/05/04 14:39:51| aioSync: flushing pending I/O operations
2011/05/04 14:39:51| aioSync: done
2011/05/04 14:39:51| logfileRotate: /var/log/squid/store.log
2011/05/04 14:39:51| logfileRotate: /var/log/squid/access.log

So, logrotating squid logs by hand works. Now, when logrotate is started from /etc/cron.daily/logrotate, it processes more log files. It has consequences on system load and disk space. Here are my last ideas. 

Laurent.
-- 
Laurent CREPET <lct@xxxxxxxxxxx>
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos



[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux