🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #81036

Re: Logging failures

#81036
From: John F. Morse
Date: Sat, 16 May 2009 13:22
182 lines
8772 bytes
Hi, Ray.

Ray Banana wrote:

> I don't usually use sysklogd, as I changed to syslog-ng years ago. Out
> of curiosity, I just installed it on a Debian Lenny test system and
> /etc/cron.daily/sysklogd was installed, too. It is exactly the same as
> on the Ubuntu 8.04 system, but I think I found the cause of the problem:
>
> On Debian /usr/sbin/syslogd-listfiles -a also lists the
> /var/log/news/news.* log files, whereas these files are ignored on the
> Ubuntu system even with option -a. Sysklog seems to rely on the
> information from syslogd-listfiles when doing a reload.
>
> The bug is in this line:
>
> Ubuntu 8.04:
>
> |     # These files are handled by news.daily from INN, so we ignore them
> |    next if (!$opt_news && ($pat =~ /news\.(\*|crit|err|info|notice)/));
>     
>
> Debian 5:
>
> |    # These files are handled by news.daily from INN, so we ignore them
> |    next if (!$opt_news &&!$opt_all && ($pat =~ /news\.(\*|crit|err|info|notice)/));
>                          ^^^^^^^^^^^
>   


I applied this to the optima5 server two days ago, and it is rotating
logs correctly and news.notice is logging correctly.

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....

Let me first say that I made the earlier suggested edit to optima2.

Changelog optima2 20090512 /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

It appears to be logging correctly. Syslog shows:

May 16 06:41:30 optima2 exiting on signal 15
tail: `syslog' has been replaced;  following end of new file
May 16 06:41:30 optima2 syslogd 1.5.0#1ubuntu1: restart.


Now for optima5....

The following day for optima5 I added the "&& !$opt_all" fix shown in
the quoted text above.

Changelog optima5 20090513 /usr/sbin/syslogd-listfiles

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:

/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 15 00:00:02

Friday morning I attempted to fix this issue by changing the owner:group
to news:news.

-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

To:

-rw-r--r--  1 news news      0 2009-05-14 00:00 news.crit
-rw-r--r--  1 news news      0 2009-05-14 00:00 news.err
-rw-r--r--  1 news news 134398 2009-05-15 02:32 news.notice

This morning, I again received the "Permission denied" messages in the
Daily Usenet 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 16 00:00:02

I don't know if that last line is a problem or not -- it is now covering
two days.

I checked the owner:group and they had again returned to syslog:adm
instead of news:news. I don't know what (who) is changing this, but it
is a problem.

Below are two directory listings taken about 30 seconds apart, at the
time syslog recorded:

tail: `syslog' has been replaced;  following end of new file
May 16 06:39:31 optima5 syslogd 1.5.0#1ubuntu1: restart.

Note that this syslog report is slightly different than the one above
from optima2. It does not include the "exiting on signal 15" entry.

john@optima5:/var/log/news$ ls -al
total 544
drwxr-sr-x  4 news news   4096 2009-05-16 00:00 .
drwxr-xr-x 10 root root   4096 2009-05-15 06:29 ..
-rw-r--r--  1 news news      0 2009-05-16 00:00 errlog
-rw-rw-r--  1 news news  62453 2009-05-16 00:00 expire.lastlowmark
-rw-rw-r--  1 news news     15 2009-05-16 00:00 expire.list
-rw-rw-r--  1 news news    721 2009-05-16 00:01 expire.log
-rw-rw-r--  1 news news      0 2009-04-21 22:37 innfeed.log
-rw-rw-r--  1 news news   2827 2009-05-14 07:42 innfeed.status
-rw-r--r--  1 news news 135442 2009-05-16 06:20 news
-rw-r--r--  1 news news      0 2009-05-14 00:00 news.crit
-rw-r--r--  1 news news     74 2009-05-15 10:00 news.err
-rw-r--r--  1 news news 290894 2009-05-16 06:35 news.notice
drwxr-xr-x  2 news news   4096 2009-05-16 00:00 OLD
drwxrwxr-x  2 news news   4096 2007-08-10 07:11 path
-rw-r--r--  1 root news     62 2009-05-14 07:15 rc.news
-rw-rw----  1 news news   4617 2009-05-16 00:00 unwanted.log

john@optima5:/var/log/news$ ls -al
total 544
drwxr-sr-x  4 news   news   4096 2009-05-16 00:00 .
drwxr-xr-x 10 root   root   4096 2009-05-16 06:39 ..
-rw-r--r--  1 news   news      0 2009-05-16 00:00 errlog
-rw-rw-r--  1 news   news  62453 2009-05-16 00:00 expire.lastlowmark
-rw-rw-r--  1 news   news     15 2009-05-16 00:00 expire.list
-rw-rw-r--  1 news   news    721 2009-05-16 00:01 expire.log
-rw-rw-r--  1 news   news      0 2009-04-21 22:37 innfeed.log
-rw-rw-r--  1 news   news   2827 2009-05-14 07:42 innfeed.status
-rw-r--r--  1 news   news 135442 2009-05-16 06:20 news
-rw-r--r--  1 syslog adm       0 2009-05-14 00:00 news.crit
-rw-r--r--  1 syslog adm      74 2009-05-15 10:00 news.err
-rw-r--r--  1 syslog adm  290894 2009-05-16 06:35 news.notice
drwxr-xr-x  2 news   news   4096 2009-05-16 00:00 OLD
drwxrwxr-x  2 news   news   4096 2007-08-10 07:11 path
-rw-r--r--  1 root   news     62 2009-05-14 07:15 rc.news
-rw-rw----  1 news   news   4617 2009-05-16 00:00 unwanted.log

Both optima2 and optima7 have news:news for these three log files.

Perhaps something in this patch is causing the changes to the owner:group?

For anyone who just tuned in, the following applies:

optima2 Ubuntu 8.04 LTS Server Edition INN 2.4.4

optima5 Ubuntu 8.04 LTS Server Edition INN 2.4.4

The above two are identical, except for the slight configuration
differences noted earlier.

optima7 Debian 3.1 INN 2.4.3

This is the online server which has been working perfectly since 2006.


-- 
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: <gumema$ui2$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!weretis.net!feeder1.news.weretis.net!newsfeed.datemas.de!feeder.motzarella.org!eternal-september.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>

Show Full Headers
Complete Article Headers
Message-ID: <gumema$ui2$1@optima7.xanadu-bbs.net>
Subject: Re: Logging failures
Date: Sat, 16 May 2009 08:22:18 -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>
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!weretis.net!feeder1.news.weretis.net!newsfeed.datemas.de!feeder.motzarella.org!eternal-september.org!optima7.xanadu-bbs.net!not-for-mail
Newsgroups: news.software.nntp
Organization: Xanadu BBS
Lines: 182
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 1242480138 31298 192.168.89.210 (16 May 2009
X-Complaints-To: newsmaster@xanadu-bbs.net
NNTP-Posting-Date: Sat, 16 May 2009 13:22:18 +0000 (UTC)
User-Agent: Thunderbird 2.0.0.21 (X11/20090318)
In-Reply-To: <80d4ae2k1j.fsf@banana.shacknet.nu>