On Sun, Mar 13, 2005 at 10:57:38PM +0100, Tore Anderson wrote: > * Finn-Arne Johansen > > > Do you have a short commandline for me ? > > perl -MNet::Domain -e 'print Net::Domain::hostfqdn(),"\n"'
I used something like that yes, with the same result. > On my workstation this returns the same string as "hostname --fqdn". > However, a very interesting fact seems to be that the perl invocation > queries a nameserver, while "hostname --fqdn" does not. > > As I have the fully-qualified hostname correctly specified in > /etc/hosts, there should be no need for the perl module to look in > DNS, as I have "files" specified before "dns" in /etc/nsswitch.conf: > > hosts: files dns > > Another strange thing is that the perl module looks up all kinds of > whacky names - here's the mind-boggling tethereal dump: > ... > > My /etc/resolv.conf contains the following: > > search fud.no linpro.no > nameserver 213.145.167.25 > nameserver 217.13.4.24 > nameserver 217.13.7.140 > > The hostname of the machine is "pride.fud.no", and /etc/hosts contain > the following line: > > 127.0.0.1 pride.fud.no pride localhost > > ...all in all, I cannot see why Net::Domain would want to look up in > DNS, as all the information it needs are available without it. And > why on earth it would try all those crazy names I have no idea. > However, if the DNS server at this point is misconfigured so that it > ends up waiting for some timeout while trying to resolve the crazy > names it is only to be expected that the munin-node postinst takes > ages - the Net::Domain::hostfqdn() function gets called once per > plugin. Well, It somewhat gives the same conclusion that I found - I sent you some bugreports throughout the evening. > I am now fairly confident that this is a bug / misdesign of > Net::Domain and that it should therefore be reassigned to > perl-modules. I'll await your feedback before doing so, though. Seems correct. You reassign then ? -- Finn-Arne Johansen [EMAIL PROTECTED] http://bzz.no/ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]