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

Re: bug report (and fix) network up/down delayed 10 seconds



Hello Andrew,

On Thu, Jul 14, 2011 at 12:02:47PM -0400, Andrew wrote:
> Dear Klaus Knopper et al,
> 
> First off, I'd like to take this opportunity to say thanks: I've enjoyed
> using, and learning from, Knoppix immensely over the years.  It's a really
> great thing!
> 
> As to the bug:  The problem is an avahi script mistakenly thinking there
> is a nameserver listening on the local machine, although there is not one.
>  This is really a bug in avahi, not knoppix, per se, and I submitted a bug
> report and a fix for the script to their mailing list.  The script is
> identical in squeeze and sid, so I don't know how long the fix will take
> to propagate into Knoppix.  Meanwhile it affects the usability of Knoppix.
> 
> That said, after an interface is brought up or down, the scripts
>     /etc/network/if-up.d/avahi-daemon
>     /etc/network/if-post-down.d/avahi-daemon -> ../if-up.d/avahi-daemon
> are executed, which in turn execute
>     /usr/lib/avahi/avahi-daemon-check-dns.sh
> which tests to see if there is a local nameserver configured by grepping
> /etc/resolv.conf for the pattern "nameserver", and then the pattern
> "nameserver 127.0.0.1|::1", the first of which finds both lines in the
> default
>     /KNOPPIX/etc/resolv.conf:
>     1: # insert nameservers here
>     2: # nameserver 127.0.0.1
> whereas, the second grep finds line 2 and returns success.  This is
> followed by the script waiting 10 seconds for the nonexistent nameserver
> to reply.  And this happens for every interface, until either a nameserver
> is added to /etc/resolv.conf, or one is started on localhost.

This explains a lot. I already wondered why connecting was slow
sometimes, while I have no problems on other machines running a local
named cache, should have checked all the if-up.d scripts.

> Now, the most expedient and reliable method for me was to replace line 2
> of /etc/resolv.conf with
>     # nameserver <ip address>
> since /etc/resolv.conf is a file I will be paying attention to when
> upgrading Knoppix, unlike /usr/lib/avahi/avahi-daemon-check-dns.sh.

What about changing AVAHI_DAEMON_DETECT_LOCAL=1 to AVAHI_DAEMON_DETECT_LOCAL=0 in
/etc/default/avahi-daemon?

Or, maybe just removing /etc/network/if-up.d/avahi-daemon  and
/etc/network/if-post-down.d/avahi-daemon until it is fixed upstream?
 
> I include a copy of the bug report I e-mailed to the avahi list below,
> just in case anybody is interested.

Thanks & Regards
-Klaus


Reply to: