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:
kill -HUP `cat /var/run/syslog*.pid`
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:
server = new.upstream.example
maxfetch = 100
server = old.upstream.example
Most likely your setup is incorrect. This can have several reasons.
ps ax | grep inetd
ADD : nntp proto=tcp, ...
Inetd will log attempts to invoke leafnode in some logfile, usually /var/log/syslog or /var/log/messages (the exact name depends on the setup of your /etc/syslog.conf). If an error occurs when invoking leafnode, you can find out there what exactly happened.
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.
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.
Here are the two most common occurences which cause this error:
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.
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
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.
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.
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.
Run fetchnews with the -n parameter.
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 -)
This happens when a “slow” function is interrupted by a timeout.