🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #81048

Re: Logging failures

#81048
From: John F. Morse
Date: Sun, 17 May 2009 17:21
184 lines
9210 bytes
Ray Banana wrote:
> Thus spake "John F. Morse" <xanadu.bbs@example.invalid>
>  
>   
>> Thank you for the "fix" and for entering it on the Ubuntu bugs site.
>> Perhaps they will eventually get around to making a fix "official" so it
>> won't be overwritten if the package is later upgraded.
>> However, there are still problems....
>> The following day for optima5 I added the "&& !$opt_all" fix shown in
>> the quoted text above.
>> 125 # These files are handled by news.daily from INN, so we ignore them
>> 126 # next if (!$opt_news && ($pat =~ /news\.(\*|crit|err|info|notice)/));
>> 127 # Above commented out 20090513 and following added (Ray Banana edit)
>> 128 next if (!$opt_news && !$opt_news && ($pat =~
>> /news\.(\*|crit|err|info|notice)/));
>> Optima5 also appears to be logging correctly, but it now has a
>> permissions problem as indicated in the Daily Usenet report:
>> -rw-r--r--  1 syslog adm       0 2009-05-14 00:00 news.crit
>> -rw-r--r--  1 syslog adm       0 2009-05-14 00:00 news.err
>> -rw-r--r--  1 syslog adm  134398 2009-05-15 02:32 news.notice
>>     
>
> syslog seems to be messing around with the news.* logs, when it is
> restarted:
>
> ls -lart /var/log/news/news.*
> -rw-r--r-- 1 news news   3080 2009-05-12 06:36 /var/log/news/news.crit
> -rw-r--r-- 1 news news  99372 2009-05-17 15:28 /var/log/news/news.err
> -rw-r--r-- 1 news news 428022 2009-05-17 15:38 /var/log/news/news.notice
>
> It does not change them when HUPed:
>
> kill -HUP 6704
> root@hubhg01:~# ls -lart /var/log/news/news.*
> -rw-r--r-- 1 news news   3080 2009-05-12 06:36 /var/log/news/news.crit
> -rw-r--r-- 1 news news  99372 2009-05-17 15:28 /var/log/news/news.err
> -rw-r--r-- 1 news news 428022 2009-05-17 15:38 /var/log/news/news.notice
>
> /etc/init.d/sysklogd restart
>  * Restarting system log daemon...                                  [ OK ] 
> root@hubhg01:~# ls -lart /var/log/news/news.*
> -rw-r--r-- 1 syslog adm   3080 2009-05-12 06:36 /var/log/news/news.crit
> -rw-r--r-- 1 syslog adm  99372 2009-05-17 15:28 /var/log/news/news.err
> -rw-r--r-- 1 syslog adm 428022 2009-05-17 15:38 /var/log/news/news.notice
>
> So you will be OK with my change as long as you don't *restart* sysklogd
> or reboot the machine <SIGH>
>
> I need to take a closer look at this behaviour ...
>   


Hi, Ray.

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.

Right now:


-rw-r--r-- 1 syslog adm  481109 2009-05-17 11:45 news.notice


May 14 00:00:02 optima5 innd: SERVER servermode paused
May 14 00:00:02 optima5 innd: SERVER running
May 14 00:01:13 optima5 innd: optima7.xanadu-bbs.net:19 closed seconds
288 accepted 9 refused 0 rejected 0 duplicate 0 accepted size 23081
duplicate size 0
May 14 00:01:17 optima5 innd: SERVER paused Expiring process 6466
May 14 00:01:17 optima5 innd: SERVER running
May 14 00:01:18 optima5 innd: localhost connected 19
...
May 17 12:00:39 optima5 innd: optima7.xanadu-bbs.net connected 19
streaming allowed
May 17 12:00:39 optima5 innd: optima7.xanadu-bbs.net:19 NCmode "mode
stream" received


john@optima5:/var/log/news/OLD$ ls -l
...
-r--r----- 1 news news  28223 2009-05-17 00:00 news.notice.1.gz
-r--r----- 1 news news  18870 2009-05-16 00:00 news.notice.2.gz
-r--r----- 1 news news   9033 2009-05-15 00:00 news.notice.3.gz
...


john@optima5:/var/log/news/OLD$ sudo zless /var/log/news/news.notice.1.gz

May 14 00:00:02 optima5 innd: SERVER servermode paused
May 14 00:00:02 optima5 innd: SERVER running
May 14 00:01:13 optima5 innd: optima7.xanadu-bbs.net:19 closed seconds
288 accepted 9 refused 0 rejected 0 duplicate 0 accepted size 23081
duplicate size 0
...etc...
May 17 00:00:02 optima5 innd: SERVER servermode running
May 17 00:00:02 optima5 innd: CNFS-sm: CNFSflushallheads: flushing 003
May 17 00:00:02 optima5 innd: CNFS-sm: CNFSflushallheads: flushing 004
May 17 00:00:02 optima5 innd: CNFS-sm: CNFSflushallheads: flushing 005
May 17 00:00:02 optima5 innd: CNFS-sm: CNFSflushallheads: flushing 006
May 17 00:00:02 optima5 innd: SERVER paused Flushing log and syslog files
May 17 00:00:02 optima5 innd: SERVER flushlogs paused


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.

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


Three days worth of logging, and the changing permissions problem.

Optima2 is working fine with your first suggested fix in
/etc/cron.daily/syslogd :

45 # Restart syslogd
46 #
47 #/etc/init.d/sysklogd reload-or-restart > /dev/null
48 # Above commented out 20090512 and following added (Ray Banana edit)
49 /etc/init.d/sysklogd restart > /dev/null

Optima2 has the following in /var/log/syslog :
...
-rw-r----- 1 syslog      adm   26178 2009-05-17 12:10 syslog
-rw-r----- 1 syslog      adm  105718 2009-05-17 06:47 syslog.0
-rw-r----- 1 syslog      adm    8058 2009-05-16 06:41 syslog.1.gz
-rw-r----- 1 syslog      adm    8503 2009-05-15 06:34 syslog.2.gz
-rw-r----- 1 syslog      adm    8729 2009-05-14 06:34 syslog.3.gz
-rw-r----- 1 syslog      adm   26259 2009-05-13 06:25 syslog.4.gz
-rw-r----- 1 syslog      adm   22301 2009-05-12 06:47 syslog.5.gz
-rw-r----- 1 syslog      adm   10567 2009-05-11 06:27 syslog.6.gz
...


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


A brand new Debian 5.0.1 install this morning on Optima11:

...
-rw-r----- 1 root adm 87791 2009-05-17 11:51 syslog
...

john@optima11:/var/log/news$ ls -al
total 1
drwxr-xr-x 2 root root 136 2009-05-17 08:22 .
drwxr-xr-x 8 root root 824 2009-05-17 09:24 ..
-rw-r----- 1 root adm    0 2009-05-17 08:22 news.crit
-rw-r----- 1 root adm    0 2009-05-17 08:22 news.err
-rw-r----- 1 root adm    0 2009-05-17 08:22 news.notice

INN is not (yet) installed on optima11, so these files may have their
owner:group changed by the INN APT installer.


-- 
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: <guph24$oac$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.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!feeder.news-service.com!feeder.news-service.com!feeder.motzarella.org!news.motzarella.org!optima7.xanadu-bbs.net!not-for-mail
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>

Show Full Headers
Complete Article Headers
Message-ID: <guph24$oac$1@optima7.xanadu-bbs.net>
Subject: Re: Logging failures
Date: Sun, 17 May 2009 12:21:08 -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>
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.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!feeder.news-service.com!feeder.news-service.com!feeder.motzarella.org!news.motzarella.org!optima7.xanadu-bbs.net!not-for-mail
Newsgroups: news.software.nntp
Organization: Xanadu BBS
Lines: 184
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 1242580868 24908 192.168.89.210 (17 May 2009
X-Complaints-To: newsmaster@xanadu-bbs.net
NNTP-Posting-Date: Sun, 17 May 2009 17:21:08 +0000 (UTC)
User-Agent: Thunderbird 2.0.0.21 (X11/20090318)
In-Reply-To: <80vdnzu827.fsf@banana.shacknet.nu>