Koozali.org: home of the SME Server
Legacy Forums => General Discussion (Legacy) => Topic started by: Hasan Muhammad on July 25, 2000, 05:48:12 PM
-
I get the following mail message every day...
Any debug ideas?
From: "Cron Daemon" To:
Subject: Cron run-parts /etc/cron.daily
"Cron Daemon" error: bad line 4 in state file /var/lib/logrotate.status
Hasan
-
Hasan Muhammad wrote:
> Any debug ideas?
...
> "Cron Daemon" error: bad line 4 in state file
> /var/lib/logrotate.status
Log in as root and have a look at /var/lib/logrotate.status:
cat /var/lib/logrotate.status
My file looks like this ...
logrotate state -- version 1
/var/log/cron 2000-7-23
/var/log/messages 2000-7-23
/var/log/secure 2000-7-23
/var/log/maillog 2000-7-23
...
I strongly suspect that you can delete that file, and logrotate will create a new one, with correct syntax.
Charlie
-
Charlie,
That file on my machine looked to have the identical format, but what the heck...
However, all its entries were dated 2000-7-19.
I renamed it as suggested... results to follow.
Thanks,
Hasan
-
I found the problem.
Among the entries in the logrotate.status file are a
/var/log/samba/log.workstation_name 2000-7-26
where workstation_name corresponds to a windows computer name as listed under network neighborhood.
Apparently the format of entries in logrotate.status is for two fields per line separated by whitespace, which means the fields should not contain whitespace.
A computer on our network was named 'Tech Dev Workstation' (control panel/network/identification/computer name). Since this name contained spaces, the entry for that workstation in the logrotate.status file contained more than two fields.
-
Here's the fix:
Notice the line number
error: bad line 19 in state file /var/lib/logrotate.status
Edit /var/lib/logrotate.status
- go to that line number
- Note the name of the Windows machine listed on that line (the name will include an embedded space--which is the source of the problem).
Go to the /var/log/samba directory and remove the file associated with that machine name (and remove the files for any other Windows machines with an embedded space in the name).
Remove the /var/lib/logrotate.status file.
Go to every Windows machine whose name includes an embedded space:
- rename the machine (Control Panel/Network/Identification/Computer Name)
- reboot the computer
That should fix the problem.
Hasan
-
Hasan Muhammad wrote:
> Here's the fix:
"Here's a fix" would be more accurate - there's more than one way to skin a cat, as the old saying goes..
> Notice the line number
>
> error: bad line 19 in state file /var/lib/logrotate.status
>
> Edit /var/lib/logrotate.status - go to that line number - Note
> the name of the Windows machine listed on that line (the name
> will include an embedded space--which is the source of the
> problem).
That, and a bug in the logrotate program.
The bug has been recognised and fixed in a later version of logrotate.
I've built that version for e-smith, and put it in my contrib directory on ftp.e-smith.org. The directory is:
ftp://ftp.e-smith.org/pub/e-smith/contrib/charlieb/RPMS/i386
and the two filenames you need are:
logrotate-3.5-1.i386.rpm
popt-1.5-9.6x.i386.rpm
Update those files using "rpm -Uhv .....", then remove /var/lib/logrotate.status, and you should see no more such messages.
This has had only minimal testing with e-smith, so if you have a mission critical server, just put up with the harmless email messages, or rename your windows machines as suggested by Hasan.
Regards
Charlie