Hi Dan,

On Sunday 26 August 2007 03:34:25 pm Dan Langille wrote:
> On 26 Aug 2007 at 15:01, Ivan Adzhubey wrote:
> > Hi,
> >
> > I have upgraded to bacula installation on our old RedHat 8.0 server to
> > version 2.2.0 recently. It was built from sources with MySQL support
> > enabled (including batch inserts). MySQL version installed is 3.23.58.
> > Now I am getting the following errors when bacula attempts to despool
> > file attributes data to database:
> >
> > 26-Aug 09:28 rosalind-sd: Committing spooled data to Volume
> > "Chromosome0003". Despooling 241,852,094,775 bytes ...
> > 26-Aug 13:26 rosalind-sd: Despooling elapsed time = 03:58:39, Transfer
> > rate = 16.89 M bytes/second
> > 26-Aug 13:28 rosalind-sd: Sending spooled attrs to the Director.
> > Despooling 222,747,250 bytes ...
> > 26-Aug 13:29 rosalind-dir: fantom-dataOut.2007-08-25_15.36.23 Fatal
> > error: Can't fill Path table Query failed: INSERT INTO Path (Path)       
> >  SELECT a.Path FROM              (SELECT DISTINCT Path             FROM
> > batch) AS a WHERE NOT EXISTS                (SELECT Path                 
> >     FROM Path AS p                WHERE p.Path = a.Path)     : ERR=You
> > have an error in your SQL syntax near 'SELECT DISTINCT Path            
> > FROM batch) AS a WHERE NOT EXISTS    ' at line 1
> >
> > It looks like director tries to use nested query here, which is not
> > supported in MySQL 3.x. Is there any way to build bacula 2.2.0 with
> > support for MySQL 3.x? There used to be a ./configure option for that but
> > it is gone in 2.2.0.
>
> Ouch, no, I don't think so.
>
> The only practical solution I see for you is to upgrade MySQL.

I did and bumped into more problems. I am pretty desperate at the moment and 
would appreciate any help. If someone could, please forward this to a devel 
list also (I am not subscribed, may be I should be).

I have upgraded to MySQL 5.0.45 (latest stable from MySQL.com, built from 
src.rpm). I also installed development rpm, together with server and client. 
Datatbase server runs perfectly well. I had my bacula database dumped from 
previous MySQL version 3.23.58 and successfully restored under upgraded 
server. I have recreated all priviliges for bacula user manually and can 
connect with mysql client under "bacula" username, select rows from tables, 
etc. Bacula database seems to be restored in full. I have also reconfigured 
and rebuilt bacula 2.2.0; configure output looked just fine and no complaints 
during make phase. I even did not forget to run ldconfig after upgrading 
MySQL but prior to rebuilding bacula ;-). But when I attempt to start 
bacula-dir I am receiving error (this is from debug run):

# /usr/sbin/bacula-dir -v -d99 -f -g bacula -u 
bacula -c /etc/bacula/bacula-dir.conf
bacula-dir: dird.c:156 Debug level = 99
bacula-dir: mysql.c:164 mysql_init done
bacula-dir: mysql.c:185 mysql_real_connect done
bacula-dir: mysql.c:187 db_user=bacula db_name=bacula db_password=
bacula-dir: dird.c:873 Could not open Catalog "MyCatalog", database "bacula".
bacula-dir: dird.c:878 mysql.c:193 Unable to connect to MySQL server.
Database=bacula User=bacula
MySQL connect failed either server not running or your authorization is 
incorrect.
27-Aug 01:04 bacula-dir ERROR TERMINATION
Please correct configuration file: /etc/bacula/bacula-dir.conf

I have quadruple-checked bacula-dir.conf and positive that it is correct: same 
username and database specified under Catalog resource as the one with wich I 
can successfully connect using mysql client. Yet bacula director would not 
start.

I have noticed a potential problem with bacula-dir linking: configure script 
correctly located /usr/lib/mysql directory which contains development 
libraries and this path was passed as -L/usr/lib/mysql option to linker 
duiring build. However, there were only .a (archive format) libraries there, 
hence bacula-dir was built with statically linked mysql client (I have 
confirmed it by running both ldd and nm against the binary). Is it normal? I 
am pretty sure previous version 1.38.11 has been built with dynamic 
libraries. Now the .so versions of libmysqlclient are installed in /lib and 
bacula build process does not see them.

Could it be what's casung the problem? I am completely at loss here, please 
help.

Thanks,
Ivan


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to