« Network Traffic | Main | Successfull Restore After Hard Disk Crash »

Plesk 8.1.1 Upgrade Part 2

I had one outstanding problem with my Plesk 8.1.1 upgrade. After the upgrade I started getting errors in Logrotate, and syslog starting doing weird things with my log files.

After a few notes exchanged with RackForce and SwSoft technical support we thought we had isolated the problem.

I was concerned because I had found another logrotate executable in a Plesk directory. But SwSoft confirmed it's only used by Plesk software. Checking /etc/cron.daily/logrotate I could see that only the /user/sbin version of logrotate was being used.

We noticed that logrotate was getting a daily message from logrotate in /var/log/messages.
* May 4 01:00:31 localhost logrotate: ALERT exited abnormally with [1]
* May 5 01:00:23 localhost logrotate: ALERT exited abnormally with [1]

By modifying /etc/cron.daily/logrotate by adding "-v" for verbose tracing and "2>/var/log/logrotate.debug" to capture the trace I was able to have it dump a trace of the daily logrotate.

#!/bin/sh

/usr/sbin/logrotate -v /etc/logrotate.conf 2>/var/log/logrotate.debug
EXITVALUE=$?
if [ $EXITVALUE != 0 ]; then
    /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
fi
exit 0

Prior to version 8.1.1 I had turned off use of Dr. Web and it's update program by removing it from booting and removing the CRON for the update.. At the time I didn't have a licence and there seemed to be no point running it and the update program if it wasn't being used. After the upgrade, Dr Web was plugged back in.

Dr Web and it's update program both produce log files, and that seems to be the problem. The initial daily logrotate was getting an error. I added the following to /etc/logrotate.d/drweb-update.

/var/drweb/log/updater.log {
    missingok
    create 0640 drweb drweb
    compress
    rotate 7
    daily
    size 512k
    copytruncate
}

And also updated /etc/logrotate.d/drwebd

/var/drweb/log/drwebd.log {
    missingok
    create 0640 drweb drweb
    compress
    rotate 7
    daily
}

That started those log files rotating, but it looks like I need to fix the weekly log switch as I still had a problem with syslog writing to /var/log/messages.1 because it was not restarted.

I finally decided to turn off Dr Web again. I disabled the "update.pl" scripts in the "drweb" id of Plesk's scheduled tasks. I also turned off DrWeb in Plesk's Service Managment section. There's no point running these if I don't have the license. I then went into /etc/rc2.d and renamed S70drwebd to K70drwebd so that Dr Web won't run when the system is restarted. If I ever need Dr Web I can just undo these actions.

But I still need to fix the weekly log switch problem.


© 2016 Mike Silversides

About

This page contains a single entry from the blog posted on May 14, 2007 9:11 AM.

The previous post in this blog was Network Traffic.

The next post in this blog is Successfull Restore After Hard Disk Crash.

Many more can be found on the main index page or by looking through the archives.