Bacula-users

Re: [Bacula-users] can't connect to director

2014-07-28 07:05:49
Subject: Re: [Bacula-users] can't connect to director
From: Bill Arlofski <waa-bacula AT revpol DOT com>
Date: Mon, 28 Jul 2014 06:59:35 -0400
On 07/27/14 16:58, Tim Dunphy wrote:
> Hey thanks for the follow up!
> 
> I tried setting up this entry in my /etc/hosts file:
> 
> 127.0.0.1   localhost   localhost.localdomain ops.mydomain.com
> <http://ops.mydomain.com>
> 
> And bounced the bacula-dir daemon. Then I launched bconsole and was able to
> get in! It looks like the database connection had to be made via the TCP
> socket and connect via the loopback address. But whatever the reason, that
> above entry in /etc/hosts solved the problem!

Tim, a few of things to be aware of and to not confuse:


1. On Linux systems (and probably other *nixs) the default method for an
application to connect to a MySQL db when the application and client are on
the same machine is via unix socket, not via TCP. On Gentoo servers this is
default: /var/run/mysqld/mysqld.sock  it is surely somewhere else on other
distros though. :)

2. bconsole connects to bacula-dir via TCP port 9101 and does not use a unix
socket for communication.  bconsole also does not talk to the database,
bconsole talks to bacula-dir, and bacula-dir talks to the db.

3. If your bconsole is local to the machine that bacula-dir is running on, and
bacula-dir is bound to all interfaces (the default setting), then you can
always set the "address = " that bconsole connects to to either "localhost",
"127.0.0.1", or an IP address bound to the server's ethernet NIC(s).

4. Setting a name in /etc/hosts is (almost) always the wrong thing to do.
Especially pointing the name to localhost (127.0.0.1).

You will surely end up with unexpected results somewhere else down the road.

If you want/need to use a FQDN instead of an IP address to connect to systems,
you should create and maintain "A" records in your dns server.

5. You did not need to restart the bacula-dir since it was already running,
and bound to TCP/9101 on all interfaces as we previously determined.


Hope this helps to clarify some things.


Bill



-- 
Bill Arlofski
Reverse Polarity, LLC
http://www.revpol.com/
-- Not responsible for anything below this line --

------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users