Leafnode FAQ

Dr. Cornelius Krasel, Matthias Andree

2005-10-02

Contents

1 Introduction
2 Questions and Answers
 2.1 I want to change my upstream server
 2.2 I cannot connect to my newsserver
 2.3 tin complains about a missing file “/var/lib/news/active”
 2.4 fetchnews does not fetch any articles
 2.5 When fetching articles, the connection is interrupted by the pppd
 2.6 leafnode generates incorrect/incomplete message IDs
 2.7 fetchnews has problems retrieving new newsgroups
 2.8 texpire does not expire articles
 2.9 When running leafnode in “delaybody” mode, I can only view the headers
 2.10 I want to switch off the automatic unsubscription from newsgroups
 2.11 How do I move the spool to another hard disk?
 2.12 What does ‘Interrupted system call’ mean?

1 Introduction

This document contains answers to some commonly encountered problems.

A good way to approach communication problems with leafnode is to switch on the debugmode. This is done by putting debugmode = 4095 into the leafnode configuration file and then turning on the logging of the debug priority for the facility news in /etc/syslogd.conf. Be warned that the leafnode programs write a lot of information to this channel. To turn on logging, do the following:

  1. Put into /etc/syslogd.conf a line which looks like the one below:
    news.debug /var/log/news.debug
    It is mandatory that the two fields be separated by a tab, not spaces.
  2. Become root and restart the syslog daemon:
    kill -HUP `cat /var/run/syslog*.pid`

2 Questions and Answers

2.1 I want to change my upstream server

I have never done this myself, but leafnode should have no problems with it. Assuming that your new server is called “new.upstream.example” and your old server “old.upstream.example”, I recommend following the procedure outlined below:

  1. Add the following lines to your config file:
    server = new.upstream.example  
    maxfetch = 100
    If you have already another maxfetch defined, reduce it temporarily.
  2. Run fetchnews
  3. Remove
    server = old.upstream.example
    and delete the “maxfetch” line that was introduced in step 1.

2.2 I cannot connect to my newsserver

Most likely your setup is incorrect. This can have several reasons.

You can test your setup by opening a telnet connection to your newsserver. This is done by doing telnet localhost 119. You should get back something like

200 Leafnode NNTP Daemon, version xx running at yy

where xx is the version number and yy your hostname. Type quit after seeing this message. If you don’t get any connection at all or something different, check through the points above.

2.3 tin complains about a missing file “/var/lib/news/active”

Either you have started the wrong version of tin (the one which tries to read news directly from the spool) or your groupinfo file is corrupt.

In the first case, simply invoke tin with the -r flag: tin -r. If this does not help, try to rebuild the groupinfo file by starting fetchnews with the -f flag.

2.4 fetchnews does not fetch any articles

Here are the two most common occurences which cause this error:

2.5 When fetching articles, the connection is interrupted by the pppd

The article which causes the interruption contains three plus signs (“+++”) which is interpreted by a subset of modems as the beginning of a command. You can either change the command introduction sequence or switch off the command completely. Consult the instructions of your modem to find out how this is done.

2.6 leafnode generates incorrect/incomplete message IDs

First you should check whether it is indeed Leafnode which generates the message ID. Leafnode will not touch any message IDs generated by newsreaders (many of which generate message IDs themselves). A message ID that is generated by leafnode has the following general appearance: <local-part.ln@host-name>

The local-part is generated by Leafnode and you cannot influence it. For host-name, Leafnode tries to figure out the name of your computer by calling gethostname(2) and using the return value for a gethostbyname(3) call. Therefore, if you set the name of your computer correctly (using hostname(1) and domainname(1)) you should also get correct message IDs.

If you don’t want to change the name of your machine, you can change the part of the Message-ID behind the @ sign by putting

hostname = my.correct.hostname.example
in your config file. For more information, see the leafnode(8) man page.

2.7 fetchnews has problems retrieving new newsgroups

Maybe your upstream server supports neither the “XGTITLE news.group.name” nor the “LIST NEWSGROUPS news.group.name” command. In this case, add nodesc to your server entry as described in leafnode(8) and the config.example file.

2.8 texpire does not expire articles

Run texpire with the -f parameter. This will expire articles somewhat earlier because the time of last access on the files will be ignored. If you have an urgent need to free some space in your spool directory, reduce the expiry time in the config file and re-run texpire -f.

2.9 When running leafnode in “delaybody” mode, I can only view the headers

This is a problem of newsreaders that cache articles, among them Netscape, Outlook Express GNOME Pan and KNode, not a problem of Leafnode.

These programs store read articles in the cache and (for some odd reason) refuse to reload an article that has been already read.

Try switching the cache off, clearing the cache, or use a different newsreader.

2.10 I want to switch off the automatic unsubscription from newsgroups

Run fetchnews with the -n parameter.

2.11 How do I move the spool to another hard disk?

This operation is only supported with leafnode-2.

It is important that the hard links remain intact.

The rest of the paragraph assumes that you wish to copy the spool from /var/spool/news to /mnt/spool/news and that you are logged in as the root or news user.

If you are on a GNU system, it’s simple: you can just use GNU cp like this:

cp -ax /var/spool/news /mnt/spool/news

If you have rsync installed, you can use (the trailing slashes “/” are important):

rsync -aHx /var/spool/news/ /mnt/spool/news/

If you have another cp variant than GNU, but are on a POSIX (“UNIX”) system, you’d use instead:

( cd /var/spool/news && tar cf - . ) \  
| (cd /mnt/spool/news && tar xpf -)

2.12 What does ‘Interrupted system call’ mean?

This happens when a “slow” function is interrupted by a timeout.