Bacula-users

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

2015-03-27 17:57:33
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 17:55:52 -0400
What the fine manual sez, literally:
alternatives --set libbaccats.so /usr/lib64/libbaccats-mysql.so
You might want to "--remove libbaccats-mysql-7.0.5.so" while you're at it.
The long story is /usr/lib[64]/libfoo.so is a symlink to
/etc/alternatives/libfoo.so which is a symlink to
/someplace/libactual.so which is usually a symlink to something else
like /someplace/libactual-1.2.3.so.
So from the above the command line you're supposed to use is obviously
"--set libfoo.so /someplace/libactual.so" -- how could you not see that
plain as day.</sarcasm>

OK! Well sarcasm perhaps deserved. But that is what I tried initially. Literally what was in the mysql quickstart, at first. But when that didn't work is when I tried using  libbaccats-mysql-7.0.5.so.

At any rate, I used alternatives to remove what I had done with libbaccats-mysql-7.0.5.so and then ran the original command again:

[root@ops:/etc/bacula] #alternatives --set libbaccats.so /usr/lib64/libbaccats-mysql.so

Which has always worked for me in the past. But for this time it's not. Wish I knew why. :)

I'm still running into this problem whenever I try to start the director

[root@ops:/etc/bacula] #service bacula-dir start
Starting bacula-dir:                                       [  OK  ]
[root@ops:/etc/bacula] #service bacula-dir status
bacula-dir dead but subsys locked

Even after running that command.

I am not huge fan of alternatives but I think that you are not using it
properly in this case. I believe the command might look like this:
 alternatives --set libbaccats.so /usr/lib64/libbaccats-mysql.so
In order to check the mysql support you might use the command from
previous post (while you were doing debugging). For example:
  bacula-dir -c /etc/bacula/bacula-dir.conf -f -d 200
In the last 25 lines you should see whether mysql.c is mentioned or not.
If you see mysq.c lines following the dir_plugins.c lines then you
can be sure that your bacula-dir now supports mysql.


Ok I tried running that debug command again. And I'm still not seeing any mention of mysql in the output. 

[root@ops:/etc/bacula] #bacula-dir -c /etc/bacula/bacula-dir.conf -f -d 200
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 17:50 bacula-dir ERROR TERMINATION
Please correct configuration file: /etc/bacula/bacula-dir.conf


These are the binaries I have installed:

[root@ops:/etc/yum.repos.d] #rpm -qa | grep bacula
bacula-client-7.0.5-1.el5.x86_64
bacula-storage-7.0.5-1.el5.x86_64
bacula-director-7.0.5-1.el5.x86_64
bacula-libs-sql-7.0.5-1.el5.x86_64
bacula-libs-7.0.5-1.el5.x86_64
bacula-console-7.0.5-1.el5.x86_64
bacula-common-7.0.5-1.el5.x86_64

And those are from the slaanesh-Bacula repository. 

I'm still thinking that my bacula director is just not supporting mysql. 

I would think by this message I'm getting when trying to install bacula mysql:

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

That the new bacula director would support mysql. 

But that doesn't appear to be the case. That alternatives command is pretty straight forward and usually works. Not really sure why it's not working this time around. 

I hope I can get to the bottom of this. I'll keep digging. And I appreciate all your responses, and any help offered.

Thanks
Tim

On Fri, Mar 27, 2015 at 5:25 PM, Josip Deanovic <djosip+news AT linuxpages DOT net> wrote:
Quoting message written on Friday 2015-03-27 16:16:53:
> I tried setting the alternatives this way:
>
> [root@ops:/etc/bacula] #alternatives --set libbaccats-mysql-7.0.5.so
>  /usr/lib64/libbaccats-mysql.so
>
> So I guess I'm still not doing this quite right, because it looks like
> the mysql libraries are still not linked to the bacula director:
>
> [root@ops:/etc/bacula] #ldd $(which bacula-dir)| grep -i mysql
> [root@ops:/etc/bacula] #
>
> Nothing shows up. So what do I need to do to get this working correctly?

bacula-dir binary and libbaccats-mysql-7.0.5.so are completely different
files. Both of these binaries have its own set of libraries they are
linked with.
In other words you don't check bacula-dir with ldd in to check if the
libbaccats-mysql-7.0.5.so is linked with mysqlclient library.

I am not huge fan of alternatives but I think that you are not using it
properly in this case. I believe the command might look like this:
 alternatives --set libbaccats.so /usr/lib64/libbaccats-mysql.so

In order to check the mysql support you might use the command from
previous post (while you were doing debugging). For example:
  bacula-dir -c /etc/bacula/bacula-dir.conf -f -d 200

In the last 25 lines you should see whether mysql.c is mentioned or not.
If you see mysq.c lines following the dir_plugins.c lines then you
can be sure that your bacula-dir now supports mysql.


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