[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[leafnode-list] Re: leafnode2 hostname problems



* Matthias Andree <matthias.andree@xxxxxx> :
> Troy Piggins <troy@xxxxxxxxx> writes:
> 
> > * Matthias Andree <matthias.andree@xxxxxx> :
> >> Is that what your system picks up?
> >> Try the "hostname" command, it should print armadillo.
> >
> > $ hostname
> > armadillo
> 
> Fine, that works.
> 
> > Hmm.  Applied the patch.  Recompiled, make installed, restarted
> > xinetd:
> 
> No need to restart xinetd. It will start a new leafnode process (with
> new process and perhaps new configuration) for each and every new
> connection.

Thanks.  Good to know.

> > $ cat /etc/hosts|grep armadillo
> > 127.0.0.1 armadillo.piggo.dyndns.org localhost
> > 192.168.0.1 armadillo dns mail www news
> 
> Still wrong, but the workaround works - for the leafnode daemon at least...

Yeah, I know you said to put both in same line, but I wanted to test
the leafnode hostname directive worked first ;-)

> > $ sudo fetchnews -vvv
> > fetchnews mode: get articles, get headers, get bodies, post articles
> > Internal error: must not try to lock with local host name
> > "armadillo"
> 
> ...but not for others. Some parts of the code haven't changed in years,
> so I simply had forgotten about other parts that still relied on a real FQDN.
> 
> > fetchnews: lockfile /var/spool/news/leaf.node/lock.file exists,
> > abort
> 
> Looks like another cosmetic bug that is misreporting the reason. The
> actual reason is the invalid hostname, which blocked creation of the
> lockfile... There's more of the FQDN confusion. I think I'll rather back
> out the recent change again so that leafnode fails up front, rather than
> later in more subtle ways.
> 
> Background: some people used leafnode over NFS, and I wanted (and still
> want) to prevent two leafnodes setting lockfiles with the same
> hostname. Thus...
> 
> > $ sudo ls -l /var/spool/news/leaf.node/
> 
> ...no lockfile here.
> 
> > Changed /etc/hosts:
> >
> > $ cat /etc/hosts
> > 127.0.0.1	localhost
> > 192.168.0.1 armadillo.piggo.dyndns.org armadillo dns mail www news
> 
> Does leafnode still work if you comment out its
> hostname=... configuration line? It should.

No.  Just tried it.

$ telnet armadillo.piggo.dyndns.org nntp
Trying 192.168.0.1...
Connected to armadillo.piggo.dyndns.org.
Escape character is '^]'.
^]
telnet> Connection closed.

$ telnet localhost nntp
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
200 Leafnode NNTP daemon, version 2.0.0.alpha20060608a at
armadillo.piggo.dyndns.org
^]
telnet> Connection closed.

So it's working on localhost but not using the FQDN.  That's with
hostname commented out in /etc/leafnode/config.

> > $ cat /etc/hosts.allow | grep leafnode
> > leafnode: 127.0.0.1 192.168.0.1
> >
> > Restarted dnsmasq and xinetd.
> >
> > $ telnet armadillo.piggo.dyndns.org nntp
> > Trying 192.168.0.1...
> > Connected to armadillo.piggo.dyndns.org.
> > Escape character is '^]'.
> > Connection closed by foreign host.
> >
> > Not working.
> 
> Troy Piggins <troy@xxxxxxxxx> writes:
> 
> > I should have added this:
> >
> > $ telnet 127.0.0.1 nntp
> > Trying 127.0.0.1...
> > Connected to 127.0.0.1.
> > Escape character is '^]'.
> > 200 Leafnode NNTP daemon, version 2.0.0.alpha20060608a at armadillo.piggo.dyndns.org 
> >
> > telnet> Connection closed.
> >
> > So seems to be working there.  Fetchnews worked also, so it just
> > seems to be telnetting armadillo.piggo.dyndns.org.
> >
> > Setting NNTPSERVER to armadillo.piggo.dyndns.org slrn wouldn't
> > connect.
> 
> As a result of the same issue you observed with telnet.
> 
> What's your xinetd version, and what's in the logs (syslog for daemons
> and syslog for news -- you may need to enable the latter, many systems
> don't capture news logging by default)?

$ dpkg --list | grep xinetd
ii  xinetd                       2.3.14-0ubuntu1            replacement for inetd with many enhancements

> Can you find the xinetd startup messages in the log and show them, and
> the messages around your connection attempt?

$ sudo cat /var/log/syslog|grep xinetd
[snip]
Jun  9 09:21:06 armadillo xinetd[2586]: Exiting...
Jun  9 09:21:06 armadillo xinetd[3538]: Reading included
configuration file: /etc/xinetd.d/chargen [file=/etc/xinetd.conf]
[line=11]
Jun  9 09:21:06 armadillo xinetd[3538]: Reading included
configuration file: /etc/xinetd.d/daytime
[file=/etc/xinetd.d/daytime] [line=28]
Jun  9 09:21:06 armadillo xinetd[3538]: Reading included
configuration file: /etc/xinetd.d/echo [file=/etc/xinetd.d/echo]
[line=26]
Jun  9 09:21:06 armadillo xinetd[3538]: Reading included
configuration file: /etc/xinetd.d/nntp [file=/etc/xinetd.d/nntp]
[line=26]
Jun  9 09:21:06 armadillo xinetd[3538]: Reading included
configuration file: /etc/xinetd.d/time [file=/etc/xinetd.d/time]
[line=13]
Jun  9 09:21:06 armadillo xinetd[3538]: removing chargen
Jun  9 09:21:06 armadillo xinetd[3538]: removing chargen
Jun  9 09:21:06 armadillo xinetd[3538]: removing daytime
Jun  9 09:21:06 armadillo xinetd[3538]: removing daytime
Jun  9 09:21:06 armadillo xinetd[3538]: removing echo
Jun  9 09:21:06 armadillo xinetd[3538]: removing echo
Jun  9 09:21:06 armadillo xinetd[3538]: removing time
Jun  9 09:21:06 armadillo xinetd[3538]: removing time
Jun  9 09:21:06 armadillo xinetd[3538]: xinetd Version 2.3.14
started with libwrap loadavg options compiled in.
Jun  9 09:21:06 armadillo xinetd[3538]: Started working: 1 available
service

When try to telnet armadillo... first, then tried localhost:

Jun  9 10:02:41 armadillo leafnode[4010]: refused connect from
192.168.1.10 (192.168.1.10)
Jun  9 10:02:54 armadillo leafnode[4013]: connect from 127.0.0.1
(127.0.0.1)
Jun  9 10:02:54 armadillo leafnode[4013]: local  host: localhost:119
(127.0.0.1)
Jun  9 10:02:54 armadillo leafnode[4013]: remote host:
localhost:57478 (127.0.0.1)
Jun  9 10:02:54 armadillo leafnode[4013]: unable to open
/etc/leafnode/local.groups: No such file or directory

> Some xinetd versions are picky and may be confused about IPv6 and
> untangling xinetd versions, their exact IPv6 and IPv6-mapped-IPv4
> behavior and perhaps libwrap IPv6 patches can get awkward; perhaps
> "flags = IPv4" in the xinetd configuration file for the leafnode service
> can help - that's not guaranteed, but worth a try.

Ok, I'll add thahat line to /etc/xinetd.d/nntp and see how it goes.

Restarted xinetd but still can't get it to connect to
armadillo.piggo.dyndns.org.  Localhost is fine.

Tried it with hostname reinstated in leafnode/config and still no
go.

Sorry for this.  I am just a localhost user, so /could/ just use
NNTPSERVER localhost, but I thought you'd like to know for other
users who may connect from other hosts etc.

-- 
Troy Piggins
  ,-o   Ubuntu v6.06 (Dapper Drake): kernel 2.6.15-23-server, 
 o   )  postfix 2.2.4, procmail 3.22, mutt 1.5.11i,
  `-o   slrn 0.9.8.1, vim 6.4
-- 
_______________________________________________
leafnode-list mailing list
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
https://www.dt.e-technik.uni-dortmund.de/mailman/listinfo/leafnode-list
http://leafnode.sourceforge.net/