0

Hi!

I have Ubuntu 16.04.1 LTS
And my bacula services:

$ service --status-all | grep bacula
[ + ]  bacula-director
[ + ]  bacula-fd
[ + ]  bacula-sd

Bacula release 5.2.6 (21 February 2012) -- ubuntu 14.04
Bacula director cofig:

Director {                            # define myself
  Name = ubuntu-dir
  DIRport = 9101                # where we listen for UA connections
  QueryFile = "/etc/bacula/scripts/query.sql"
  WorkingDirectory = "/var/lib/bacula"
  PidDirectory = "/var/run/bacula"
  Maximum Concurrent Jobs = 10
  Password = "password-bacula-dir"         # Console password
  Messages = Daemon
  DirAddress = localhost
# DirAddresses = {
#   ip = { addr = 127.0.0.1; port = 9101; }
#   ip = { addr = 10.0.5.71; port = 9101; }
# }
}

bconsole cofig:

Director {
  Name = ubuntu-dir
  DIRport = 9101
  address = localhost
  Password = "password-bacula-dir"
}

$ netstat -anp | grep LISTEN | grep bacula

tcp        0      0 127.0.0.1:9101          0.0.0.0:*               LISTEN      5532/bacula-dir 
tcp        0      0 127.0.0.1:9102          0.0.0.0:*               LISTEN      1091/bacula-fd  
tcp        0      0 127.0.0.1:9103          0.0.0.0:*               LISTEN      1072/bacula-sd  

So, when i use

$ bconsole

get error:

Connecting to Director localhost:9101
Director authorization problem.
Most likely the passwords do not agree.
If you are using TLS, there may have been a certificate validation error during the TLS handshake.
Please see http://www.bacula.org/en/rel-manual/Bacula_Freque_Asked_Questi.html#SECTION00260000000000000000 for help.

where the error can be?

P.S. ufw is disabled

3 Answers3

1

My commands related to RHEL\CentOS and Bacula 5.2.13 (19 February 2013), i don't have Ubuntu instance right now

Try to check your config at first:

bacula-dir -tc path-to-bacula-dir.config
bconsole -tc path-to-bacula-console.config

Then restart bacula director service:

systemctl restart bacula-dir

and check bconsole again

I suppose your bacula director instance has stale configuration (not current from file)

Eugene Lebedev
  • 1,400
  • 1
  • 18
  • 30
0

I had similar problem and the reason was that the password in the director section of bconsole.conf and bacula-dir.conf were not the same. edit the passwords and then restart the services. It should be ok now

-1

I have had this problem before, the solution I found, was to remove the quotes from the password in bacula-dir.conf configuration

Director {
  Name = ubuntu-dir
  DIRport = 9101
  QueryFile = "/etc/bacula/scripts/query.sql"
  WorkingDirectory = "/var/lib/bacula"
  PidDirectory = "/var/run/bacula"
  Maximum Concurrent Jobs = 10
  Password = password-bacula-dir
  Messages = Daemon
  DirAddress = localhost
}

Then bacula's bconsole.conf, leave the quotes surrounding the password:

Director {
  Name = ubuntu-dir
  DIRport = 9101
  address = localhost
  Password = "password-bacula-dir"
}

Then finally restart all the bacula services:

sudo systemctl restart bacula-dir
sudo systemctl restart bacula-sd
sudo systemctl restart bacula-fd

After the restart, you should be able to connect to bconsole using:

sudo bconsole

This worked for me (Ubuntu 16.04)

MrEditor97
  • 80
  • 8
  • you must always put the password in quotes. leave the quotes has some problems. for example if your password be numeric, service bacula-director doesn't start and shows the error message 'Config error: expected a string, got T_NUMBER...' – Omidreza Bagheri Dec 25 '18 at 11:17