<?xml version="1.0" encoding='ISO-8859-1'?> <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [ <!ENTITY inetd "<application>inetd</application>"> <!ENTITY xinetd "<application>xinetd</application>"> ]> <article> <articleinfo> <author><honorific>Dr</honorific><firstname>Cornelius</firstname><surname>Krasel</surname></author> <author><firstname>Matthias</firstname><surname>Andree</surname> </author> <title>Leafnode FAQ</title> <copyright> <year>2002</year> <holder>Cornelius Krasel</holder> </copyright> <copyright> <year>2002</year> <year>2003</year> <year>2004</year> <year>2005</year> <year>2006</year> <year>2009</year> <holder>Matthias Andree</holder> </copyright> <pubdate role="rcs">$Date: 2006/04/09 17:19:32 $</pubdate> <!-- releaseinfo>$Id: FAQ.xml,v 1.17 2004/09/03 21:14:46 emma Exp $</releaseinfo --> </articleinfo> <sect1 id="FAQ"><title>Leafnode frequently asked questions, with answers.</title> <sect2><title>Installation-related problems, including relocations</title> <qandaset defaultlabel='qanda'> <qandaentry> <question><para>Compiling causes a message 'SA_RESETHAND undeclared'!</para></question> <answer> <para>This means that your operating system is too old and lacks this symbol which is required by POSIX. Please update your operating system. </para> </answer> </qandaentry> <qandaentry> <question><para>I cannot compile leafnode on Linux!</para></question> <answer> <para>Another common reason for the build to fail is that Leafnode depends on some system-specific information which is usually included in the sources of the kernel.</para> <para>Unfortunately, some Linux distribution do not install kernel sources by default; therefore, compilation of Leafnode (and most other programs as well) will fail. The obvious solution is to install the kernel sources. On Linux, if the kernel sources are installed in <filename>/usr/src/linux-a.b.cc</filename> (with a.b.cc being the version number of your kernel), create a symlink to <filename>/usr/src/linux</filename>.</para> </answer> </qandaentry> <qandaentry> <question><para>Where/how do I get the source RPM? I want to modify it.</para></question> <answer><para>You can generate it yourself from the source tarball (which contains the necessary <filename>.spec</filename> file. Just type: <userinput>rpmbuild -ts leafnode-1.11.5.tar.bz2</userinput> – of course, you will have to adjust the version shown here. For RPM 3.x and older, type this instead: <userinput>rpm -ts leafnode-1.11.5.tar.bz2</userinput> </para> </answer> </qandaentry> <qandaentry> <question><para>How do I copy/move the spool?</para></question> <answer><para>There are two important requirements to heed:</para> <orderedlist><listitem><para>You must copy hard links as hard links. There are three supported methods to achieve that. In each of the following examples, replace the source and DEST directories:</para> <itemizedlist><listitem><para>On POSIX compliant systems, use <userinput>mkdir DEST && sudo pax -r -w -p e -H /var/spool/news/ DEST</userinput></para></listitem> <listitem><para>If rsync is installed, use (note the trailing slash!), use <userinput>rsync -aH /var/spool/news/ DEST</userinput></para></listitem> <listitem><para>If GNU cp is installed (it's sometimes called gcp), use <userinput>cp -a /var/spool/news/ DEST</userinput></para></listitem></itemizedlist> <para>If you fail to do this, texpire may expire articles too early. You can repair broken hard links with <userinput>texpire -r</userinput>.</para> </listitem> <listitem><para>You must update the hashed message.id/nnn/ links if you are running leafnode from the new location. Unless the new spool directory has the same name as the old one (if, for instance, moving to a new computer), run <userinput>texpire -r</userinput> before any other leafnode program. Leafnode-1's spool layout unfortunately depends on the name of the spool directory, and when that changes, files may have to be moved between the message.id/nnn/ directories, and <userinput>texpire -r</userinput> does just that - and it also repairs hard links.</para> <para>If you fail to do this, leafnode may not find articles in its spool.</para></listitem></orderedlist> </answer> </qandaentry> </qandaset> </sect2> <sect2><title>Configuration problems</title> <qandaset defaultlabel='qanda'> <qandaentry><question><para>Leafnode refuses to start and tells things about my hostname!</para></question> <answer><para>There is a separate documentation file dedicated to this issue, how to obtain a hostname, and how to tell leafnode about it. Please see <filename>README-FQDN</filename> or <filename>README-FQDN.html</filename> for details.</para></answer></qandaentry> <qandaentry><question><para>Does leafnode support local newsgroups?</para></question> <answer><para>Leafnode 1.x does not support local newsgroups. Leafnode 2.x will do that.</para></answer> </qandaentry> <qandaentry id='nntpds'> <question><para>How do I run leafnode as NNTP+SSL server?</para></question> <answer><para>Wrap leafnode with an SSL wrapper:</para> <orderedlist><listitem><para> Obtain <ulink url='http://stunnel.mirt.net'>stunnel version 3</ulink> and install it. </para></listitem> <listitem><para>Create a certificate and save it to <filename>/etc/leafnode/stunnel.pem</filename>, see the stunnel documentation. Implications such as whether to use signed certificates are beyond the scope of this document.</para></listitem> <listitem><para>Add a configuration to your inetd.conf, xinetd.conf or spawn a new tcpserver process as described in the <filename>INSTALL</filename> document; but instead of <userinput>/usr/local/sbin/leafnode</userinput>, you'll type</para><para> <userinput>/usr/local/sbin/stunnel -f -p /etc/leafnode/stunnel.pem -l /usr/local/sbin/leafnode.</userinput></para></listitem></orderedlist></answer></qandaentry> <qandaentry id='nntps'> <question><para>How do I use fetchnews with NNTP/SSL servers, such as <filename>nntp.sourceforge.net</filename>?</para></question> <answer><para>Warning: SourceForge does not currently support the <command>HEAD</command>, <command>STAT</command> and <command>BODY</command> commands, so leafnode-1 is totally out of the play for now. leafnode-2 will work for lurking, but will likely be unable to post. Sourceforge are aware that we need these commands and will add them at a later time.</para> <orderedlist><listitem><para> Obtain <ulink url='http://stunnel.mirt.net'>stunnel version 3</ulink> and install it. </para></listitem> <listitem><para>Arrange for stunnel to be started at system boot time, try:</para> <para><userinput>/usr/sbin/stunnel -c -d 127.0.0.1:563 -r nntp.sourceforge.net:563</userinput></para> <para>Add</para> <para><programlisting>server = localhost port = 563 username = YOUR_SF_LOGIN password = TOP_SECRET </programlisting></para> <para>to your <filename>/etc/leafnode/config</filename>. </para></listitem> </orderedlist></answer> </qandaentry> </qandaset> </sect2> <sect2><title>Problems at run time</title> <sect3><title>leafnode (the NNTP server)</title> <qandaset defaultlabel='qanda'> <qandaentry><question><para>I cannot post, leafnode tells me the Message-ID is invalid.</para></question> <answer><para>Netscape Communicator, Mozilla and derived products (Beonex) will by default generate the Message-ID from the domain part of your E-Mail address. However, if your address is that of a big freemailer site (hotmail.com, yahoo.com, gmx.de), this will lead to invalid Message-IDs.</para> <para>To work around this, go to the <command>Mail & Newsgroups</command> settings and enclose your E-Mail addresses into double quote marks, like this:<userinput>"matthias.andree@gmx.de"</userinput>This will prevent your Netscape-based newsreader from generating the invalid Message-ID and leave the generation to leafnode.</para></answer></qandaentry> <qandaentry> <question><para>I cannot connect to my newsserver.</para></question> <answer><para>You may not have configured &inetd; or &xinetd; properly, or the corresponding super server is not running. Please review the installation instructions. <link linkend="redhat-xinetd">See below for information specific to Red Hat.</link></para> <para> To test the setup, try: <userinput>telnet localhost 119</userinput>. Leafnode should then reply with (on one line): <screen>200 Leafnode NNTP Daemon, version 1.9.27.rel running at merlin.emma.line.org (my fqdn: merlin.emma.line.org)</screen> </para> </answer> </qandaentry> <qandaentry> <question><para>Remote users cannot connect to leafnode.</para></question> <answer><para>You are connecting from outside the same networks that your leafnode server is in. Leafnode by default refuses connections from outside your LAN to prevent your leafnode server from abuse should you forget to configure tcpd or make a mistake when writing your <filename>hosts.allow</filename> or <filename>hosts.deny</filename> files. Please see <filename>/etc/leafnode/config.example</filename> for the <parameter>allowstrangers</parameter> option and how to configure this option, and its requirements. YOU are responsible for the abuse of your server if this option is enabled, so only give access to people with static IP whom you trust.</para><para>If the clients are on dynamic IP, please use other methods of access instead, for instance SSH tunnels (which are also available on Windows, before you ask).</para></answer> </qandaentry> </qandaset> </sect3> <sect3><title>fetchnews</title> <qandaset> <qandaentry> <question> <para>Fetchnews does not fetch any articles.</para> </question> <answer><para>There are several reasons why this may be the case:</para><itemizedlist> <listitem><para>You did not read any pseudo articles with your news reader. Subscribe to some groups, enter them and read the leafnode placeholder article.</para></listitem> <listitem><para>Your groupinfo file may be corrupt. Run <userinput>fetchnews -f</userinput>.</para></listitem> <listitem><para><filename>/var/spool/news</filename> may have wrong permissions. <filename>/var/spool/news</filename> and all its subdirectories should be owned by user and group news and have permissions drwxrwsr-x (02755).</para></listitem> </itemizedlist></answer> </qandaentry> <qandaentry> <question><para>Fetchnews has problems retrieving new newsgroups.</para></question> <answer><para>Maybe your upstream server supports neither the <command>XGTITLE news.group.name</command> nor the <command>LIST NEWSGROUPS news.group.name</command> command.</para> <para>In this case, add <userinput>nodesc = 1</userinput> to the server entry in <filename>/etc/leafnode/config</filename>, as described in the <citerefentry><refentrytitle>leafnode</refentrytitle><manvolnum>8</manvolnum></citerefentry> manual page and the <filename>/etc/leafnode/config.example</filename> file.</para> </answer> </qandaentry> <qandaentry><question><para>Since the update, fetchnews does not post my new articles!</para></question> <answer><para>You have probably mixed old and new binaries. Check your <filename>inetd.conf</filename> or <filename>xinetd.conf</filename> configuration if they really point to the new binary.</para></answer></qandaentry> <qandaentry> <question> <para>While fetchnews is running, my modem hangs up.</para> </question> <answer><para> An article that causes the interruption may contain three plus signs in a row (<quote>+++</quote>), which many modems interpret as the beginning of a command. You can change or disable this <quote>escape</quote> sequence. Consult your modem's manual, register S2 is a common place to configure this. </para></answer> </qandaentry> <qandaentry><question><para>How can I run fetchnews as regular user (not root)?</para></question> <answer><para>For security reasons, this is not possible.</para> <para>However, there is a tool named <quote>sudo</quote> that allows a regular, unprivileged user to impersonate another user, and this can be used to enable a regular user to run fetchnews.</para> <para><quote>sudo</quote> is available from <ulink url="http://www.courtesan.com/sudo/"></ulink>.</para> <para>If <quote>sudo</quote> is installed on your system, then run <userinput>visudo</userinput> as root and add this line: <programlisting>username ALL = (news) NOPASSWD: /path/to/fetchnews</programlisting> Remember to replace <quote>username</quote> and <quote>/path/to/</quote> with the user's login and the proper path to fetchnews.</para> <para>Now, the user who has been enabled access to fetchnews can just type <userinput>sudo -u news /path/to/fetchnews</userinput> to run fetchnews.</para></answer> </qandaentry> <qandaentry> <question><para>I have unsubscribed from a newsgroup, but fetchnews still pulls articles for that group.</para></question> <answer><para>Your news reader talks to leafnode via the NNTP protocol. This protocol provides no means for Leafnode to determine which newsgroups you are actually subscribe. Therefore, Leafnode assumes that a newsgroup that is not read for a certain time (which can be configured with the <parameter>timeout_long</parameter> parameter) is unsubscribed and will only stop retrieving articles in it after this time.</para> <para>If you are impatient and want to stop retrieving articles from that group immediately, delete the corresponding file in the <filename>/var/spool/news/interesting.groups/</filename> directory. The articles that are already in your spool are still subject to the regular <command>texpire</command> schedule, however.</para></answer> </qandaentry> <qandaentry><question><para>How do I stop fetchnews from unsubscribing from newsgroups?</para></question> <answer><para>Make sure that your newsreader issues GROUP or LIST ACTIVE commands for each of the groups it is subscribed to when checking for new news, so that leafnode can actually see which groups are interesting. For instance, a newsreader configured to read the whole active file with a LIST command may lose subscriptions for low-traffic groups. <link linkend="gnus">See also the Gnus FAQ below.</link></para> <para>As a last resort, change your cron job or ip-up script to run <userinput>fetchnews -n</userinput> rather than just <userinput>fetchnews</userinput>.</para></answer></qandaentry> <qandaentry><question><para>fetchnews is slow, how do I speed it up?</para></question> <answer> <para>If you are using filters, try the article_despite_filter option (introduced in leafnode v1.9.33).</para> <para>If your upstream server does not support XOVER, try using as few of the maxage, maxlines, maxbytes, minlines, maxcrosspost options as possible.</para> </answer></qandaentry> <qandaentry><question><para>fetchnews keeps downloading the full newsgroup list every time it runs</para> </question> <answer><para>Watch the fetchnews output for error messages, if you see a message such as <computeroutput>Reading newsgroups descriptions failed: 501 bad command usage.</computeroutput> then try adding <userinput>nodesc = 1</userinput> blow the server=news.example.org line of the server that showed this error.</para> </answer> </qandaentry> </qandaset> </sect3> <sect3><title>texpire</title> <qandaset> <qandaentry><question><para>Texpire does not expire articles.</para></question><answer><para>The backup software that you are using may not reset the atime after reading a file. Check if you can reconfigure it to reset the <quote>atime</quote>.</para><para>As a workaround, run <userinput>texpire -f</userinput>. This will expire articles somewhat earlier because expiry is then determined from the time the file was last modified, rather than when it was last accessed.</para></answer></qandaentry> <qandaentry><question><para>Texpire message.id counts do not match the sum of the group counts!</para></question> <answer><para>This may happen if texpire has been interrupted previously, crashed, some other application touched the spool or the spool is corrupt.</para></answer></qandaentry> </qandaset> </sect3> </sect2> <sect2><title>Problems with particular newsreaders</title> <qandaset defaultlabel='qanda'> <qandaentry> <question id='gnus'> <para>leafnode loses subscriptions of low-traffic groups with Gnus.</para> </question> <answer> <para>Check the setting of gnus-read-active-file (you can use customize-variable to do that), it should be <userinput>'some</userinput> or <userinput>nil</userinput>. </para> </answer> </qandaentry> <qandaentry> <question id='slrn'> <para>leafnode loses subscriptions of low-traffic groups with slrn.</para> </question> <answer> <para>Check the setting of read_active, it should be <userinput>0</userinput> (the default). </para> </answer> </qandaentry> <qandaentry> <question> <para>When searching news with Netscape, I only get back <quote>unknown command</quote>.</para> </question> <answer> <para> To search news, older versions of Netscape needed a news server which supports the XPAT command. Leafnode-1 does not. If you want to use Netscape, you have to upgrade to version 4.5 and press the <quote>options</quote> button which appears in the <quote>search messages</quote> window. In the box which appears you have to select <quote>on your local system</quote>. </para> </answer> </qandaentry> <qandaentry> <question><para>Outlook Express locks up.</para></question> <answer><para> This can be caused by a corrupted <filename>inbox</filename> file in Outlook Express. It is said to happen during the initial install of Internet Explorer. To fix this problem, go to <quote>Add/Remove Programs</quote>, choose <quote>Internet Explorer</quote>, then <quote>Repair installation.</quote> </para><para>Thanks to Jim Gifford who talked to Microsoft to find this solution.</para></answer> </qandaentry> <qandaentry> <question> <para>Tin complains about a missing file <filename>/var/lib/news/active</filename>.</para> </question> <answer> <para> 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. </para> <para> In the first case, simply invoke tin with the -r flag: <userinput>tin -r</userinput>. If this does not help, try to rebuild the groupinfo file by running <userinput>fetchnews -f</userinput>. </para> </answer> </qandaentry> </qandaset> </sect2> </sect1> <sect1 id="backtrace"><title>Obtaining a stack backtrace</title> <para>This section will tell you how to obtain a <emphasis>stack backtrace</emphasis>, a special program state output that is very useful to somebody who is about to debug a crash.</para> <para>The prerequisite to work is that the program is <emphasis>not stripped</emphasis>, i. e. it contains the debug symbols. That means leafnode must have been installed with <userinput>make install</userinput> rather than <userinput>make install-strip</userinput>. Note that most packagers (for RPM at least) use <userinput>make install-strip</userinput> to save space.</para> <para>To find out if your leafnode installation has been <emphasis>stripped</emphasis>, type <userinput>file /usr/local/sbin/leafnode</userinput> (adjust the path as necessary, packages will usually install to <filename>/usr/sbin/leafnode</filename> instead), here is a sample output of an unstripped program:</para> <para><screen><prompt>$</prompt> <userinput>file /usr/local/sbin/leafnode</userinput> <computeroutput>/usr/local/sbin/leafnode: ELF 32-bit LSB executable, Intel 80386, version 1, dynamically linked (uses shared libs), not stripped</computeroutput></screen></para> <sect2><title>From a core file.</title> <para>This is simple: <orderedlist> <listitem><para>Type <userinput>gdb <replaceable>PROGRAM</replaceable> core</userinput>. Replace PROGRAM by the name of the program that crashed, for example fetchnews.</para></listitem> <listitem><para>Type <userinput>backtrace full</userinput>.</para></listitem> <listitem><para>Type <userinput>quit</userinput>.</para></listitem> </orderedlist> </para></sect2> <sect2><title>Running a program under gdb supervision.</title> <orderedlist> <listitem><para>Type <userinput>gdb <replaceable>PROGRAM</replaceable></userinput>. Replace PROGRAM by the name of the program that crashes, for example fetchnews. Do not give any program options, gdb does not understand them here.</para></listitem> <listitem><para>Type <userinput>run <replaceable>OPTIONS</replaceable></userinput>, where you name the options that you would normally pass to the program itself. Just a plain <userinput>run</userinput> is also fine.</para></listitem> <listitem><para>Wait until the program crashes. The output might look like similar to this:</para> <screen><computeroutput> This GDB was configured as "i686-pc-linux-gnu"...</computeroutput> <prompt>(gdb)</prompt> <userinput>run -vvn</userinput> <computeroutput> Starting program: /tmp/crashme Program received signal SIGSEGV, Segmentation fault. main () at crashme.c:4 4 *x = 4; <prompt>(gdb)</prompt> </computeroutput></screen> </listitem> <listitem><para>Type <userinput>backtrace full</userinput>, this is the desired <emphasis>stack backtrace</emphasis>.</para></listitem> <listitem><para>Type <userinput>quit</userinput> to leave gdb.</para></listitem> </orderedlist></sect2> <sect2><title>From a running/hanging leafnode program.</title> <orderedlist> <listitem><para>Find out the Process ID of the hanging leafnode program. Type <userinput>ps axw | grep <replaceable>PROGRAM</replaceable> | grep -v grep</userinput> on BSD systems and Linux, replacing <replaceable>PROGRAM</replaceable> by the name of the program. Use <userinput>ps -ef</userinput> instead on SysV systems such as Solaris.</para> <para>You will get an output like: <screen> 1995 ? S 0:00 /usr/local/sbin/leafnode </screen> 1995 is the Process ID.</para></listitem> <listitem><para>Then attach gdb: <userinput>gdb <replaceable>PROGRAM</replaceable> <replaceable>12345</replaceable></userinput>, replacing <replaceable>PROGRAM</replaceable> by the program's name and <replaceable>12345</replaceable> by the PID that you have just found out.</para></listitem> <listitem><para>Type <userinput>backtrace full</userinput>.</para></listitem> <listitem><para>Type <userinput>detach</userinput>.</para></listitem> <listitem><para>Type <userinput>quit</userinput>.</para></listitem> </orderedlist> </sect2> </sect1> <sect1 id="redhat-xinetd"> <sect1info> <author> <firstname>William</firstname> <surname>Hooper</surname> </author> </sect1info> <title>Red Hat and the inetd vs. xinetd issue.</title> <para>RedHat Linux has changed stance on &inetd;/&xinetd; over the years. In the 6.x version, &inetd; was used, while &xinetd; is used in the 7.x series and 8.0. Note in the following I make the assumption that the "Gnome workstation" and "KDE workstation" installs are the same in regard to our discussion. Also, when in doubt a simple <userinput>rpm -qa | grep &inetd;</userinput> will show you if either inetd or &xinetd; is installed. The <command>service</command> and <command>chkconfig</command> commands can be used to be sure [x]&inetd; is running and configured to run at boot time. By default, runlevels 3, 4, and 5 start [x]&inetd;.</para> <para>Beginning with Redhat 6.2, &inetd; was broken out as a separate RPM and not included when doing a "Workstation" install. This stands true for the 7.x series (&xinetd; not installed) until 7.3. In Redhat 7.3, &xinetd; was added back to the "Workstation" install as a dependency for "sgi_fam". Note, this change is not reflected in the RH documentation, which states that &xinetd; is not installed in "Workstation" installs. </para> <para>In Redhat 8.0, the install options have changed, now offering a "Personal Desktop" install. When doing a "Workstation" or "Personal Desktop" install &xinetd; is installed as in 7.3, presumably to satisfy the same dependency. </para> <para>In cases where &inetd; is not installed, no other RPMs are required to install it. This means to install it you have three options (for RedHat 6.2 substitute &inetd; instead of &xinetd;): </para> <orderedlist> <listitem><para><emphasis>Best</emphasis> - If you have registered for Redhat's up2date service, just type "up2date xinetd" as root.</para></listitem> <listitem><para><emphasis>Next Best</emphasis> - Install RPM from updates.redhat.com (version numbers current as of 2002-11-10 for RH 7.3). You can manually download the RPM and install it (as root) using <userinput>rpm -ivh xinetd-2.3.9-0.73.i386.rpm</userinput>, or have RPM download it for you by using (again, as root) <userinput>rpm -ivh http://updates.redhat.com/7.3/en/os/i386/xinetd-2.3.9-0.73.i386.rpm</userinput></para> </listitem> <listitem><para><emphasis>Worse</emphasis> - Install the RPM from the original CD. This is usually the worse option because the updates (used above) are released to fix security issues. </para><para> (All as root) First mount the first RH CD by putting it in the CD-ROM and doing a <userinput>mount /mnt/cdrom</userinput>, and install the RPM similar to this: <userinput>cd /mnt/cdrom/Redhat/RPMS/xinetd-2.3.7-2.i386.rpm</userinput>. </para></listitem> </orderedlist> </sect1> </article>