bacula-dir won't start with "undefined symbol: mysql_init"

Bug #1570923 reported by Dirk Fries
160
This bug affects 25 people
Affects Status Importance Assigned to Milestone
bacula (Ubuntu)
Fix Released
High
Unassigned
Xenial
Fix Released
High
Unassigned

Bug Description

[Impact]

 * bacula-dir fails to start after installation.

[Test Case]

 * Install bacula-director-mysql after installing mysql-server. bacula-dir fails to start (and the installation fails).

 * In a successful case, the bacula-dir process will start (and be running after installation).

[Regression Potential]

 * The fix for this is to backport an upstream fix that changes the build to not use libmysqlclient_r.* files (which are no longer shiipped with MySQL 5.7). The regression potential should be low, as bacula-dir currently does not start at all.

1. Ubuntu release :
Description: Ubuntu Xenial Xerus (development branch)
Release: 16.04

2. Version of package
bacula-director-mysql:
  Installed: 7.0.5+dfsg-4build1
  Candidate: 7.0.5+dfsg-4build1
  Version table:
 *** 7.0.5+dfsg-4build1 500
        500 http://de.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
        100 /var/lib/dpkg/status

3. Expectation : bacula-dir should start

4. bacula-dir did not start because of :

root@xenial:~# bacula-dir -d 99
bacula-dir: dird.c:194-0 Debug level = 99
bacula-dir: address_conf.c:264-0 Initaddr 0.0.0.0:9101
root@xenial:~# bacula-dir: dir_plugins.c:148-0 Load dir plugins
bacula-dir: dir_plugins.c:150-0 No dir plugin dir!
bacula-dir: symbol lookup error: /usr/lib/bacula/libbaccats-7.0.5.so: undefined symbol: mysql_init

Dirk Fries (df-x)
summary: - bacula-dir won't st
+ bacula-dir won't start
Revision history for this message
Launchpad Janitor (janitor) wrote : Re: bacula-dir won't start

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in bacula (Ubuntu):
status: New → Confirmed
Revision history for this message
Robin Pronk (robin-romaww) wrote :

bacula-sd and bacula-fd seem to work fine. Problem is in the mysql version of the bacula-director

Revision history for this message
Robin Pronk (robin-romaww) wrote :

This bug should get a high priority.

Do not upgrade your Bacula backup servers to 16.04 before this bug is fixed!

Revision history for this message
Dirk Fries (df-x) wrote :

One more thing to consider :

You can not backup a 7.0.5 bacula-fd as included in Ubuntu 16.04 with a 5.2.6 bacula-dir/-bacula-sd as included in 14.04
So you shouldn't upgrade your clients either until this particular bug is fixed.

A possible workaround if you have absolutely have to upgrade your clients :
The bug does not affect Debian Testing. So you can copy your Configfiles and Database to a Debian Testing System which includes bacula 7.0.5. With this solution you can back up your 16.04 clients until the Bug is fixed in Ubuntu.

Revision history for this message
Robin Pronk (robin-romaww) wrote :

By the way I have build Bacula packages for Xenial based upon Bacula 7.4 and added it to my ppa:
 https://launchpad.net/~robin-romaww/+archive/ubuntu/ppa

Bacula 7.4 OSS is based upon Bacula Enterprise 8.4 and contains many bug fixes and improvements.
The 7.4 director is compatible with 7.0.5 (and older) file daemons so you can use it in a mixed environment.

Don't forget to upgrade your database afterwards (7.2 has a new format, only small changes).
Xenial also includes MySQL 5.7 which has a different standard SQL mode. That causes problems with my bacula database as the bacula default value for timestamps are no longer allowed.
Adding sql_mode='' to the mysql.cnf solves this.

Revision history for this message
Denny (jokes54321) wrote :

Robin, does your PPA work around the bug or will the bug still need to be resolved before your PPA will work?

Revision history for this message
Robin Pronk (robin-romaww) wrote :

@Denny, yes when using the packages from my PPA everything works fine.

Revision history for this message
Ivo Steinmann (isteinmann) wrote :

@Robin, where do I have to set sql_mode='' ? In /etc/mysql/conf.d/mysql.cnf under [mysql]?

Revision history for this message
Robin Pronk (robin-romaww) wrote :

@Ivo: I placed the line in /etc/mysql/mysql.conf.d/mysqld.cnf under [mysqld] as it is a server side config entry.

Revision history for this message
Dragor (gregory-brancq) wrote :

I just tried successfully Robin's ppa installation. Thanks Robin, bacula works again!

Revision history for this message
Tijnfoon (mmarsman) wrote :

Same here, works!

Thanks Robin!

Robie Basak (racb)
Changed in bacula (Ubuntu):
importance: Undecided → High
Revision history for this message
Robie Basak (racb) wrote :

I found that /usr/lib/bacula/libbaccats-mysql.so wasn't properly linked to libmysqlclient in Xenial, even though the build was succeeding. I have fixed this in a test package I have uploaded to my PPA: https://launchpad.net/~racb/+archive/ubuntu/proposed-sru

I appreciate Robin's PPA update, but since that bumps the major Bacula version we cannot fix this bug in Xenial that way. What I've uploaded to my PPA is exactly the version in Xenial with (hopefully) the minimal fix necessary. Please could someone test this, and if it works then I can proceed with updating Xenial for all users? Please note that we will need users to test again one additional time after this when we have the proposed binaries ready for SRU verification.

Robin, thank you for your note about needing to change mysql.cnf. I suggest that users create an additional file in /etc/mysql/mysql.conf.d (eg. bacula.cnf) instead, since this will help with automatic configuration updates to other parts of the mysql.cnf file in future. I have created bug 1577858 to track the need for the mysql.cnf change as this will need a separate fix that we should track separately.

Changed in bacula (Ubuntu):
status: Confirmed → Triaged
Robie Basak (racb)
tags: added: mysql-5.7-transition
Revision history for this message
Hiroaki Hashi (hashiz) wrote :

I test Robie's ppa https://launchpad.net/~racb/+archive/ubuntu/proposed-sru.
bacula-dir work again, but another problem found.

bacula-dir daemon running, but "bconsole" can not connect to daemon.

ahonen% ps -ef | grep bacula
bacula 7832 1 0 16:06 ? 00:00:00 /usr/sbin/bacula-sd -c /etc/bacula/bacula-sd.conf -u bacula -g tape
root 7988 1 0 16:06 ? 00:00:00 /usr/sbin/bacula-fd -c /etc/bacula/bacula-fd.conf
bacula 8665 1 0 16:08 ? 00:00:00 /usr/sbin/bacula-dir -c /etc/bacula/bacula-dir.conf -u bacula -g bacula
ahonen% sudo vi /etc/bacula/bacula-dir.conf
ahonen% bconsole
Connecting to Director localhost:9101
Director authorization problem.
Most likely the passwords do not agree.
If you are using TLS, there may have been a certificate validation error during the TLS handshake.
Please see http://www.bacula.org/en/rel-manual/Bacula_Freque_Asked_Questi.html#SECTION00260000000000000000 for help.

It is not authenticate problem. A cause is, value of Maximum Console Connections is zero.
A default value is not set.

This problem is caused by a hidden bug in the upstream.
In source file src/dird/dird_conf.c:
111 {"maximumconsoleconnections", store_pint32, ITEM(res_dir.MaxConsoleConnect), 0, ITEM_DEFAULT, 20},
store_pint32's symbol address set to static structure.

and

In src/lib/parse_conf.c:
 195 } else if (items[i].handler == store_pint32 ||
 196 items[i].handler == store_int32 ||
 197 items[i].handler == store_size32) {
 198 *(uint32_t *)(items[i].value) = items[i].default_value;

compare hander address to symbol address. but it is not always same address.
If using shared library , it depends on the context .

dird_conf.c linked to /usr/sbin/bacula-dir.
parse_conf.c linked to libbaccfg.so.

So, store_pint32's address is different between first place and second place.
As a result , the default value is not set , it will be zero .

Same problem found in another configuration value. (MaximumConcurrentJobs and more)

Robie Basak (racb)
Changed in bacula (Ubuntu):
assignee: nobody → Norvald H. Ryeng (nryeng)
milestone: none → ubuntu-16.05
Revision history for this message
Dirk Fries (df-x) wrote :

@Robie Basak (racb) : I just tried your packages and they work perfectly.
bacula-dir does start as expected.

But I also found the same bug concerning "bconsole" that was already mentioned by Hiroaki Hashi (hashiz)

Revision history for this message
Robie Basak (racb) wrote :

Hiroaki and Dirk: thank you for testing. Your reports are very useful.

It seems that we have three separate root problems here. The one with mysql linking that my PPA fixes, but also the mysql.cnf sql_mode issue Robin mentioned and this one about bconcole.

It would be best to track these issues in three separate bugs to avoid confusion. I filed bug 1577858 to track the mysql.cnf sql_mode problem. I see that bug 1553563 has already been filed about the bconsole problem. And we'll use this bug to track the mysql linking problem.

If you are affected by the other bugs, please subscribe to the bugs and mark yourself as affected (link near the top left of the page).

Where we are then is that this bug has a fix ready, bug 1577858 has a workaround available, and bug 1553563 needs addressing. When we have a solution for 1553563, hopefully we'll be ready to fix both this and that bug in an update to all users. It seems to me that it makes more sense to go through the SRU process only once for both bugs, so I won't do anything further on this bug until that bug has a proposed fix.

summary: - bacula-dir won't start
+ bacula-dir won't start with "undefined symbol: mysql_init"
Changed in bacula (Ubuntu Xenial):
importance: Undecided → High
status: New → Triaged
Revision history for this message
Liam Ward (liam-dv4) wrote :

Robie - do you have any idea when a fix for the mysql_init bug might flow through the normal updates channel? I have a broken bacula setup here in the office and need to make a call on whether to sit tight.

Thanks.

Revision history for this message
Robie Basak (racb) wrote :

Liam, will you not be blocked by bug 1553563 even with a fix for this mysql_init bug?

Revision history for this message
Liam Ward (liam-dv4) wrote :

Thanks for getting back to me, Robie.

I'm hoping the bconsole issue won't affect me unless there are side effects that I don't understand to that one. I don't use bconsole. I use bat which may or may not have the same problem but, even if it does, my backup jobs are automated so I'm hoping that if the director starts running again it will start running the scheduled jobs.

Revision history for this message
Liam Ward (liam-dv4) wrote :

Robie - do you have any idea when a fix for the mysql_init bug might flow through the normal updates channel? I have a broken bacula setup here in the office and need to make a call on whether to sit tight.

Thanks.

Revision history for this message
Liam Ward (liam-dv4) wrote :

(Ignore my comment #19. Accidentally reposted one of my earlier comments. Sorry. If an admin can delete it - and this one - please do)

Revision history for this message
Robie Basak (racb) wrote :

I'm reassigning from Norvald (MySQL upstream) to Nish (Ubuntu server team) as we have a patch that is confirmed to work. I thought a fix for bug 1553563 needed to land at the same time in order for the fix for this bug to be useful, but based on Liam's comments, perhaps not. I'll let Nish look into this and decide what to do.

Changed in bacula (Ubuntu):
assignee: Norvald H. Ryeng (nryeng) → Nish Aravamudan (nacc)
Revision history for this message
Marcos (markinholiveira) wrote :

I compiled following a pt_BR guide, and it says that, for Ubuntu Xenial, we have to do this before running make:
edit file "bacula-7.4.0/src/cats/Makefile" and modifiy the variable MYSQL_LIBS to:
(64bit)
MYSQL_LIBS = /usr/lib/x86_64-linux-gnu/libmysqlclient.a
(32bit)
MYSQL_LIBS = /usr/lib/i386-linux-gnu/libmysqlclient.a
Then continue running make and make install. Otherwise we would get the error "libbaccats…: undefined symbol“

Revision history for this message
Kern Sibbald (kern) wrote :

Linking of Bacula 7.4.x on Ubuntu 16.04 has the same problem described in this bug report.

It seems to me that something is wrong with the Ubuntu 16.04 packaging of MySQL. Bacula needs libmysqlclient_r.so to work correctly, and that shared library is not installed on Ubuntu 16.04 (at least not on my system). Thus when linking the Bacula catalog library, the mysql_init symbol is not defined. The "fix" in #22 from Marcos may work, but then the client library will be linked directly into Bacula rather than using the system shared object.

Perhaps the libmysqlclient_r.so has been replaced in Ubuntu 16.04 with libmysqlclient.so, but if this is the case, it is somehow confusing the Bacula MySQL build.

Consequently, as far as I am concerned, either the Ubuntu 16.04 package for MySQL is broken or it is changed in a way that is no longer compatible with Bacula or Bacula is no longer compatible with your released MySQL. Can someone clarify this point for me?

Kern Sibbald
Bacula Project Manager

Revision history for this message
Robie Basak (racb) wrote :

Kern,

libmysqlclient_r.so was deprecated in MySQL 5.6 and removed in MySQL 5.7. See comment 12. libmysqlclient.so is thread-safe (and has been for a few MySQL releases) so the _r variant is no longer required. The fix is to simply link against libmysqlclient.so instead.

I am a little surprised that the build succeeds even though the link failed.

My patch is at https://launchpadlibrarian.net/257715711/bacula_7.0.5+dfsg-4build1_7.0.5+dfsg-4ubuntu0.1~ppa1.diff.gz

I intend to land this together with any other required Bacula fixes.

Revision history for this message
Kern Sibbald (kern) wrote :

Robie,

Thank you for your quick response. It makes sense that the default MySQL is thread-safe and there is no _r variant. Your patch looks fine, but please be aware that I suspect that it may link Bacula with the static version of MySQL rather than the shared object (.so), and your patch is good for MySQL 5.7 on Ubuntu 16.04. Unfortunately the patch needed to get Bacula to link properly with MySQL 5.7 and much older MySQL's is considerable more complex with this latest change to how the MySQL client libraries are linked.

I have pushed what I hope is a "generic" fix to Bacula 7.4 to the public git repository. It has commit SHA 50327c9d4. The equivalent "generic" fix for Bacula 7.0 has commit SHA d6de542 and is also in the Bacula public repo.

I imagine you will want to stay with your patch, but my version is also now available.

Feedback from anyone would be appreciated.

Revision history for this message
Kern Sibbald (kern) wrote :

The good news is that I have now build and tested Bacula version 7.4.1 with the patch for getting Bacula to properly link with MySQL 5.7 on Ubuntu 16.04, and it does work.

The bad news is that the "out of the box" MySQL performs very badly to the point of being unusable with Bacula -- it is clearly trashing the disk and runs Bacula jobs 10-15 times slower than on previous MySQL versions. I suspect that someone has by default turned on a sync/flush after every MySQL update. Prior MySQL releases by Ubuntu were relatively efficient. Out of the box they were between 10-20% slower than a slightly tuned PostgreSQL. Now it is 10-15 times slower than an untuned PostgreSQL out of the box on the same computer.

Please let me know if I should open a new ticket on this.

Revision history for this message
Robie Basak (racb) wrote : Re: [Bug 1570923] Re: bacula-dir won't start with "undefined symbol: mysql_init"

On Tue, Jun 14, 2016 at 01:35:05PM -0000, Kern Sibbald wrote:
> Please let me know if I should open a new ticket on this.

Please do. I believe that MySQL upstream are quite keen to help with
this kind of thing. With a separate bug, I can track assignment and
progress separately.

Revision history for this message
Glyn M Burton (modiford) wrote :

I found this thread searching for the exact same error. It's reassuring to see you folks endeavouring to remedy the bug.

Bacula have PPAs for 15.04 and 15.10, which seem short-sighted given the none-LTS nature of these editions; 15.10 is expiring support next month. I cannot find Bacula in the default 14.04 LTS repos. Have they been revoked? Did they ever exist?

In light of all this, would a suggested workaround (for the foreseeable future) be to utilise PostgreSQL? I am quite well versed in MySQL, so my learning curve starts here with PostgreSQL if the answer is 'yes'! Alternative, I am more than happy to accept your guidance on another way forward.

Many thanks to all of you.

Revision history for this message
Glyn M Burton (modiford) wrote :

It would appear utilising PostgreSQL does allow Bacula-Director to start and listen on 9101.

Unfortunately I am getting the "Director authorization problem. / Most likely the passwords do not agree." error, despite triple-checking the Name and Password match perfectly. Granted that's an issue unrelated to this thread.

I conclude that Bacula on Ubuntu is a non-starter and will step away from trialling it as a backup solution. However, I wish you guys well in remedying the current issue.

Revision history for this message
Kern Sibbald (kern) wrote :

This is getting a bit off the subject of this bug report, but ...

The only thing difficult about PostgreSQL with Bacula is getting the authentication to work, and there is a chapter in the Bacula main manual on PostgreSQL that tells how to get Bacula working with it. That said, there is one additional problem that you must explicitly create the user "bacula" within the database using psql. See the postgres documentation on "create user ...". Prior versions were simpler since users were automatically created by the Bacula grant_bacula_privileges script.

I highly recommend using PostgreSQL with Bacula -- it is *much* (10X) faster than MySQL for certain operations. See my bug report on MySQL about MySQL and Bacula.

Revision history for this message
Nish Aravamudan (nacc) wrote :

Hello, I have done some backporting and integrating of the suggestion in LP# 1553563 c11.

Please test the 'fixed' version at: https://launchpad.net/~nacc/+archive/ubuntu/bacula, specifically 7.4.1~dfsg-1.1~ppa7 and report back if it resolves the issue in this bug for you.

Revision history for this message
Nish Aravamudan (nacc) wrote :

Please test the potential fix version at:

https://launchpad.net/~nacc/+archive/ubuntu/bacula

Which results in 7.4.1~dfsg-1ubuntu1~ppa1 on yakkety or 7.4.1~dfsg-1.1~ppa8.is.actually.7.0.5+dfsg-4.1~ppa2 on xenial.

description: updated
Nish Aravamudan (nacc)
Changed in bacula (Ubuntu):
status: Triaged → In Progress
Changed in bacula (Ubuntu Xenial):
status: Triaged → In Progress
Revision history for this message
Kern Sibbald (kern) wrote :

Please note that the above fixes do make Bacula run, but as was discovered in bug #1592749, MySQL runs ~10 times slower than it should. I attach a patch here and in the other bug as well that fixes this problem. The patch is relative to released version 7.4.1, and may (I am not sure) apply correctly after your patch is applied -- in fact, it is a one line addition to my original patch (yours also I think). See bug #1592749 for more details on why this patch is also needed.

Revision history for this message
Kern Sibbald (kern) wrote :
Revision history for this message
Kern Sibbald (kern) wrote :

Oops, sorry, I attached the patch twice :-(

Revision history for this message
Nish Aravamudan (nacc) wrote :

@Kern, thanks for the updates! I will get a new build going ASAP.

Revision history for this message
Nish Aravamudan (nacc) wrote :
Revision history for this message
Nish Aravamudan (nacc) wrote :
Revision history for this message
Nish Aravamudan (nacc) wrote :

@Kern and others affected, I have uploaded to the same PPA (ppa:nacc/bacula) updated packages including the MySQL fix mentioned in LP: #1592749.

Please test the version for your system and report back.

Xenial: 7.4.1~dfsg-1.1~ppa8.is.actually.7.0.5+dfsg-4.1~ppa3
Yakkety: 7.4.1~dfsg-1ubuntu1~ppa2

Thanks,
Nish

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Hi, I've read through the bug and while it seems good progress is being made, AFAICT there isn't anything to be uploaded yet and so I'm going to unsubscribe sponsors. Please give clear instructions when you re-subscribe the team :-)

Revision history for this message
Nish Aravamudan (nacc) wrote :

Hello all,

After reviewing the other open Bacula bugs, I've set up a new PPA with a more normal versioning and (hopefully) fixes to all the issues I know about on 16.04 and 16.10 (and I think handles upgrading from 14.04 to 16.04)

https://launchpad.net/~nacc/+archive/ubuntu/bacula3

16.04: 7.0.5+dfsg-4ubuntu0.1~ppa1
16.10: 7.4.2+dfsg-1ubuntu1~ppa1

Please test these versions and report back, I'd like to see if we can these both sponsored quickly.

Revision history for this message
Nish Aravamudan (nacc) wrote :
Changed in bacula (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Marcus Meyer (marcus-8) wrote :

@Nish

I tried your packages from https://launchpad.net/~nacc/+archive/ubuntu/bacula3

I'm running 16.04.1 LTS since today and I get the following error with your packages:

Run Backup job
JobName: SLIMSERVER
Level: Incremental
Client: slimserver-fd
FileSet: SLIMSERVER FULL Set
Pool: USB-DAILY (From Job resource)
Storage: c1 (From Pool resource)
When: 2016-07-30 17:10:11
Priority: 10
OK to run? (yes/mod/no): yes
Job failed.
You have messages.
*messages
30-Jul 17:10 itx-server-dir JobId 0: Fatal error: sql_create.c:90 Create DB Job record INSERT INTO Job (Job,Name,Type,Level,JobStatus,SchedTime,JobTDate,ClientId,Comment) VALUES ('SLIMSERVER.2016-07-30_17.10.13_07','SLIMSERVER','B','I','C','2016-07-30 17:10:11',1469891411,8,'') failed. ERR=Field 'StartTime' doesn't have a default value

I'm a little bit confused, because the StartTime field is not in the INSERT statement!

Revision history for this message
Nish Aravamudan (nacc) wrote :

@Marcus

Thank you for testing. Can you clarify if this was a 14.04 -> 16.04.1 upgrade?

Can you, to be sure, provide the `apt-cache policy bacula` output?

I don't believe (not 100%) the issue you're hitting is directly related to my backport. StartTime should have a default value of 0, if I'm reading the code right.

Can you also run something like:

mysql -u bacula -p
SHOW COLUMNS FROM Job From bacula LIKE 'StartTime';

and see if a default value is set?

Revision history for this message
Nish Aravamudan (nacc) wrote :

I just did a test upgrade from 14.04 -> 16.04.1 in a lxd:

mysql> show columns from Job from bacula like 'StartTime';
+-----------+----------+------+-----+---------------------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------+----------+------+-----+---------------------+-------+
| StartTime | datetime | YES | | 0000-00-00 00:00:00 | |
+-----------+----------+------+-----+---------------------+-------+

I also did a trivial backup job from the updated bconsole (running from my PPA's version) and it started the job fine.

Revision history for this message
Nish Aravamudan (nacc) wrote :

@Marcus any update? I've been holding off on pushing the bacula updates based upon your testing results.

Nish Aravamudan (nacc)
Changed in bacula:
status: New → Fix Released
Revision history for this message
Rutger Hendriks (rutgerhendriks) wrote :

The PPA from https://launchpad.net/~nacc/+archive/ubuntu/bacula3 works fine for me! Thanks ;-)

Nish Aravamudan (nacc)
Changed in bacula (Ubuntu):
assignee: Nish Aravamudan (nacc) → nobody
Changed in bacula (Ubuntu Xenial):
assignee: nobody → Nish Aravamudan (nacc)
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Dirk, or anyone else affected,

Accepted bacula into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/bacula/7.0.5+dfsg-4ubuntu0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in bacula (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed
Mathew Hodson (mhodson)
affects: bacula → ubuntu-translations
no longer affects: ubuntu-translations
Revision history for this message
Matthew (mfavetti) wrote :

Installed 7.0.5+dfsg-4ubuntu0.1 from proposed and can confirm this fixed the issue with the director service not starting due to the following error:

bacula-dir: symbol lookup error: /usr/lib/bacula/libbaccats-7.0.5.so: undefined symbol: mysql_init

NOTE: bconsole connected fine to the director without required any additional changes

Revision history for this message
Nish Aravamudan (nacc) wrote :

Based upon the prior comment, marking v-d.

tags: added: verification-done
removed: verification-needed
Nish Aravamudan (nacc)
Changed in bacula (Ubuntu Xenial):
assignee: Nish Aravamudan (nacc) → nobody
Revision history for this message
Marc Vanhoomissen (mvh) wrote :

I still have the problem with Ubuntu 16.04 and Bacula 7.0.5:

$ apt-cache madison bacula
    bacula | 7.0.5+dfsg-4build1 | http://be.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
    bacula | 7.0.5+dfsg-4build1 | http://be.archive.ubuntu.com/ubuntu xenial/universe i386 Packages
    bacula | 7.0.5+dfsg-4build1 | http://be.archive.ubuntu.com/ubuntu xenial/universe Sources

$ sudo bacula-dir -tv
bacula-dir: symbol lookup error: /usr/lib/bacula/libbaccats-7.0.5.so: undefined symbol: mysql_init

I read that version 7.4.2 of bacula solves the problem (http://blog.bacula.org/release-7-4-2/ ) Could this be put in the PPA's?

Revision history for this message
Kevin Morgan (kmu0acc) wrote :
Download full text (7.9 KiB)

I apologize before hand if I am not following the accepted protocol. I've been using Ubuntu for only a few weeks and haven't got up to speed with how the whole ecosystem works yet.
The following may be a stream of consciousness but I hope you get enough of the gist of things to tell me what I am doing wrong and how to fix it.

I am still experiencing this bug,

sudo bacula-dir -tv

still gives,

bacula-dir: symbol lookup error: /usr/lib/bacula/libbaccats-7.0.5.so: undefined symbol: mysql_init

Background:-
A clean install on machine with no OS,
lsb_release -a

gives,

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.1 LTS
Release: 16.04
Codename: xenial

Followed instructions on,

https://help.ubuntu.com/lts/serverguide/bacula.html,

to install Bacula. Thought it would install the version for mysql by default. It didn't. So I uninstalled. Installed mysql using,

sudo apt install mysql-server.

Installed OK.
Then,

sudo apt install bacula-client bacula-sd-mysql, bacula-director-mysql

Had few problems with the install menu, got,

'Empty value for 'port' specified , will throw an error in future versions
Error 1067 (42000) at line 90: Invalid default value for 'CleaningDate'.'

the first time around, went around again set up socket type 'tcp/ip', 'localhost', port '3306', and then,

'get error 1050 (42501) at line 7: Table 'Filename' already exists'

presumably because it had already been created first time round.
The menu in this part of the installation (the explanation page for 'abort, retry, retry(without questions), ignore' part) could only be exited by pressing 'esc' as using the arrow keys to navigate to the '<ok>' would not work. The only option that seemed to terminate the installation at this stage was the 'abort' option.

Anyway, it did produce a database for bacula in mysql, can anyone confirm that the following,

+---------------+
| Tables |
+---------------+
| File |
| Filename |
| MediaType |
| Path |
| RestoreObject |
| Storage |
+---------------+

is correct for bacula ?

Used,

sudo apt install bacula

to install the remaining packages 'bacula' & 'bacula-server'
Modified '.conf' files as required.
Tested '.conf' files,

sudo bacula-sd -t -c /etc/bacula/bacula-sd.conf

O.K.

sudo bacula-fd -t -c /etc/bacula/bacula-fd.conf

O.K.

sudo bacula-dir -t -c /etc/bacula/bacula-dir.conf

not O.K. got,

bacula-dir: symbol lookup error: /usr/lib/bacula/libbaccats-7.0.5.so: undefined symbol: mysql_init

Did a search on this on Google and ended up here.

Followed Brian Murray's instruction in #51 above, did as per,

https://wiki.ubuntu.com/Testing/EnableProposed

All O.K. except:-

sudo aptitude -t xenial-proposed

gives,

'sudo: aptitude: command not found'

changed to,

sudo apt -t xenial-proposed

gives,

'E: Command line option 't' [from -t] is not understood in combination with the other options.'

So gave up on this and tried,

sudo apt-get install bacula/xenial-proposed

which gave,

'Reading package lists... Done
Building dependency tree
Reading state information... Done
Selected version '7.0.5+dfsg-4ubuntu0.1' (Ubuntu:16.04/xenial-proposed [all]) for 'ba...

Read more...

Revision history for this message
Nish Aravamudan (nacc) wrote :

Hello Kevin, I'm not sure what is going wrong with your system, but it's definitely not running the proposed packages. I just tested them and they work fine. Please try to find me on #ubuntu (nacc) if you want some help, or you can just wait for the normal update to come through.

Verified with 7.0.5+dfsg-4ubuntu0.1

Revision history for this message
Kevin Morgan (kmu0acc) wrote :

Thanks Nish for getting back to me. I'll wait for the update to come through. What kind of time scale will this be from now, a month, two months or 6 months ?

Revision history for this message
matli (ml-launchpad) wrote :

I got here after upgrading 14.04 to 16.04. At first I got the problem as originally described. Then I installed the proposed packages (7.0.5+dfsg-4ubuntu0.1).

This appears to have solved the original problem. However, I get the same error as Marcus Meyer above:

23-Oct 03:05 tomcat-dir JobId 0: Fatal error: sql_create.c:90 Create DB Job record INSERT INTO Job (Job,Name,Type,Level,JobStatus,SchedTime,JobTDate,ClientId,Comment) VALUES ('Raven.2016-10-23_03.05.01_04','Raven','B','I','C','2016-10-23 03:05:01',1477184701,3,'') failed. ERR=Field 'StartTime' doesn't have a default value

And consequently, checking this in MySQL gives the following:

mysql> SHOW COLUMNS FROM Job From bacula LIKE 'StartTime';
+-----------+----------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------+----------+------+-----+---------+-------+
| StartTime | datetime | NO | | NULL | |
+-----------+----------+------+-----+---------+-------+
1 row in set (0.00 sec)

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package bacula - 7.0.5+dfsg-4ubuntu0.1

---------------
bacula (7.0.5+dfsg-4ubuntu0.1) xenial; urgency=medium

  * debian/patches/libmysqlclient_r.patch: Fix bug where MySQL 5.7 is
    improperly linked on Ubuntu 16.04. Closes LP: #1570923.
  * debian/patches/disable_mysql_NO_ZERO_DATE.patch: Disable
    NO_ZERO_DATE mode for MySQL table creation. Closes LP: #1591397,
    LP: #1577858.
  * d/rules: do not use -Bsymoblic-functions when linking. Closes
    LP: #1553563, LP: #1567824.
  * debian/patches/fix_batch_mode.patch: Detect that MySQL 5.7 is thread
    safe and enable batch mode. Closes LP: #1592749.

 -- Nishanth Aravamudan <email address hidden> Fri, 15 Jul 2016 14:34:59 -0700

Changed in bacula (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Chris J Arges (arges) wrote : Update Released

The verification of the Stable Release Update for bacula has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Kevin Morgan (kmu0acc) wrote :

Just a Postscript to my original message above (#55), in case it is of help to anyone else:-

the bug fix and update has worked for me. I did a fresh install using bacula-director-mysql, followed by 'bacula-client' followed by 'bacula-sd-mysql'. My system has been backing up for a week now with no problems exhibited with regards to this bug.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.