>>>>> On Tue, 17 Apr 2018 17:53:12 +0000, Steve Garcia said:
> 
> OK, in the process of writing out the details of my connection problem for 
> this list, I solved my problem, but I thought I'd document it here.
> 
> The problem was that all of a sudden my backups started failing with a 
> Warning: bsock.c:107 Could not connect to Storage daemon on 
> odin.cs.csubak.edu:9103. ERR=Connection refused 
> 
> After going through everything I could think of (passwords match, is the 
> daemon running, etc.) I thought of everything else on the system I've changed 
> recently.  It turns out that in the process of setting up a monitoring daemon 
> on that server, I had modified the hosts file to assign the normal hostname 
> to localhost.  This is not an uncommon setting, but it seems to break bacula. 
>  It means that when you try to connect to port 9103 on hostname, the 
> connection is now going to go to 127.0.0.1.

I've often wondered: is there a good reason for doing that in the hosts file?


> And it seems that the storage daemon isn't listening on the localhost 
> interface.  This is a configuration directive, but the comments in the 
> default config file, on Debian at least, say "Do not use localhost here."  So 
> I didn't.  

Is that comment in the bacula-dir.conf?  That controls how to connect to the
storage daemon, not what it listens on.

You can control which addresses the storage daemon listens on using the
SDAddress or SDAddresses options in the bacula-sd.conf.  Without either option
(the default), it listens on the wildcard address (i.e. all addresses), but
Debian might have changed that.


> Is there any reason why this should not be localhost?  Do the file daemons 
> connect directly to the storage daemon, or are the mediated through the 
> director?  I was under the impression that since the only passwords the file 
> daemons have is that of the director that there would be no direct connection 
> to storage.  From a security standpoint, I could see advantages for keeping 
> the storage daemon limited to localhost, but obviously not if it needs direct 
> access to file daemons.  
> 
> So does it?

Yes.

The director sends the address (in bacula-dir.conf) of the storage daemon to
the client, which then makes its own connection to the storage daemon.  There
is a picture here:

http://www.bacula.org/9.0.x-manuals/en/main/What_is_Bacula.html#SECTION00220000000000000000

__Martin

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to