Bacula-users

Re: [Bacula-users] director won't start

2015-03-27 12:54:21
Subject: Re: [Bacula-users] director won't start
From: Tim Dunphy <bluethundr AT gmail DOT com>
To: Josip Deanovic <djosip+news AT linuxpages DOT net>
Date: Fri, 27 Mar 2015 12:52:13 -0400
Hi Josip,



I am pretty much sure that after the two lines that contain
"dir_plugins.c", you should see several lines mentioning "mysql.c"

Are you sure that your bacula-dir has been compiled with mysql support?
You could probably check that with the command such as:
 ldd /path/to/your/bacula-dir | grep mysql


Ok I think you're right about this! Here's what I get when I do an ldd against the binary:

 [root@ops:~] #ldd $(which bacula-dir)
        libbacfind-7.0.5.so => /usr/lib64/libbacfind-7.0.5.so (0x00002aaaaaab8000)
        libbacsql-7.0.5.so => /usr/lib64/libbacsql-7.0.5.so (0x00002aaaaacc5000)
        libbaccats-7.0.5.so => /usr/lib64/libbaccats-7.0.5.so (0x00002aaaaaeee000)
        libbaccfg-7.0.5.so => /usr/lib64/libbaccfg-7.0.5.so (0x00002aaaab0f5000)
        libbac-7.0.5.so => /usr/lib64/libbac-7.0.5.so (0x00002aaaab2ff000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00002aaaab568000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00002aaaab785000)
        libwrap.so.0 => /lib64/libwrap.so.0 (0x00002aaaab989000)
        libssl.so.6 => /lib64/libssl.so.6 (0x00002aaaabb92000)
        libcrypto.so.6 => /lib64/libcrypto.so.6 (0x00002aaaabde1000)
        libcap.so.1 => /lib64/libcap.so.1 (0x00002aaaac132000)
        libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00002aaaac336000)
        libm.so.6 => /lib64/libm.so.6 (0x00002aaaac637000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00002aaaac8ba000)
        libc.so.6 => /lib64/libc.so.6 (0x00002aaaacac8000)
        libsqlite3.so.0 => /usr/lib64/libsqlite3.so.0 (0x00002aaaace22000)
        libz.so.1 => /lib64/libz.so.1 (0x00002aaaad07d000)
        /lib64/ld-linux-x86-64.so.2 (0x0000555555554000)
        libnsl.so.1 => /lib64/libnsl.so.1 (0x00002aaaad292000)
        libgssapi_krb5.so.2 => /usr/lib64/libgssapi_krb5.so.2 (0x00002aaaad4aa000)
        libkrb5.so.3 => /usr/lib64/libkrb5.so.3 (0x00002aaaad6d8000)
        libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00002aaaad96e000)
        libk5crypto.so.3 => /usr/lib64/libk5crypto.so.3 (0x00002aaaadb70000)
        libkrb5support.so.0 => /usr/lib64/libkrb5support.so.0 (0x00002aaaadd96000)
        libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00002aaaadf9e000)
        libresolv.so.2 => /lib64/libresolv.so.2 (0x00002aaaae1a0000)
        libselinux.so.1 => /lib64/libselinux.so.1 (0x00002aaaae3b6000)
        libsepol.so.1 => /lib64/libsepol.so.1 (0x00002aaaae5ce000)


No mention of MySQL!!!

If I do a yum search for references to mysql and bacula:

[root@ops:~] #yum search bacula| grep mysql
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
Repository kbs-CentOS-Extras is listed more than once in the configuration
Repository kbs-CentOS-Testing is listed more than once in the configuration
bacula-director-mysql.x86_64 : Bacula Director with MySQL database support
bacula-storage-mysql.x86_64 : MySQL Bacula storage daemon files

That's what I get.

If I go:

[root@ops:~] #yum install bacula-director-mysql.x86_64

I get:

Package bacula-director-mysql is obsoleted by bacula-director, trying to install bacula-director-7.0.5-1.el5.x86_64 instead
Package bacula-director-7.0.5-1.el5.x86_64 already installed and latest version
Nothing to do


I used this yum repo to install bacula 7

[root@ops:~] #cat /etc/yum.repos.d/slaanesh-Bacula-epel-5.repo
[slaanesh-Bacula]
name=Copr repo for Bacula owned by slaanesh
baseurl=http://copr-be.cloud.fedoraproject.org/results/slaanesh/Bacula/epel-5-$basearch/
skip_if_unavailable=True
gpgcheck=1
gpgkey=http://copr-be.cloud.fedoraproject.org/results/slaanesh/Bacula/pubkey.gpg
enabled=1

Maybe this is some sort of funky repo that's not giving me what I need? Any thoughts?

Thanks!

Tim
On Fri, Mar 27, 2015 at 12:34 PM, Josip Deanovic <djosip+news AT linuxpages DOT net> wrote:
Quoting message written on Friday 2015-03-27 12:08:27:
> Ok, I've verified that director is down, only storage and file daemons
> are running:
>
> [root@ops:~] #ps -ef | grep bacula | grep -v grep
> root     12915     1  0 Mar26 ?        00:00:00 bacula-fd -c
> /etc/bacula/bacula-fd.conf -u root -g root
> bacula   26664     1  0 00:21 ?        00:00:00 bacula-sd -c
> /etc/bacula/bacula-sd.conf -u bacula -g disk
>
> And this is what I get when I run that command:
>
> [root@ops:~] #bacula-dir -c /etc/bacula/bacula-dir.conf -d 200 -f
> bacula-dir: dird.c:194-0 Debug level = 200
> bacula-dir: address_conf.c:264-0 Initaddr 0.0.0.0:9101
> bacula-dir: runscript.c:284-0 runscript: debug
> bacula-dir: runscript.c:285-0  --> RunScript
> bacula-dir: runscript.c:286-0   --> Command=/etc/bacula/
> make_catalog_backup.pl JokefireCatalog
> bacula-dir: runscript.c:287-0   --> Target=
> bacula-dir: runscript.c:288-0   --> RunOnSuccess=1
> bacula-dir: runscript.c:289-0   --> RunOnFailure=0
> bacula-dir: runscript.c:290-0   --> FailJobOnError=1
> bacula-dir: runscript.c:291-0   --> RunWhen=2
> bacula-dir: runscript.c:284-0 runscript: debug
> bacula-dir: runscript.c:285-0  --> RunScript
> bacula-dir: runscript.c:286-0   -->
> Command=/etc/bacula/delete_catalog_backup
> bacula-dir: runscript.c:287-0   --> Target=
> bacula-dir: runscript.c:288-0   --> RunOnSuccess=1
> bacula-dir: runscript.c:289-0   --> RunOnFailure=0
> bacula-dir: runscript.c:290-0   --> FailJobOnError=1
> bacula-dir: runscript.c:291-0   --> RunWhen=1
> bacula-dir: jcr.c:128-0 read_last_jobs seek to 192
> bacula-dir: jcr.c:135-0 Read num_items=10
> bacula-dir: dir_plugins.c:148-0 Load dir plugins
> bacula-dir: dir_plugins.c:150-0 No dir plugin dir!
> bacula-dir: dird.c:972-0 Could not open Catalog "JokefireCatalog",
> database "bacula".
> bacula-dir: dird.c:977-0 Query failed: SELECT VersionId FROM Version:
> ERR=no such table: Version
> 27-Mar 12:04 bacula-dir ERROR TERMINATION
> Please correct configuration file: /etc/bacula/bacula-dir.conf
>
> It looks like it can't find a catalog by the name "JokefireCatalog". But
> it used to be there before some data got deleted.
>
> So is this a physical file on the file system that it's not finding?  Or
> is this an entry in the database that it's not finding? Any ideas how
> to correct this?

JokefireCatalog is just the name of the database definition (Catalog
resource) in your bacula director configuration. It is not stored
on disk nor in the database. There is nothing magic or special about
it.

Output says that bacula failed to open the Catalog JokefireCatalog
which actually means that it couldn't connect to the database thus
failed executing SQL queries.

>From the output you have sent I would say that you are missing libraries
or support needed to connect to your mysql server.

I am pretty much sure that after the two lines that contain
"dir_plugins.c", you should see several lines mentioning "mysql.c"

Are you sure that your bacula-dir has been compiled with mysql support?
You could probably check that with the command such as:
 ldd /path/to/your/bacula-dir | grep mysql


I thinkg this is it.


--
Josip Deanovic

------------------------------------------------------------------------------
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



--
GPG me!!

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


On Fri, Mar 27, 2015 at 12:34 PM, Josip Deanovic <djosip+news AT linuxpages DOT net> wrote:
Quoting message written on Friday 2015-03-27 12:08:27:
> Ok, I've verified that director is down, only storage and file daemons
> are running:
>
> [root@ops:~] #ps -ef | grep bacula | grep -v grep
> root     12915     1  0 Mar26 ?        00:00:00 bacula-fd -c
> /etc/bacula/bacula-fd.conf -u root -g root
> bacula   26664     1  0 00:21 ?        00:00:00 bacula-sd -c
> /etc/bacula/bacula-sd.conf -u bacula -g disk
>
> And this is what I get when I run that command:
>
> [root@ops:~] #bacula-dir -c /etc/bacula/bacula-dir.conf -d 200 -f
> bacula-dir: dird.c:194-0 Debug level = 200
> bacula-dir: address_conf.c:264-0 Initaddr 0.0.0.0:9101
> bacula-dir: runscript.c:284-0 runscript: debug
> bacula-dir: runscript.c:285-0  --> RunScript
> bacula-dir: runscript.c:286-0   --> Command=/etc/bacula/
> make_catalog_backup.pl JokefireCatalog
> bacula-dir: runscript.c:287-0   --> Target=
> bacula-dir: runscript.c:288-0   --> RunOnSuccess=1
> bacula-dir: runscript.c:289-0   --> RunOnFailure=0
> bacula-dir: runscript.c:290-0   --> FailJobOnError=1
> bacula-dir: runscript.c:291-0   --> RunWhen=2
> bacula-dir: runscript.c:284-0 runscript: debug
> bacula-dir: runscript.c:285-0  --> RunScript
> bacula-dir: runscript.c:286-0   -->
> Command=/etc/bacula/delete_catalog_backup
> bacula-dir: runscript.c:287-0   --> Target=
> bacula-dir: runscript.c:288-0   --> RunOnSuccess=1
> bacula-dir: runscript.c:289-0   --> RunOnFailure=0
> bacula-dir: runscript.c:290-0   --> FailJobOnError=1
> bacula-dir: runscript.c:291-0   --> RunWhen=1
> bacula-dir: jcr.c:128-0 read_last_jobs seek to 192
> bacula-dir: jcr.c:135-0 Read num_items=10
> bacula-dir: dir_plugins.c:148-0 Load dir plugins
> bacula-dir: dir_plugins.c:150-0 No dir plugin dir!
> bacula-dir: dird.c:972-0 Could not open Catalog "JokefireCatalog",
> database "bacula".
> bacula-dir: dird.c:977-0 Query failed: SELECT VersionId FROM Version:
> ERR=no such table: Version
> 27-Mar 12:04 bacula-dir ERROR TERMINATION
> Please correct configuration file: /etc/bacula/bacula-dir.conf
>
> It looks like it can't find a catalog by the name "JokefireCatalog". But
> it used to be there before some data got deleted.
>
> So is this a physical file on the file system that it's not finding?  Or
> is this an entry in the database that it's not finding? Any ideas how
> to correct this?

JokefireCatalog is just the name of the database definition (Catalog
resource) in your bacula director configuration. It is not stored
on disk nor in the database. There is nothing magic or special about
it.

Output says that bacula failed to open the Catalog JokefireCatalog
which actually means that it couldn't connect to the database thus
failed executing SQL queries.

>From the output you have sent I would say that you are missing libraries
or support needed to connect to your mysql server.

I am pretty much sure that after the two lines that contain
"dir_plugins.c", you should see several lines mentioning "mysql.c"

Are you sure that your bacula-dir has been compiled with mysql support?
You could probably check that with the command such as:
 ldd /path/to/your/bacula-dir | grep mysql


I thinkg this is it.


--
Josip Deanovic

------------------------------------------------------------------------------
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



--
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