Bacula-users

[Bacula-users] director won't start

2015-03-26 16:09:33
Subject: [Bacula-users] director won't start
From: Tim Dunphy <bluethundr AT gmail DOT com>
To: "bacula-users AT lists.sourceforge DOT net" <bacula-users AT lists.sourceforge DOT net>
Date: Thu, 26 Mar 2015 16:07:27 -0400
Hey all,

 Ok, well I had an unfortunate incident where I had to rebuild my bacula server. Fortunately I have the entire bacula config puppeted. So I was able to restore config files that I was using when the server was running fine. 

However, even tho that's the case, I am not able to get the bacula director started.

At first it seems to start up ok:

[root@ops:~] #service bacula-dir start
Starting bacula-dir:                                       [  OK  ]

But when you check the status of it, you can see that it's not running.

[root@ops:~] #service bacula-dir status
bacula-dir dead but subsys locked

Checking the bacula log, I see the following output:

[root@ops:~] #tail /var/log/bacula/bacula.log
26-Mar 15:57 bacula-dir JobId 0: Fatal error: Query failed: SELECT VersionId FROM Version: ERR=no such table: Version
26-Mar 15:57 bacula-dir JobId 0: Fatal error: Could not open Catalog "JokefireCatalog", database "bacula".
26-Mar 15:57 bacula-dir JobId 0: Fatal error: Query failed: SELECT VersionId FROM Version: ERR=no such table: Version
26-Mar 15:57 bacula-dir ERROR TERMINATION
Please correct configuration file: /etc/bacula/bacula-dir.conf

Here, it's complaining that it can't do a select from the database. But when I go into the DB myself, I can see it works just fine:

mysql> use bacula
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> SELECT VersionId FROM Version;
+-----------+
| VersionId |
+-----------+
|        14 |
+-----------+
1 row in set (0.00 sec)

And I'm not sure what this error means or how to correct it:

26-Mar 15:57 bacula-dir JobId 0: Fatal error: Could not open Catalog "JokefireCatalog", database "bacula".

And this error seems to be complaining about my bacula director configuration:

26-Mar 16:00 bacula-dir ERROR TERMINATION
Please correct configuration file: /etc/bacula/bacula-dir.conf


Here's my director config in case anyone can spot something wrong in here:

[root@ops:/etc/bacula] #grep -v '#' bacula-dir.conf

  Name = ops.jokefire.com

  QueryFile = "/etc/bacula/query.sql"

  WorkingDirectory = "/var/spool/bacula"

  PidDirectory = "/var/run"

  Maximum Concurrent Jobs = 1

  Messages = Daemon

  TLS Certificate = /etc/pki/tls/certs/ops.jokefire.com.crt

  TLS Key = /etc/pki/tls/private/ops.jokefire.com.key

  TLS CA Certificate File = /etc/pki/CA/certs/ca.crt

  TLS Enable = yes

  TLS Require = yes

}


JobDefs {

  Name = "DefaultJob"

  Type = Backup

  Level = Incremental

  Client = ops.jokefire.com

  FileSet = "Full Set"

  Schedule = "WeeklyCycle"

  Storage = File

  Messages = Standard

  Pool = "Default"

  Priority = 10

  Write Bootstrap = "/var/spool/bacula/%c.bsr"

}


Job {

  Name = "ops.jokefire.com"

  Type = Backup

  Client = ops.jokefire.com

  FileSet = "Full Set"

  Schedule = "WeeklyCycle"

  Storage = File

  Messages = Standard

  Pool = "Default"

  Write Bootstrap = "/var/spool/bacula/%c.bsr"

}


Job {

  Name = "web1.jokefire.com"

  Type = Backup

  Client = web1.jokefire.com

  FileSet = "Full Set"

  Schedule = "WeeklyCycle"

  Storage = File

  Messages = Standard

  Pool = "Default"

  Write Bootstrap = "/var/spool/bacula/%c.bsr"

}


Job {

  Name = "Jokefire BackupCatalog"

  JobDefs = "DefaultJob"

  Level = Full

  FileSet="JokefireCatalog"

  Schedule = "WeeklyCycleAfterBackup"

  RunBeforeJob = "/etc/bacula/make_catalog_backup.pl JokefireCatalog"

  RunAfterJob  = "/etc/bacula/delete_catalog_backup"

  Write Bootstrap = "/var/bacula/%n.bsr"

}


Job {

  Name = "RestoreFiles"

  Type = Restore

  Client=ops.jokefire.com

  FileSet="Full Set"

  Storage = File

  Pool = "Default"

  Messages = Standard

  Where = /backup/tapes/bacula-restores

}


FileSet {

  Name = "Full Set"

  Include {

    Options {

      signature = MD5

    }

    File = /

  }


  Exclude {

    File = /var/bacula

    File = /proc

    File = /tmp

    File = /.journal

    File = /.fsck

    File = /backup

  }

}


Schedule {

  Name = "WeeklyCycle"

  Run = Full 1st sun at 03:05

  Run = Differential 2nd-5th sun at 03:05

  Run = Incremental mon-sat at 03:05

}


Schedule {

  Name = "WeeklyCycleFullBackup"

  Run = Full sun-sat at 02:10

}


Schedule {

  Name = "WeeklyCycleAfterBackup"

  Run = Full sun-sat at 03:10

}


FileSet {

  Name = "JokefireCatalog"

  Include {

    Options {

      signature = MD5

    }

    File = "/var/bacula/bacula.sql"

  }

}


Client {

  Name = ops.jokefire.com

  Address = ops.jokefire.com

  FDPort = 9102

  Catalog = JokefireCatalog

  TLS Certificate = /etc/pki/tls/certs/ops.jokefire.com.crt

  TLS Key = /etc/pki/tls/private/ops.jokefire.com.key

  TLS CA Certificate File = /etc/pki/CA/certs/ca.crt

  TLS Enable = yes

  TLS Require = yes

}


Client {

   Name = web1.jokefire.com

   Address = web1.jokefire.com

   FDPort = 9102

   Catalog = JokefireCatalog

   TLS Certificate = /etc/pki/tls/certs/ops.jokefire.com.crt

   TLS Key = /etc/pki/tls/private/ops.jokefire.com.key

   TLS CA Certificate File = /etc/pki/CA/certs/ca.crt

   TLS Enable = yes

   TLS Require = yes

}


Storage {

  Name = File

  SDPort = 9103

  Password = "secret"

  Device = FileStorage

  Media Type = File

  TLS Certificate = /etc/pki/tls/certs/ops.jokefire.com.crt

  TLS Key = /etc/pki/tls/private/ops.jokefire.com.key

  TLS CA Certificate File = /etc/pki/CA/certs/ca.crt

  TLS Enable = yes

  TLS Require = yes

}



Catalog {

  Name = JokefireCatalog

  dbname = "bacula"; dbuser = "admin"; dbpassword = "secret"

}


Messages {

  Name = Standard


  mailcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: %t %e of %c %l\" %r"

  operatorcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: Intervention needed for %j\" %r"

  mail = bluethundr AT gmail DOT com  = all, !skipped

  operator = bluethundr AT gmail DOT com = mount

  console = all, !skipped, !saved

  append = "/usr/opt/bacula/log/bacula.log" = all, !skipped

  catalog = all

}



Messages {

  Name = Daemon

  mailcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula daemon message\" %r"

  mail = root@localhost = all, !skipped

  console = all, !skipped, !saved

  append = "/var/log/bacula/bacula.log" = all, !skipped

}



Pool {

  Name = "Default"

  Pool Type = Backup

  LabelFormat = "jf-backup-tape-"

}


Pool {

  Name = "File"

  Pool Type = Backup

  LabelFormat = "jf-backup-tape-"

}


Pool {

  Name = Scratch

  Pool Type = Backup

}


Console {

  Name = ops.jokefire.com

  Password = "secret"

  CommandACL = status, .status

}


Thanks! I'd really appreciate your help in this problem. I need to get backups back online again.


Thank you!

Tim



--
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
<Prev in Thread] Current Thread [Next in Thread>