bconsole does not connect to bacula-director

Bug #508382 reported by Thomas Schweikle
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Ubuntu Server papercuts
Fix Released
Medium
Ante Karamatić
bacula (Ubuntu)
Fix Released
Medium
Ante Karamatić

Bug Description

Binary package hint: bacula

Description: Ubuntu lucid (development branch)
Release: 10.04

ii bacula-client 3.0.2-3ubuntu1 network backup, recovery and verification -
ii bacula-common 3.0.2-3ubuntu1 network backup, recovery and verification -
ii bacula-common-mysql 3.0.2-3ubuntu1 network backup, recovery and verification -
ii bacula-console 3.0.2-3ubuntu1 network backup, recovery and verification -
ii bacula-director-common 3.0.2-3ubuntu1 network backup, recovery and verification -
ii bacula-director-mysql 3.0.2-3ubuntu1 network backup, recovery and verification -
ii bacula-doc 2.4.4-1 Documentation for Bacula
ii bacula-fd 3.0.2-3ubuntu1 network backup, recovery and verification -
ii bacula-sd 3.0.2-3ubuntu1 network backup, recovery and verification -
ii bacula-sd-mysql 3.0.2-3ubuntu1 network backup, recovery and verification -
ii bacula-server 3.0.2-3ubuntu1 network backup, recovery and verification -
ii bacula-traymonitor 3.0.2-3ubuntu1 network backup, recovery and verification -

How to reproduce:
1. Install bacula and dependencies, make sure everything is up and running.
2. try to connect to bacula director with bconsole. The connection will fail after some time exausting:
root@localhost:~# bconsole
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#SECTION003760000000000000000 for help.

MySQL is up and running, "bacula"-datebase is accessible for user "bacula":
root@aesculap:~# mysql -hlocalhost -ubacula -ppontresina bacula
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 58
Server version: 5.1.37-1ubuntu7 (Ubuntu)

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show tables;
+------------------+
| Tables_in_bacula |
+------------------+
| BaseFiles |
| CDImages |
| Client |
| Counters |
| Device |
| File |
| FileSet |
| Filename |
| Job |
| JobHisto |
| JobMedia |
| Location |
| LocationLog |
| Log |
| Media |
| MediaType |
| Path |
| Pool |
| Status |
| Storage |
| UnsavedFiles |
| Version |
+------------------+
22 rows in set (0,00 sec)

Passwords are the same in "/etc/bacula/bacula-dir.conf" and "/etc/bacula/bconsole.conf":
from "/etc/bacula/bacula-dir.conf":
Director { # define myself
  Name = localhost-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 = 1
  Password = "JeZLsj+quecU1NTuNW6rymja5r5zy73/8FCpYsm67ghA" # Console password
  Messages = Daemon
  DirAddress = 127.0.0.1
}

from "/etc/bacula/bconsole.conf":
Director {
  Name = localhost-dir
  DIRport = 9101
  address = localhost
  Password = "JeZLsj+quecU1NTuNW6rymja5r5zy73/8FCpYsm67ghA"
}

Bacula does not work at all, even if it starts without any error message! bacula-director is up and running:
bacula-fd 1987 root 3u IPv4 7304 0t0 TCP *:9102 (LISTEN)
bacula-di 2847 bacula 4u IPv4 15926 0t0 TCP 127.0.0.1:9101 (LISTEN)
bacula-di 2847 bacula 5u IPv4 15935 0t0 TCP 127.0.0.1:9101->127.0.0.1:46749 (ESTABLISHED)
bacula-co 2852 root 3u IPv4 15934 0t0 TCP 127.0.0.1:46749->127.0.0.1:9101 (ESTABLISHED)

Having bacula-console started I am told a connection is established. But there is not output at all! Testing against a system not having bacula-director running, I am immediately told:
root@localhost:~# bconsole
Connecting to Director localhost:9101
16-Jan 14:29 bconsole JobId 0: Fatal error: bsock.c:135 Unable to connect to Director daemon on localhost:9101. ERR=Connection refused

Related branches

Revision history for this message
Mario Sitz (mario-sitz) wrote :

I can confirm this issue.
It seems the same issue as in https://bugs.launchpad.net/karmic-backports/+bug/475347.

If you compile Bacula with LDFLAGS=" ", the console can connect to the director

Chuck Short (zulcss)
Changed in bacula (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Ryan Parrish (ryanparrish) wrote :

I can confirm this bug on my system, and compiling with LDFLAGS = " " seems to resolve it.

Changed in bacula (Ubuntu):
status: Triaged → Confirmed
Revision history for this message
Ante Karamatić (ivoks) wrote :

Provided debdiff solves the issue.

Changed in server-papercuts:
assignee: nobody → Ante Karamatić (ivoks)
Changed in bacula (Ubuntu):
assignee: nobody → Ante Karamatić (ivoks)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package bacula - 3.0.2-3ubuntu3

---------------
bacula (3.0.2-3ubuntu3) lucid; urgency=low

  * debian/rules: add empty LDFLAGS (LP: #508382)
 -- Ante Karamatic <email address hidden> Fri, 26 Feb 2010 15:28:56 +0000

Changed in bacula (Ubuntu):
status: Confirmed → Fix Released
Ante Karamatić (ivoks)
Changed in server-papercuts:
status: New → Fix Released
Thierry Carrez (ttx)
Changed in server-papercuts:
importance: Undecided → Medium
milestone: none → ubuntu-10.04-beta-1
Revision history for this message
luc (luc-maisonobe) wrote :

The same error seems to still be there with version 5.0.1 which is the default version available through synaptic as of 2010-08-22.

Revision history for this message
luc (luc-maisonobe) wrote :

Just noticed I forgot to restart the various daemons after chaniging the passwords.
My comment one hour ago is therefore false, bconsole can connect to director with 5.0.1.
Sorry for the false alarm.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.