Bacula-users

Re: [Bacula-users] Bacula 7 on FreeBSD, suddenly can't do anything

2015-01-28 10:12:36
Subject: Re: [Bacula-users] Bacula 7 on FreeBSD, suddenly can't do anything
From: Cejka Rudolf <cejkar AT fit.vutbr DOT cz>
To: dweimer AT dweimer DOT net
Date: Wed, 28 Jan 2015 16:09:00 +0100
dweimer wrote (2015/01/27):
> ...

Interesting. What did you do right before "suddenly" actually?
Nothing, or something and somewhere? :o)

> > It had me scratching my head for a while, because it was still half
> > working. My nagios and bacula daemons couldn't find any *.local names
> > anymore, but I could still ping the same machines by name at the
> > command prompt.

It seems that you have some nontrivial DNS configuration? Some local
daemon like named or unbound? Could you show us some example?

ping some.server # what ip is used here? what says tcpdump port domain?
grep some.server /etc/hosts # or is the translation from hosts?
grep hosts /etc/nsswitch.conf # do you have "hosts: files dns" here?
cat /etc/resolv.conf # something suspicious here?
ldd -a /usr/local/bin/bacula-dir | grep libc.so # just /lib/libc.so.7 here?
file /usr/local/bin/bacula-dir # for which FreeBSD is it compiled?

Ping uses gethostbyname2(). Bacula uses getaddrinfo(), if there is
#define HAVE_GETADDRINFO 1 in src/config.h. So ping and bacula could
behave differently, but it is weird. Unfortunately, nslookup and host
use different mechanisms. They skip /etc/hosts for example. So they
can check remote DNS server, but not problems with local translation,
which seems to be your case.

> Yes to .local DNS suffix, ...

And please how?

> morning ran without a hitch. Then Monday night when I went to login 
> after switching my external hard drive for the new week that's when the  
> problems were noticeable. At first it connected, just horribly slow. 
> After a restart of all the Bacula services, I could no longer connect 
> with bconsole on the local machine.

Could you do gdb bconsole and check, that timeout is with name resolution?

And looking into bacula-7.0.5 sources, I think that debug level 100
and tracing on should be sufficient for tracing name resolution
(src/lib/bsock.c and BSOCK::open, then bnet_host2ipaddrs and resolv_host
in bnet.c).

-- 
Rudolf Cejka <cejkar at fit.vutbr.cz> http://www.fit.vutbr.cz/~cejkar
Brno University of Technology, Faculty of Information Technology
Bozetechova 2, 612 66  Brno, Czech Republic

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users