1

I'm learning how to use bacula, and I followed the instructions from here to configure it.

Now my problem is that I enter in my debian linux terminal

sudo bconsole

Then I get

Connecting to Director 127.0.0.1:9101

and then nothing happens!!!! I just go back to the terminal.

If I don't use sudo, it gives an error that bconsole.conf is not accessible. I tried also to do this from root with su, but also does the same as sudo.

Any ideas? Please assist.

If you require any additional information, please ask for it and I'll provide it.

Thanks.

The Quantum Physicist
  • 24,987
  • 19
  • 103
  • 189
  • is the director running? – umläute Feb 23 '15 at 16:09
  • @umläute Thanks for the response. Yes the director is running. I restarted the service and made sure that no errors come up when doing that. The weird thing is that I don't even get an error message when I try to connect to bacula director. It's just as described in the question, nothing happens. – The Quantum Physicist Feb 23 '15 at 16:25

4 Answers4

2

What version of Bacula are you using?

As one of the more recent versions has a MySQL install glitch, where it will not add all of the tables to the bacula database. Which leads to you not being able to connect to bconsole.

Bacula, however have released an updated version that fixes this problem, however it does require a total reinstall.

Remove using:

sudo apt-get remove --purge bacula*
sudo apt-get autoclean
sudo apt-get autoremove

To remove anything to do with bacula, and any other programs that are not required on your system.

Install using:

sudo apt-get install bacula-director-mysql bacula-common-mysql bacula-sd-mysql

This should allow you to run bacula, as long as you have MySQL installed. This occured for me on Ubuntu 16.04 Server (yours may be slightly different)

MrEditor97
  • 80
  • 8
0

I feel your pain. Bacula has quite a learning curve, and some idiosyncrasies. It's a great system, though.

A couple separate things.

First, you don't need sudo as long as the permissions on the bconsole.conf file are set to allow your user access to it. That's a two-edged sword from a security perspective, because bconsole can allow an attacker access to fairly high-value data, such as the ability to destroy all your backups. Also, an attacker could potentially use the password and director name to access the director later from elsewhere.

Second, when nothing happens and you are right back at the terminal, that indicates that bconsole was not able to connect to the director. To troubleshoot, use netstat -ltnp and make sure that the director is really listening on port 9101, and also that it is listening either on * or on 127.0.0.1, not just on an external IP address.

If that does not help, make sure that the information in bconsole.conf matches the information in bacula-dir.conf. Bacula is somewhat finicky here; both the director name and the password need to match.

Kevin Keane
  • 1,506
  • 12
  • 24
0

I find you also sometimes get a clue by stopping the director as a service and running it interactively in another terminal. Use "bacula-dir -f -v", the -f is foreground mode and -v is for verbose messages. When you next run bconsole, it will use this instance to attempt the connection.

Also, it's always worth a quick "bacula-dir -t" to test the config is ok.

Carl Whalley
  • 3,011
  • 8
  • 33
  • 48
0

In my case the fix was to make the following change in bconsole.conf for the definition of Director:

Changed "address = myhostname" to "address = 127.0.0.1"

You will need to make the same change in bacula-dir.conf for all instances of the "Address" attribute. Note that my bacula server is running in a network without a domain.

Andy
  • 119
  • 1
  • 5