Re: why do the comments in bacula-dir.conf say not to use "localhost" here?

Martin Simmons <[email protected]>
Newsgroups gmane.comp.bacula.user
Message-ID <[email protected]>
>>>>> On Tue, 2 Sep 2025 11:33:04 -0400, Gary Dale said:
> 
> On 2025-09-02 07:22, Dan Langille wrote:
> > On Mon, Sep 1, 2025, at 4:06 PM, Gary Dale wrote:
> >
> >> Can someone please revise the comments to be more reflective of a
> >> typical situation?
> > Let's say a place uses 127.0.0.1 (or localhost). It's up. It's running.
> >
> > An FD (client / bacula-fd) is added. Backups work well. Everything is great.
> >
> > That's it. You're not adding any more clients. Practically speaking, you're done.
> >
> > If you want to add another client, presumably, on another host, it'll be at, let's say 10.0.0.1
> >
> > You configure the job. You run it.
> >
> > bacula-dir contacts bacula-fd (at 10.0.0.1) and says:
> >
> > Backup this FileSet to this bacula-sd (127.0.0.1).
> >
> > Oh. That isn't going to happen.
> >
> > Other considerations. Using certificates is much easier with hostnames than IP addresses.
> >
> > I also suspect many examples, now lost to history, arose before those comments were added in.
> >
> > If your situation is working only with 127.0.0.1 and you'd like to change that, please ask away.
> 
> 
> Well, the particular situation is I can back up my file server fine 
> using 127.0.0.1. However, if I change the address to the local IP 
> address of the server (or the FQDN), it fails to connect to the storage 
> daemon. So, yes, this part is working.

That would happen if you have set SdAddress or SdAddresses to localhost in the
bacula-sd.conf.

Check what "netstat -ta" or "ss -ta" shows for the sd port (9103).

Also, some Linux distros (Debian in particular), put a line like:

127.0.1.1	myhostname.mydomain	myhostname

in /etc/hosts by default, which causes myhostname.mydomain and myhostname to
resolve to 127.0.1.1 on that machine.  I always delete that line because it
causes some subtle problems.

> I also want to backup my workstation. No matter what address I used in 
> bacular-dir.conf, I get a connection refused message when I check the 
> status in bconsole.

This might be the same problem as above, but for FdAddress or FdAddresses in
the workstation's bacula-fd.conf.

__Martin
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.