SSH login takes very long time...sometimes

Rostislav Krasny rosti.bsd at gmail.com
Sun Dec 25 08:42:01 PST 2005


Hi,

I had submitted a bin/62139 PR because of the same problem about a
year ago. I still think there is a bug somewhere in a resolver(3)
library or in libc functions like gethostbyname(). Because of this bug
the gethostbyname() doubles the number of its reverse resolving
requests, in a case the DNS server isn't responding. The other reason
for very long waiting is a default configuration of resolver(5). In
most other systems RES_DFLRETRY is defined as 2, but in FreeBSD it is
defined as 4. In a case the DNS server isn't responding the
gethostbyname() makes 8 (eight!) reverse resolving attempts for one
(!) non-responding DNS server before it returns error. And this is by
default. All that is still true for my current 6.0-STABLE.

http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/62139

As a workaround I may suggest addind "options attempts:2" or even
"options attempts:1" line to the /etc/resolver.conf


More information about the freebsd-stable mailing list