LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-06-2012, 03:43 PM   #1
WhoAmI99
LQ Newbie
 
Registered: Mar 2012
Posts: 8

Rep: Reputation: Disabled
Ubuntu server 11.04 and Bacula 5.0.3 not working


Hi,

So I have Ubuntu server 11.04 with LAMP and Bacula 5.0.3. My problem is with bacula :/. At first the director was not working, the director process crashed after a while because he wasn't able to connect to the mysql server.

I found an error in the defaut director configuration file :
Code:
# vim /etc/bacula/bacula-dir.conf
# Generic catalog service
Catalog {
  Name = MyCatalog
  # Uncomment the following line if you want the dbi driver
  # dbdriver = "dbi:sqlite3"; dbaddress = 127.0.0.1; dbport =
  dbname = "bacula;" DB Address = ""; dbuser = "bacula"; dbpassword = "myPassword"
}
After I change the "bacula;" to "bacula";, the server file deamon (myServer.myDomain-fd) wasn't starting anymore. But the director works now! The file deamon was working before I change that line, and Bacula's still not able to connect to the local mysql server...

The error :
Code:
# /etc/init.d/bacula-fd start
 * Starting Bacula File daemon...  06-Apr 16:27 bacula-fd: ERROR TERMINATION at parse_conf.c:971
Config error: Keyword "FileDaemon" not permitted in this resource.
Perhaps you left the trailing brace off of the previous resource.
            : line 31, col 11 of file /etc/bacula/bacula-fd.conf
FileDaemon {                          # this is me
                                       [fail]
Here is the error in the bacula's log file :
Code:
# vim /var/log/bacula/log

06-Apr 15:21 bacula-dir JobId 0: Fatal error: Could not open Catalog "MyCatalog", database "bacula".
06-Apr 15:21 bacula-dir JobId 0: Fatal error: mysql.c:194 Unable to connect to MySQL server.
Database=bacula User=bacula
MySQL connect failed either server not running or your authorization is incorrect.
06-Apr 15:21 bacula-dir ERROR TERMINATION
Please correct configuration file: /etc/bacula/bacula-dir.conf
I have test if the mysql server was running and it was...
Code:
# ps -ef | grep mysqld
mysql      666     1  0 Apr05 ?        00:00:22 /usr/sbin/mysqld
I have test the mysql password of the bacula user and it's okay...
Code:
# mysql -u bacula -p bacula
Enter password:

[...]

mysql>
So now, only the file deamon and the director's running :
Code:
# ps -ef | grep bacula
bacula   11512     1  0 15:20 ?        00:00:00 /usr/sbin/bacula-sd -c /etc/bacula/bacula-sd.conf -u bacula -g tape
bacula   12948     1  0 16:10 ?        00:00:00 /usr/sbin/bacula-dir -c /etc/bacula/bacula-dir.conf -u bacula -g bacula
What should I do to make Bacula work properly?

Sorry, english's not my native language...
Thank you very much !
 
Old 04-07-2012, 10:09 AM   #2
WhoAmI99
LQ Newbie
 
Registered: Mar 2012
Posts: 8

Original Poster
Rep: Reputation: Disabled
Exclamation

OMG... I just found the error... What a waste of time :/

In the /etc/bacula/bacula-fd.conf file, a "}" was missing! I really don't know how! But whatever... here's the complete solution :

The dbname should be : "bacula"; and not "bacula;".
Code:
# vim /etc/bacula/bacula-dir.conf
370 # Generic catalog service
371 Catalog {
372   Name = MyCatalog
373 # Uncomment the following line if you want the dbi driver
374 # dbdriver = "dbi:sqlite3"; dbaddress = 127.0.0.1; dbport =
375   dbname = "bacula"; DB Address = ""; dbuser = "bacula"; dbpassword = "myPassword"
376 }
Here's the missing "}" :
Code:
# vim /etc/bacula/bacula-fd.conf
 18 #
 19 # Restricted Director, used by tray-monitor to get the
 20 #   status of the file daemon
 21 #
 22 Director {
 23   Name = myServer.myDomain-mon
 24   Password = "myPassword"
 25   Monitor = yes
 26 }
Thanks anyway for those of you who tried to help me!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Server is not working in ubuntu tejasdarji Linux - Server 1 12-28-2009 05:21 PM
working with ubuntu server msound Ubuntu 3 01-09-2008 04:36 PM
How do I install Bacula, but use a MySQL DB on a remote server? kidderuse Linux - Software 0 06-21-2007 03:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration