logrotate error for empty mysql logs

Bug #490665 reported by Eric Towers
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
logrotate (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: logrotate

Logrotate generates the error:
"error: error running shared postrotate script for '/var/log/mysql.log /var/log/mysql/mysql.log /var/log/mysql/mysql-slow.log '"
when run with mysql-server-core (5.1) installed. This condition also generates error e-Mail.

logrotate behaviour:
$ cd /etc/logrotate.d
$ sudo logrotate -f mysql-server
error: error running shared postrotate script for '/var/log/mysql.log /var/log/mysql/mysql.log /var/log/mysql/mysql-slow.log '

Expected behaviour: Zero-length log files do not cause error alerts.

Affected versions:
Kubuntu 9.10 (Upgraded sequentially from 6.04 over the past several years.)
logrotate 3.7,8.4ubuntu1
mysql-server-core 5.1.37-1ubuntu

Possible cause (1):
/var/log/mysql.log has zero length.
$ ls -laF /var/log/mysql.*
-rw-r----- 1 mysql adm 0 2009-11-20 02:30 /var/log/mysql.err
-rw-r----- 1 mysql adm 0 2009-11-30 22:37 /var/log/mysql.log
-rw-r----- 1 mysql adm 0 2009-11-30 07:43 /var/log/mysql.log.1
-rw-r----- 1 mysql adm 20 2009-11-23 08:00 /var/log/mysql.log.8.gz

Possible cause (2):
debian.cnf is malformed. // Passwords excised from output below. The two instances are identical.
$ sudo more /etc/mysql/debian.cnf
# Automatically generated for Debian scripts. DO NOT TOUCH!
[client]
host = localhost
user = debian-sys-maint
password = [excised]
socket = /var/run/mysqld/mysqld.sock
[mysql_upgrade]
host = localhost
user = debian-sys-maint
password = [excised]
socket = /var/run/mysqld/mysqld.sock

Possible cause (3):
auditing is interfering with mysqld.
$ sudo service mysql restart
 * Stopping MySQL database server mysqld [ OK ]
 * Starting MySQL database server mysqld [fail]
fuzzy@client0004:/etc/logrotate.d$ tail /var/log/messages
Nov 30 22:52:39 client0004 kernel: [593992.220673] type=1502 audit(1259643159.445:72): operation="open" pid=11016 parent=11015 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
[8 duplicate messages elided]
Nov 30 22:52:42 client0004 kernel: [593995.294992] type=1502 audit(1259643162.515:81): operation="open" pid=11047 parent=11046 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"

ProblemType: Bug
Architecture: amd64
Date: Mon Nov 30 22:38:09 2009
DistroRelease: Ubuntu 9.10
NonfreeKernelModules: nvidia
Package: logrotate 3.7.8-4ubuntu1
ProcEnviron:
 LANGUAGE=en_US:en_GB:en
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-15.50-generic
SourcePackage: logrotate
Uname: Linux 2.6.31-15-generic x86_64
XsessionErrors:
 (polkit-gnome-authentication-agent-1:3289): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed
 (npviewer.bin:3438): Gtk-WARNING **: /usr/lib/gtk-2.0/2.10.0/engines/libqtcurve.so: wrong ELF class: ELFCLASS64

Revision history for this message
Eric Towers (fuzzyeric) wrote :
Changed in logrotate (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.