inn2 news.daily dies after syslog is rotated

Bug #374843 reported by John F. Morse
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
inn2 (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: inn2

The INN news.notice logging stops when syslog is rotated around 0634 every morning. The /var/log/news/news.notice file then remains at zero bytes.

Restarting INN with "ctlinnd xexec innd" does not restart the news.notice logging. Nor will "rc.news stop" followed by "rc.news start" restart the news.notice logging. It will restart after a reboot though, and run until the next rotation of syslog, etc.

The last news.notice log entry provided with a "tail -F" of news.notice is: "tail: news.notice: file truncated" and the actual news.notice file is zero bytes. It should report: "tail: `news.notice' has been replaced; following end of new file."

It appears INN, or something in the log rotate program(s) is/are not restarting the INN news.notice gathering of entries from syslog (where they actually are appearing properly).

The INN developers and maintainers at news.software.nntp suggested I report this to the Ubuntu package maintainer. I do not know if this is a bug in INN 2.4.4 or Ubuntu 8.04.2 LTS Server Edition.

The problem is on two separate servers. Both are currently updated, upgraded and dist-upgraded.

For reference, I have INN 2.4.3 running flawlessly on Debian Sarge for the past five years.

Linux optima2 2.6.24-24-generic #1 SMP Wed Apr 15 15:54:25 UTC 2009 i586
GNU/Linux

john@optima2:/var/log/news$ cat /etc/debian_version
lenny/sid

john@optima5:~$ sudo lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 8.04.2
Release: 8.04
Codename: hardy

news@optima2:/usr/lib/news/bin$ innconfval -v
INN 2.4.4 (20070806 snapshot)

Revision history for this message
Ray Banana (rayban) wrote :

This problem seems to be caused by sysklogd not re-opening the news.* related log files
during a reload (kill -1). The problem does not occur when sysklogd is restarted instead of
reloaded.

Obviously, sysklog gets the information on which log files it should re-open from
 /usr/sbin/syslogd-listfiles -a. On Ubuntu 8.04, /usr/sbin/syslogd-listfiles -a ignores the news.* related log files
because of

| # These files are handled by news.daily from INN, so we ignore them
| next if (!$opt_news && ($pat =~ /news\.(\*|crit|err|info|notice)/));

I changed this line to

| # 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)/));

and INN now continues to log to news.* after the daily restart of sysklogd.

Ubuntu 9.04 does not have this this problem.

Revision history for this message
John F. Morse (logia) wrote :

Works fine until a Sunday morning weekly cron, then stops.

Revision history for this message
dtaylor84 (davidt-launchpad) wrote :

The change to add "&& !$opt_all " has now broken news.daily.

The problem is that write access to news.{crit,err,info,notice} is needed by both syslog (duh) and news.daily (it copies and truncates the log files each night).

/etc/init.d/sysklogd changes the ownership of all files listed by syslogd-listfiles -a to syslog:adm, and news.daily obviously can't truncate the file, so the logfile and nightly email messages grow without bound.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.