Skip to contentSkip to conversation

No More Logrotate

DISCUSSION Peter (by way of Peter <[email protected]>) 3 participants 5 messages Apr 14, 2003 – Apr 16, 2003

lore
Share & tools
lore
#0 lore raw

Hi,

after I upgraded to a newer RH7.3 version from KRUD Linux logrotate will not rotate the log files any longer.

Instead I get the following error message in my mail:

error: syslog:1 duplicate log entry for /var/log/cron

Giving the command logrotate --force /etc/logrotate.conf I get the same error message.

I have not changed /etc/logrotate.conf or crontab of root.

I checked the pertinent cron.daily/weekly files and can't find anything
wrong.

How could this be resolved?

Thanks & regards
--
Peter

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#1 lore raw

Peter --

Unfortunately, organization of logs is one of the more distro-dependant things in Linux. Debian doesn't have a file (or directory) called /var/log/cron, so I can't immediately diagnose your problem from the information you provided. Another RH 7.3 user may be able to, though, you you might want to wait a bit to see if you get a more useful response from someone else before bothering with these questions.

If not ...

1. Is /var/log/cron a file or a directory? If the latter, what files does it contain?

2. Just to be sure -- when you run "logrotate --force /etc/logrotate.conf", you get an error at the console that reads *exactly* "error: syslog:1 duplicate log entry for /var/log/cron"? That is, you get an error from syslog, not from logrotate (or even syslogd)? And you get no other output to the screen?

3. It is possible to run logrotate with a -d (debug) flag. Does that generate any useful info?

4. On my systems, logrotate runs as root. Is that true on your system as well? If not, under what userid does it run? Might there be a permissions problem with some file it needs to rotate/

5. What is "KRUD Linux"?

Quoted 12 lines · Peter

Hi,

after I upgraded to a newer RH7.3 version from KRUD Linux logrotate will not rotate the log files any longer.

Instead I get the following error message in my mail:

error: syslog:1 duplicate log entry for /var/log/cron

Giving the command logrotate --force /etc/logrotate.conf I get the same error message.

Quoted 6 lines

I have not changed /etc/logrotate.conf or crontab of root.

I checked the pertinent cron.daily/weekly files and can't find anything
wrong.

How could this be resolved?

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#2 lore raw
Quoted 3 lines · Ray Olszewski

Peter --

Unfortunately, organization of logs is one of the more distro-dependant things in Linux. Debian doesn't have a file (or directory) called /var/log/cron, so I can't immediately diagnose your problem from the information you provided. Another RH 7.3 user may be able to, though, you you might want to wait a bit to see if you get a more useful response from someone else before bothering with these questions.

[SNIP]

Quoted 1 line

5. What is "KRUD Linux"?

A Red-Hat based distro. The home-page is at http://www.tummy.com/krud/

Signature · 9 lines
Bob Batson
[email protected]

"Chocolate is the true opiate of the masses!"
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
author
#3 lore raw
In reply to Ray Olszewski

Thanks Ray. Just when I had finished all the stuff below, your hint that the message comes from syslog made me look again and I found the file /etc/logrotate.d/syslog which read among others /var/log/cron. I removed this entry and logrotate went to work w/o error message and logrotating even that cron file.

Quoted 2 lines · [email protected] said:

1. Is /var/log/cron a file or a directory? If the latter, what files does it contain?

It's a file containing all the cron stuff from crontab, user and root.

# tail /var/log/cron
Apr 15 08:45:01 philonline CROND[1812]: (pfheiss) CMD (cd 
/usr/local/saytime/sounds/; ./saytime.sh)
Apr 15 08:50:00 philonline CROND[1841]: (root) CMD (   /sbin/rmmod -as) 
Apr 15 08:50:00 philonline CROND[1842]: (root) CMD (/usr/lib/sa/sa1 1 1) 
Apr 15 09:00:00 philonline CROND[1966]: (root) CMD (   /sbin/rmmod -as) 
Apr 15 09:00:00 philonline CROND[1967]: (root) CMD (/usr/lib/sa/sa1 1 1) 
Apr 15 09:00:00 philonline CROND[1968]: (pfheiss) CMD (play 
./sound/chimes.wav)
Apr 15 09:01:00 philonline CROND[1978]: (root) CMD (run-parts 
/etc/cron.hourly)
Apr 15 09:10:00 philonline CROND[2012]: (root) CMD (   /sbin/rmmod -as) 
Apr 15 09:10:00 philonline CROND[2013]: (root) CMD (/usr/lib/sa/sa1 1 1) 
Apr 15 09:15:00 philonline CROND[2036]: (pfheiss) CMD (cd 
/usr/local/saytime/sounds/; ./saytime.sh)
Quoted 5 lines · [email protected] said:

2. Just to be sure -- when you run "logrotate --force /etc/ logrotate.conf", you get an error at the console that reads *exactly* "error: syslog:1 duplicate log entry for /var/log/cron"? That is, you get an error from syslog, not from logrotate (or even syslogd)? And you get no other output to the screen

Correct that is the exact message with no other output to the screen.

Quoted 1 line · [email protected] said:

4. On my systems, logrotate runs as root.

It only runs as root on my system as well.
-rwxr-xr-x 1 root root 32840 Apr 16 2002 /usr/sbin/logrotate

Quoted 2 lines · [email protected] said:

3. It is possible to run logrotate with a -d (debug) flag. Does that generate any useful info?

# /usr/sbin/logrotate -d /etc/logrotate.conf
reading config file /etc/logrotate.conf
including /etc/logrotate.d
Ignoring named.rpmnew, because of .rpmnew ending
Ignoring rpm.rpmnew, because of .rpmnew ending
reading config file cron
reading config info for /var/log/cron 
reading config file ftpd
reading config info for /var/log/xferlog 
reading config file linuxconf
reading config info for /var/log/htmlaccess.log 
reading config info for /var/log/netconf.log 
reading config file mgetty
reading config info for /var/log/mgetty.log.tty* 
reading config file named
reading config info for /var/log/named.log 
reading config file rpm
reading config info for /var/log/rpmpkgs 
reading config file sendfax
reading config info for /var/log/sendfax.log 
reading config file slrnpull
reading config info for /var/spool/slrnpull/log 
reading config file snmpd
reading config info for /var/log/snmpd.log 
reading config file sudo
reading config info for /var/log/sudo.log 
reading config file syslog
error: syslog:1 duplicate log entry for /var/log/cron

There is a file /etc/syslog.conf, however, no /var/log/syslog file as in Slackware.
I put one there now which did not change anything, it just stays empty.

And to your final 5th question what is KRUD Linux somebody replied where to find it. They produce monthly the latest versions for RedHat to which one can subscribe for one year or order them as needed. This is very convenient if one has slow phone lines which will make updates by downloading a near impossibility.

Regards

Signature · 9 lines
Peter
-- 
Peter

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
author
#4 lore raw
In reply to Ray Olszewski

Thanks Ray. Just when I had finished all the stuff below, your hint that the message comes from syslog made me look again and I found the file /etc/logrotate.d/syslog which read among others /var/log/cron. I removed this entry and logrotate went to work w/o error message and logrotating even that cron file.

Quoted 2 lines · [email protected] said:

1. Is /var/log/cron a file or a directory? If the latter, what files does it contain?

It's a file containing all the cron stuff from crontab, user and root.

# tail /var/log/cron
Apr 15 08:45:01 philonline CROND[1812]: (pfheiss) CMD (cd 
/usr/local/saytime/sounds/; ./saytime.sh)
Apr 15 08:50:00 philonline CROND[1841]: (root) CMD (   /sbin/rmmod -as) 
Apr 15 08:50:00 philonline CROND[1842]: (root) CMD (/usr/lib/sa/sa1 1 1) 
Apr 15 09:00:00 philonline CROND[1966]: (root) CMD (   /sbin/rmmod -as) 
Apr 15 09:00:00 philonline CROND[1967]: (root) CMD (/usr/lib/sa/sa1 1 1) 
Apr 15 09:00:00 philonline CROND[1968]: (pfheiss) CMD (play 
./sound/chimes.wav)
Apr 15 09:01:00 philonline CROND[1978]: (root) CMD (run-parts 
/etc/cron.hourly)
Apr 15 09:10:00 philonline CROND[2012]: (root) CMD (   /sbin/rmmod -as) 
Apr 15 09:10:00 philonline CROND[2013]: (root) CMD (/usr/lib/sa/sa1 1 1) 
Apr 15 09:15:00 philonline CROND[2036]: (pfheiss) CMD (cd 
/usr/local/saytime/sounds/; ./saytime.sh)
Quoted 5 lines · [email protected] said:

2. Just to be sure -- when you run "logrotate --force /etc/ logrotate.conf", you get an error at the console that reads *exactly* "error: syslog:1 duplicate log entry for /var/log/cron"? That is, you get an error from syslog, not from logrotate (or even syslogd)? And you get no other output to the screen

Correct that is the exact message with no other output to the screen.

Quoted 1 line · [email protected] said:

4. On my systems, logrotate runs as root.

It only runs as root on my system as well.
-rwxr-xr-x 1 root root 32840 Apr 16 2002 /usr/sbin/logrotate

Quoted 2 lines · [email protected] said:

3. It is possible to run logrotate with a -d (debug) flag. Does that generate any useful info?

# /usr/sbin/logrotate -d /etc/logrotate.conf
reading config file /etc/logrotate.conf
including /etc/logrotate.d
Ignoring named.rpmnew, because of .rpmnew ending
Ignoring rpm.rpmnew, because of .rpmnew ending
reading config file cron
reading config info for /var/log/cron 
reading config file ftpd
reading config info for /var/log/xferlog 
reading config file linuxconf
reading config info for /var/log/htmlaccess.log 
reading config info for /var/log/netconf.log 
reading config file mgetty
reading config info for /var/log/mgetty.log.tty* 
reading config file named
reading config info for /var/log/named.log 
reading config file rpm
reading config info for /var/log/rpmpkgs 
reading config file sendfax
reading config info for /var/log/sendfax.log 
reading config file slrnpull
reading config info for /var/spool/slrnpull/log 
reading config file snmpd
reading config info for /var/log/snmpd.log 
reading config file sudo
reading config info for /var/log/sudo.log 
reading config file syslog
error: syslog:1 duplicate log entry for /var/log/cron

There is a file /etc/syslog.conf, however, no /var/log/syslog file as in Slackware.
I put one there now which did not change anything, it just stays empty.

And to your final 5th question what is KRUD Linux somebody replied where to find it. They produce monthly the latest versions for RedHat to which one can subscribe for one year or order them as needed. This is very convenient if one has slow phone lines which will make updates by downloading a near impossibility.

Regards

Signature · 11 lines
Peter
-- 
Peter



-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs