LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Bacula: bacula director does not start (https://www.linuxquestions.org/questions/linux-server-73/bacula-bacula-director-does-not-start-4175438094/)

knilux 11-21-2012 04:25 AM

Bacula: bacula director does not start
 
I want to test Bacula, so I installed it with rpm's on a OpenSUSE box. I use Webmin to configure and control most of the system. The problem is that the Bacula Director does not start. The Storage daemon and the File daemon do start.

I have checked if MySQL is running:

mysql -u bacula -p.
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 12
Server version: 5.5.25a-log Source distribution

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

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

mysql>

This seems to be OK as far as I understand it.

To make sure Bacula can connect to MySQL through its socket, I deleted the socket file: rm /var/run/mysql/mysql.sock.
After that Bacula complains it cannot connect anymore because of the missing socket. This is correct, so there is a connection. After restarting MySQL the socket is back and the error is gone.

I was trying to find problems in the bacula config files like bacula-dir.conf etc., but I could not find any. It is just a default installation. So I experimented with different hostnames, IP adresses instead of localhost and so on. I used Webmin to configure a new backup and tried to start it then, but no luck. When I try to start Bacula with Webmin it says:
Failed to start Bacula: Failed to start bacula-dir:
Bootup mode systemd not supported

I have tried to find log files with information to figure out what can be wrong, but in /var/log/messages there is no info about bacula. The directory /var/log/bacula stays empty all the time.

I have googled for a week now, but still nothing useful. Can anyone here point me in the right direction how to figure out what is going wrong here? I have no clue. Thanks for any help.

Habitual 11-21-2012 01:16 PM

knilux:

Quit deleting stuff. It will never work if you don't stop that now.

Your "understanding" is incomplete. :)

terminal >
Code:

sudo zypper lr
rpm -qa | grep bacula
mysql -u bacula -p -e "show databases;"
netstat -tuna | grep 910[123]

output please.

References for director password:
bacula-dir.conf:
Director { # define myself
...
...
Password = "wyOBa3MKb3VrjtLTSIimqQpXChOkGjmtV6JwboszhkH4" # Console password
...
}

bconsole.conf:
Director {
Name = bacula-dir
DIRport = 9101
address = localhost
Password = "wyOBa3MKb3VrjtLTSIimqQpXChOkGjmtV6JwboszhkH4"
...
}
That value has to match in both the bacula-dir.conf and bconsole.conf.
Then restart bacula services and check with terminal >
Code:

bconsole > status all
Please let us know.

Subscribed with interest,

JJ

knilux 11-22-2012 07:57 AM

Habitual:

Thanks for answering. Indeed, my understanding is incomplete. Below is the output of the commands you gave me. It looks like something is wrong with port 9101? Firewall is off.

Hope this info helps diagnosing. Thanks.


Output of zypper lr:
# | Alias | Naam | Ingeschakeld | Vernieuwen
---+---------------------------+------------------------------------+--------------+-----------
1 | Bacula | Bacula | Ja | Ja
2 | downloads@root | downloads@root | Ja | Ja
3 | openSUSE-12.2-1.6 | openSUSE-12.2-1.6 | Ja | Nee
4 | repo-debug | openSUSE-12.2-Debug | Nee | Ja
5 | repo-debug-update | openSUSE-12.2-Update-Debug | Nee | Ja
6 | repo-debug-update-non-oss | openSUSE-12.2-Update-Debug-Non-Oss | Nee | Ja
7 | repo-non-oss | openSUSE-12.2-Non-Oss | Ja | Ja
8 | repo-oss | openSUSE-12.2-Oss | Ja | Ja
9 | repo-source | openSUSE-12.2-Source | Nee | Ja
10 | repo-update | openSUSE-12.2-Update | Ja | Ja
11 | repo-update-non-oss | openSUSE-12.2-Update-Non-Oss | Ja | Ja

--

output of rpm -qa | grep bacula
bacula-fd-5.2.6-1.13.x86_64
bacula-catalog-sqlite3-5.2.6-1.13.x86_64
bacula-bconsole-5.2.6-1.13.x86_64
bacula-tools-5.2.6-1.13.x86_64
bacula-sd-5.2.6-1.13.x86_64
bacula-sql-5.2.6-1.13.x86_64
bacula-updatedb-5.2.6-1.13.x86_64
bacula-libs-5.2.6-1.13.x86_64
bacula-dir-5.2.6-1.13.x86_64
bacula-sqlite3-5.2.6-1.13.x86_64

--

output of mysql -u bacula -p -e "show databases;"
Enter password: <password>
+--------------------+
| Database |
+--------------------+
| information_schema |
| bacula |
| mysql |
| performance_schema |
+--------------------+

Output of netstat -tuna | grep 910[123]
tcp 0 0 0.0.0.0:9102 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:9103 0.0.0.0:* LISTEN

(note: 9101 is missing here....)

--

Bacula-dir:

Director { # define myself
Name = linux-amuc-dir
DIRport = 9101 # where we listen for UA connections
QueryFile = "/usr/lib64/bacula/query.sql"
WorkingDirectory = "/var/lib/bacula"
PidDirectory = "/var/run"
Maximum Concurrent Jobs = 1
Password = "u45BmKkzEg/ufXD6JCfYNQJDbNmmjlDILNcUzr8e1D/V" # Console password
Messages = Daemon

--

Bconsole:

Director {
Name = linux-amuc-dir
DIRport = 9101
address = 192.168.100.27
Password = "u45BmKkzEg/ufXD6JCfYNQJDbNmmjlDILNcUzr8e1D/V"

(note: passwords match)

--
output of bconsole > status all:

Copyright (C) 2000-2012 Free Software Foundation Europe e.V.

Version: 5.2.6 (21 February 2012) x86_64-suse-linux-gnu suse 5.x

Usage: bconsole [-s] [-c config_file] [-d debug_level]
-D <dir> select a Director
-l list Directors defined
-c <file> set configuration file to file
-d <nn> set debug level to <nn>
-dt print timestamp in debug output
-n no conio
-s no signals
-u <nn> set command execution timeout to <nn> seconds
-t test - read configuration and exit
-? print this message.

I tried bconsole -l:
linux-amuc-dir

--

Habitual 11-23-2012 07:41 AM

What version of OpenSUSE are you using and where did these RPMs come from?
Did you install manually, or use something like OBS or another web-enabled install for OpenSUSE?

Do you have to have 5.2.6 of bacula?

Please let me know, and Please use [code][/code] tags around your
Code:

script(s), or script(s)|command output.
Thank you,

knilux 11-23-2012 10:10 AM

I use OpenSUSE 12.2 and Bacula 5.2.6.
I am not sure what you mean by using "code-tags". These tags should be at the beginning and end of the code to emphasize it?

I will start from scratch and rebuild the server. Maybe it is all messed up now. I will post the results on Monday. Hope you can help me then. Thanks.

Habitual 11-24-2012 06:52 PM

God, I hope you are not re-installing the OS just because bacula-dir won't start.

corp769 11-24-2012 07:05 PM

Quote:

Originally Posted by knilux (Post 4835555)
I use OpenSUSE 12.2 and Bacula 5.2.6.
I am not sure what you mean by using "code-tags". These tags should be at the beginning and end of the code to emphasize it?

I will start from scratch and rebuild the server. Maybe it is all messed up now. I will post the results on Monday. Hope you can help me then. Thanks.

Noooo! Please don't restart from scratch... there is no need, lol.

Habitual 11-25-2012 08:35 AM

Quote:

Originally Posted by knilux (Post 4835555)
...I am not sure what you mean by using "code-tags". These tags should be at the beginning and end of the code to emphasize it?...

See http://www.linuxquestions.org/questi...do=bbcode#code

knilux 11-26-2012 07:17 AM

Code:

God, I hope you are not re-installing the OS just because bacula-dir won't start.
Code:

Noooo! Please don't restart from scratch... there is no need, lol.
Oops! I am afraid I did....LOL!
But the good news is: it only takes me 5 minutes to rebuild the server. Before I started I built a very basic server on a VMware ESXi machine. I only had to copy the template to a new virtual machine.

But I think I solved the problem:

I copied my OpenSUSE 12.2 template to a new virtual machine and added Bacula 5.6.2 and MysQL 5.5.25 with Yast. I could start MySQL with the runlevel editor without any problem. But in the standard config there are only sample databases. I figured that there had to be a way to create the Bacula database. I could not find any reference of that on the Bacula site and the documentation. If anybody knows where it is, please let me know. Maybe I have overlooked it.

I looked around in the new system and found a directory with scripts that looked like config scripts. I suppose these are used when Bacula is compiled by hand with "configure" and "make" commands. The directory in OpenSUSE is: /usr/lib64/bacula. I used the scripts:
create_bacula_database
make_bacula_tables
grant_bacula_privileges

After that I could start Bacula-director, Bacula-SD and Bacula-FD. The only problem was that Webmin still was not able to communicate with Bacula. I found out that this had to do with a missing Perl module: perl-DBD-mysql 4.021-2.1.2. After installing that it all worked fine.

I am not sure whether this procedure is the right one or not. So in case anyone has any comment on that, please let me know. I have experimented with different settings through Webmin, but sometimes the director stops running. This has to do with a setting that has some kind of conflict in the configuration file. As soon as I copy back the original (working) /etc/bacula/bacula-dir.conf file, it all works again. I am not sure where this comes from. It may be from Webmin or Bacula. Does anyone know? I want to test the Bacula web interface to see if that works better than Webmin.

knilux 12-13-2012 07:41 AM

Update:

The Webmin error "systemd not supported" was easily solved by using Yast and add the package "sysv". Yast will complain about a conflict with the current systemd, so that package had to be removed. After that and installing the sysv everything worked fine. Now Webmin was able to restart Bacula, which made configuring a lot easier.

Next challenge is to encrypt the data channel to make secure backups over the internet. I will start a new post for that.

catkin 12-14-2012 04:18 AM

Quote:

Originally Posted by knilux (Post 4837207)
I figured that there had to be a way to create the Bacula database. I could not find any reference of that on the Bacula site and the documentation. If anybody knows where it is, please let me know.

Bacula Main Reference, section 38.2 Installing and Configuring MySQL – Phase II. Or the equivalent for PostgreSQL or SQLite.

catkin 12-14-2012 04:23 AM

Quote:

Originally Posted by knilux (Post 4837207)
... but sometimes the director stops running.

Any error messages? The log location is dependent on how Bacula was built; I do not have access to the sort of system you are running so do not know where yours might be.

If you are unsure about webmin or Bacula's own web interface, and whether they are causing problems, how about administering Bacula from the command line (as it was originally designed for) to ensure you have a working system before trying a web interface?

knilux 12-14-2012 04:57 AM

Code:

Bacula Main Reference, section 38.2 Installing and Configuring MySQL – Phase II. Or the equivalent for PostgreSQL or SQLite.
Thanks Catkin! Just what I was looking for at this very moment! (I am writing my "HOWTO" document now for this project)

Code:

Any error messages?
Unfortunately there were no errormessages in the logfile (/var/log/messages) So it was hard to find out what the problem was. I experimented a bit with the commandline to get used to it. But once this all works someone else will have to use the system and then a GUI is more convenient.

Thanks for your suggestions!

(BTW in the meantime I also solved the encryption problem)

catkin 12-15-2012 12:30 AM

Quote:

Originally Posted by knilux (Post 4849160)
[CODE]Unfortunately there were no errormessages in the logfile (/var/log/messages) ...

Bacula logs to its own log file. Depending on how Bacula is packaged for your system it could be in one of several locations, maybe: /opt/bacula/working/*log, /var/opt/bacula/*log, /var/log/bacula/*log. You could try find / -type d -iname '*bacula*' for a list of directories to look in/under.


All times are GMT -5. The time now is 08:24 AM.