Article View: news.software.nntp
Article #81055Re: Logging failures
From: John F. Morse
Date: Mon, 18 May 2009 09:45
Date: Mon, 18 May 2009 09:45
244 lines
11327 bytes
11327 bytes
Ray Banana wrote:
> Thus spake "John F. Morse" <xanadu.bbs@example.invalid>
>
>
>> I haven't touched the optima5 server in four days. No reboots or sysklog
>> restarts.
>> The news.notice log actually has 3.5 days of logging in it, so it
>> apparently is not getting rotated, or if so (see OLD below) it is not
>> getting zeroed out after rotation. I believe the latter.
>> I think these logs are actually rotating, but each day has the preceding
>> day's logging. It's adding up since the /var/log/news/news.notice never
>> gets emptied.
>>
>
> So I assume the ownership of these log files was already set by sysklogd
> and the files are owned by syslog:adm. If you change then to news:news,
> news.daily will rotate them, but a restart of sysklogd wil change the
> owner back to syslogd:adm.
>
The files are rotated, and the owner:group is indeed changed to
syslog:adm -- and -- the files are not emptied. New logging is simply
appended, causing the logs to grow.
Here are the lines from this morning's Daily Report:
/usr/lib/news/bin/scanlogs: 233: cannot create /var/log/news/news.crit:
Permission denied
/usr/lib/news/bin/scanlogs: 233: cannot create /var/log/news/news.err:
Permission denied
/usr/lib/news/bin/scanlogs: 233: cannot create
/var/log/news/news.notice: Permission denied
Daily Usenet report from May 14 00:00:02 to May 18 00:00:01
The Daily Report now shows it covers four days.
The news.notice logfile is now over half a gigabyte:
-rw-r--r-- 1 syslog adm 554605 2009-05-18 03:02 news.notice
Compare to optima2's news.notice:
-rw-r--r-- 1 news news 14581 2009-05-18 03:05 news.notice
Or compare to optima7, where there are many nnrpd entries:
-rw-r--r-- 1 news news 116865 2009-05-18 03:07 news.notice
You can see the ~10 MB per day appending showing up in the sizes of the
/var/log/news/OLD/ archive:
-r--r----- 1 news news 39156 2009-05-18 00:00 news.notice.1.gz
-r--r----- 1 news news 28223 2009-05-17 00:00 news.notice.2.gz
-r--r----- 1 news news 18870 2009-05-16 00:00 news.notice.3.gz
This might be caused by the permissions problem.
Evidentially sysklog changes the owner:group before scanlogs can create
the new (empty) files. So scanlogs fails.
Another comparison of the Daily Reports of Optima5 with Optima2, both
peering identically with Optima7:
Optima5:
Log file sizes:
0 errlog 0 innfeed.log 0 news.crit 532 news.notice
4 expire.log 532 news 4 news.err 8 unwanted.log
Optima2:
Log file sizes:
0 errlog 0 innfeed.log 0 news.crit 112 news.notice
4 expire.log 529 news 0 news.err 4 unwanted.log
You can see that the news log is nearly identical in size, but
news.notice has ballooned on Optima5 since it is never cleared.
>> Todays Daily Report now shows:
>>
>> /usr/lib/news/bin/scanlogs: 233: cannot create /var/log/news/news.crit: Permission denied
>> /usr/lib/news/bin/scanlogs: 233: cannot create /var/log/news/news.err: Permission denied
>> /usr/lib/news/bin/scanlogs: 233: cannot create /var/log/news/news.notice: Permission denied
>> Daily Usenet report from May 14 00:00:02 to May 17 00:00:02
>>
>> john@optima2:/var/log/news$ ls -l
>> total 429
>> -rw-r--r-- 1 news news 0 2009-05-17 00:00 errlog
>> -rw-rw-r-- 1 news news 65023 2009-05-17 00:00 expire.lastlowmark
>> -rw-rw-r-- 1 news news 633 2009-05-17 00:01 expire.log
>> -rw-rw-r-- 1 news news 0 2009-05-09 14:35 innfeed.log
>> -rw-rw-r-- 1 news news 2830 2009-05-17 02:15 innfeed.status
>> -rw-r--r-- 1 news news 295004 2009-05-17 12:08 news
>> -rw-r--r-- 1 news news 0 2009-05-17 00:00 news.crit
>> -rw-r--r-- 1 news news 0 2009-05-17 00:00 news.err
>> -rw-r--r-- 1 news news 56966 2009-05-17 12:10 news.notice
>> drwxr-xr-x 2 news news 904 2009-05-17 00:00 OLD
>> drwxrwxr-x 2 news news 48 2007-08-10 07:11 path
>> -rw-r--r-- 1 root news 62 2009-05-12 07:12 rc.news
>> -rw-rw---- 1 news news 71 2009-05-17 00:00 unwanted.log
>>
>
> So these should rotate OK.
>
Yes. Optima2 is working fine with your first fix in
/etc/cron.daily/sysklogd :
/etc/init.d/sysklogd restart > /dev/null
>> A brand new Debian 5.0.1 install this morning on Optima11:
>>
>
> The behaviour of sysklogd on Debian is different from Ubuntu, as it will
> not change the owner of the news.* logfiles during start or restart as
> Ubuntu will do. BTW, the same problem exists on Ubuntu 9.04. I haven't
> found out, what makes sysklog behave different on Debian, all I can say
> is that the difference is not in the configuration files.
Tonight I will install INN on the Optima11 box (Debian Lenny) and see
what it does.
I originally preferred to use Debian, but I couldn't get Lenny to
install on the Optima computers. I discovered yesterday that it would
install when I used a newer CD-ROM drive. Evidentially Lenny doesn't
like the optical drives in the 12 Optima computers.
I discovered this because the CD-ROM drive in Optima11 was bad. So I
grabbed a spare off the shelf to try and install Lenny, for additional
testing on the earlier Debian bug report.
My other thoughts are in future bug and security support. The Ubuntu
8.04 LTS Server Edition will be supported for five years.
Even though Debian is quite slow in releasing new versions, I don't
think Lenny will be supported for five years. Support for Sarge 3.1,
released on 20050606, ended for 3.1r7 at the end of March, 2008,
slightly less than three years of support.
IMHO, Sarge was a good release. Check this out on Optima1, a Debian
Sarge box running BIND9, Fetchmail, Stunnel, ntpd, et al:
john@optima1:~$ who -b
system boot Nov 12 11:32
That is November 12, 2006! Here's where I launched fetchmail from VT6:
john@optima1:~$ w
04:31:27 up 420 days, 17:50, 2 users, load average: 0.00, 0.00, 0.00
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
john tty6 - 12Nov06 885days 4:15m 4:15m fetchmail
That 420 uptime is in error. It evidentially cannot accumulate more than
a certain amount.
john@optima1:~$ uptime
04:30:43 up 420 days, 17:49, 2 users, load average: 0.00, 0.00, 0.00
Etch was released on 20070408, with 4.0r8 released on 20090408, and
superseded by Lenny on 20090215. That is a two year interval, and the
day support for Etch stops is yet unknown. I only use Etch on a couple
of workstations.
So it looks like Ubuntu has far better support. But if they can't fix
their sysklog problem, it may be better to use Debian instead. If we fix
the sysklog problem with your first modification, then should Ubuntu
come along with an upgrade involving the sysklog package, it can
overwrite and break our fix.
The other complaint I had with a Debian Lenny install was all the GUI
and AV packages it installs. All the Optima computers (except Optima5)
have 4.3 GB hard drives, and the Lenny install I did on Saturday ate up
79% of the hard drive -- without even installing INN:
john@optima11:~$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda1 4000000 3128412 871588 79% /
Sunday morning's Lenny reinstall was made using the "Expert Install"
mode, where I unselected the "desktop environment" and some other
"typical" installation defaults. Without INN installed, it shows:
john@optima11:~$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda1 3983936 439620 3544316 12% /
That does include "apt-get install ntp openssh-server less" and their
dependencies, and I can live with that.
The hard disk in Optima5 is a larger 40 GB drive, but I had to clip it
down to 32 GB due to the BIOS. That should be sufficient for a full
Big-8 feed, without alt.* and binary groups. Using CNFS, I probably can
get by with the 4.3 GB hard drive for transit server duty.
For comparison, the Optima2 INN server is working, and has the following
disk free usage:
john@optima2:~$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 3983936 3771068 212868 95% /
INN is configured to use:
cycbuff:001:/var/spool/news/cycbuffs/001:512000
cycbuff:002:/var/spool/news/cycbuffs/002:512000
cycbuff:003:/var/spool/news/cycbuffs/003:512000
cycbuff:004:/var/spool/news/cycbuffs/004:512000
cycbuff:005:/var/spool/news/cycbuffs/005:512000
metacycbuff:binslow:001
metacycbuff:binfast:002
metacycbuff:txtslow:003
metacycbuff:txtfast:004
The cycbuff 005 is unused at this time (created as a spare for growth).
This morning's Daily Report shows: Articles retained 98939.
Incoming Feeds (INN):
Server Connects Offered Taken Refused Reject %Accpt Elapsed
optima7.xanadu-bbs.net 1088 18677 18673 0 4 99% 86:22:47
I see articles posted as far back as 20090427, when I created this
server. This makes me believe the 4.3 GB hard drive might be sufficient
for a transit server that doesn't handle alt.* and binaries, and only a
few groups outside the Big-8. Actually I don't care for humanities.*,
soc.* and talk.* either.
With that in mind, I may ask my peers for full feeds in comp.*, news.*,
rec.* and sci.*, and see how it runs.
--
John
No Microsoft, Apple, AT&T, Novell, Trend Micro, nor Ford products were used in the preparation or transmission of this message.
The EULA sounds like it was written by a team of lawyers who want to tell me what I can't do. The GPL sounds like it was written by a human being, who wants me to know what I can do.
Technical Details
Message-ID:
<guran2$7pi$1@optima7.xanadu-bbs.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!news.musoftware.de!wum.musoftware.de!newsfeed.straub-nv.de!feeder.motzarella.org!news.motzarella.org!optima7.xanadu-bbs.net!not-for-mailReferences:
<gts0rg$v7n$1@optima7.xanadu-bbs.net> <gu4ea9$ath$1@news.trigofacile.com> <gu6ksc$oq7$1@optima7.xanadu-bbs.net> <gu6uqv$1ap$1@news.trigofacile.com> <gu804a$4mb$1@optima7.xanadu-bbs.net> <gu8ggp$gic$1@news.trigofacile.com> <gu90j1$d21$1@optima7.xanadu-bbs.net> <gu9nvk$kse$1@news.trigofacile.com> <guc1rv$6qp$1@optima7.xanadu-bbs.net> <8063g6memf.fsf@banana.shacknet.nu> <guch30$aoq$1@optima7.xanadu-bbs.net> <80d4ae2k1j.fsf@banana.shacknet.nu> <gumema$ui2$1@optima7.xanadu-bbs.net> <80vdnzu827.fsf@banana.shacknet.nu> <guph24$oac$1@optima7.xanadu-bbs.net> <803ab3d2vg.fsf@banana.shacknet.nu>Show Full Headers
Complete Article Headers
Message-ID: <guran2$7pi$1@optima7.xanadu-bbs.net> Subject: Re: Logging failures Date: Mon, 18 May 2009 04:45:06 -0500 From: "John F. Morse" <xanadu.bbs@example.invalid> References: <gts0rg$v7n$1@optima7.xanadu-bbs.net> <gu4ea9$ath$1@news.trigofacile.com> <gu6ksc$oq7$1@optima7.xanadu-bbs.net> <gu6uqv$1ap$1@news.trigofacile.com> <gu804a$4mb$1@optima7.xanadu-bbs.net> <gu8ggp$gic$1@news.trigofacile.com> <gu90j1$d21$1@optima7.xanadu-bbs.net> <gu9nvk$kse$1@news.trigofacile.com> <guc1rv$6qp$1@optima7.xanadu-bbs.net> <8063g6memf.fsf@banana.shacknet.nu> <guch30$aoq$1@optima7.xanadu-bbs.net> <80d4ae2k1j.fsf@banana.shacknet.nu> <gumema$ui2$1@optima7.xanadu-bbs.net> <80vdnzu827.fsf@banana.shacknet.nu> <guph24$oac$1@optima7.xanadu-bbs.net> <803ab3d2vg.fsf@banana.shacknet.nu> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!news.musoftware.de!wum.musoftware.de!newsfeed.straub-nv.de!feeder.motzarella.org!news.motzarella.org!optima7.xanadu-bbs.net!not-for-mail Newsgroups: news.software.nntp Organization: Xanadu BBS Lines: 244 Reply-To: dont.bother Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: optima7.xanadu-bbs.net 1242639906 7986 192.168.89.210 (18 May 2009 X-Complaints-To: newsmaster@xanadu-bbs.net NNTP-Posting-Date: Mon, 18 May 2009 09:45:06 +0000 (UTC) User-Agent: Thunderbird 2.0.0.21 (X11/20090318) In-Reply-To: <803ab3d2vg.fsf@banana.shacknet.nu>