Re: [Bacula-users] Negative test of bacula-dir.

2006-03-03 Thread Sebastian Stark


Am 03.03.2006 um 01:00 schrieb Erik P. Olsen:


Sebastian Stark wrote:

On 01.03.2006, at 11:09, Erik P. Olsen wrote:

What happens when you enter 'use bacula'?


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


Apparently I can open and use bacula database from the command  
line  and bacula can't. I don't see any no permission messages  
so I  believe the necessary permissions are in place. Could it be  
that a  special link between bacula and mysql has not been set up  
and thus  is missing?


I am a total loss on this problem and don't know what to do  
other  than a total reinstall of both bacula and mysql.  
Insidentally, both  bacula-fd and bacula-sd start up without  
problems it is only  bacula-dir which causes problems.
Any chance that you linked bacula to a different libmysqlclient?  
I  can see you're using mysqld 4.1, if you used 4.0 headers/libs  
to  compile bacula this could be the problem.
I don't know how I can see that. Bacula was configured using --with- 
mysql=/usr/local/mysql which is where I put mysql. I suppose this  
is the way to let bacula know which mysql to use and where to find  
the necessary mysql files. Or should I have done otherwise?


Under Linux you can check by running ldd on the bacula binaries.

Just check if you have more than one version of mysql on your machine  
or old files lying around (files that are left from older  
installations for instance). If not then this should not be a  
problem. It could also be problematic if you compile on another  
machine and then run the binary elsewhere.


Something else: If bacula is not running as root, does it have enough  
permissions to access the unix socket (like /tmp/mysql.sock) it needs  
for communicating with mysql?


Can you check with strace (again, if you use Linux) what is happening?


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Negative test of bacula-dir.

2006-03-03 Thread Erik P. Olsen

Sebastian Stark wrote:


Am 03.03.2006 um 01:00 schrieb Erik P. Olsen:


Sebastian Stark wrote:


On 01.03.2006, at 11:09, Erik P. Olsen wrote:


What happens when you enter 'use bacula'?



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



Apparently I can open and use bacula database from the command  
line  and bacula can't. I don't see any no permission messages  so 
I  believe the necessary permissions are in place. Could it be  that 
a  special link between bacula and mysql has not been set up  and 
thus  is missing?


I am a total loss on this problem and don't know what to do  other  
than a total reinstall of both bacula and mysql.  Insidentally, 
both  bacula-fd and bacula-sd start up without  problems it is 
only  bacula-dir which causes problems.


Any chance that you linked bacula to a different libmysqlclient?  I  
can see you're using mysqld 4.1, if you used 4.0 headers/libs  to  
compile bacula this could be the problem.


I don't know how I can see that. Bacula was configured using --with- 
mysql=/usr/local/mysql which is where I put mysql. I suppose this  is 
the way to let bacula know which mysql to use and where to find  the 
necessary mysql files. Or should I have done otherwise?



Under Linux you can check by running ldd on the bacula binaries.

Just check if you have more than one version of mysql on your machine  
or old files lying around (files that are left from older  installations 
for instance). If not then this should not be a  problem. It could also 
be problematic if you compile on another  machine and then run the 
binary elsewhere.


Something else: If bacula is not running as root, does it have enough  
permissions to access the unix socket (like /tmp/mysql.sock) it needs  
for communicating with mysql?


Maybe mysql is listening to another socket?


Can you check with strace (again, if you use Linux) what is happening?


Please see attached list.

--
Regards,
Erik P. Olsen


bacula-dir.lst.gz
Description: GNU Zip compressed data


Re: [Bacula-users] Negative test of bacula-dir.

2006-03-03 Thread Erik P. Olsen

Erik P. Olsen wrote:



Something else: If bacula is not running as root, does it have enough  
permissions to access the unix socket (like /tmp/mysql.sock) it needs  
for communicating with mysql?



Maybe mysql is listening to another socket?

OK, found the socket. Mysql is apparently listening to 
/var/lib/mysql/mysql.sock and bacula tries to open /tmp/mysql.sock.


Thanks for pointing me in that direction.

--
Regards,
Erik P. Olsen


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Negative test of bacula-dir.

2006-03-03 Thread Baptiste Malguy
Erik P. Olsen a écrit :
 Erik P. Olsen wrote:
 

 Something else: If bacula is not running as root, does it have
 enough  permissions to access the unix socket (like /tmp/mysql.sock)
 it needs  for communicating with mysql?



 Maybe mysql is listening to another socket?

 OK, found the socket. Mysql is apparently listening to
 /var/lib/mysql/mysql.sock and bacula tries to open /tmp/mysql.sock.
 

Ok so, if you didn't already fixed this, take a look at /etc/my.cnf or
/etc/mysq/my.cnf (might depends on your MySQL installation/packages).

Search for the parameter named socket in the the section named client.

Here is the example of a Debian Sarge:

  [client]
  port= 3306
  socket  = /var/run/mysqld/mysqld.sock

You can also look in your user directory for file .my.cnf with the same
kind of configuration stuff.

-- 
Baptiste MALGUY - IT Engineer   SOLSOFT
PGP Fingerprint: 2A90 B6D1 855F 1584 FE68  94AC CCD6 36D0 3DC7 DCB8
www.solsoft.com - phone: +33 1 47 15 04 00 - fax: +33 1 47 15 55 09
 How secure networks are managed.



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid0944bid$1720dat1642
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Negative test of bacula-dir. (Solved)

2006-03-03 Thread Erik P. Olsen

Baptiste Malguy wrote:

Erik P. Olsen a écrit :



Maybe mysql is listening to another socket?



OK, found the socket. Mysql is apparently listening to
/var/lib/mysql/mysql.sock and bacula tries to open /tmp/mysql.sock.




Ok so, if you didn't already fixed this, take a look at /etc/my.cnf or
/etc/mysq/my.cnf (might depends on your MySQL installation/packages).

Search for the parameter named socket in the the section named client.

Here is the example of a Debian Sarge:

  [client]
  port= 3306
  socket  = /var/run/mysqld/mysqld.sock


Yes, that is indeed what /etc/my.cnf contains. I went back to the User's 
 Manual to read about the use of sockets in bacula. On page 180 there 
is a description of DB socket. It is said that if it is omitted MySQL 
will use the default socket which by the way is /tmp/mysql.sock. I 
therefore expected the use of this socket to be correct. However, it is 
not mysql that will use the default socket, it is bacula!


I therefore inserted DB socket = /var/lib/mysql/mysql.sock in the 
Catalog directive of bacula-dir.conf and - voila  - everything is now OK.


--
Regards,
Erik P. Olsen



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid0944bid$1720dat1642
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Negative test of bacula-dir.

2006-03-02 Thread Erik P. Olsen

Sebastian Stark wrote:


On 01.03.2006, at 11:09, Erik P. Olsen wrote:


What happens when you enter 'use bacula'?


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


Apparently I can open and use bacula database from the command line  
and bacula can't. I don't see any no permission messages so I  
believe the necessary permissions are in place. Could it be that a  
special link between bacula and mysql has not been set up and thus  is 
missing?


I am a total loss on this problem and don't know what to do other  
than a total reinstall of both bacula and mysql. Insidentally, both  
bacula-fd and bacula-sd start up without problems it is only  
bacula-dir which causes problems.



Any chance that you linked bacula to a different libmysqlclient? I  can 
see you're using mysqld 4.1, if you used 4.0 headers/libs to  compile 
bacula this could be the problem.


I don't know how I can see that. Bacula was configured using 
--with-mysql=/usr/local/mysql which is where I put mysql. I suppose this 
is the way to let bacula know which mysql to use and where to find the 
necessary mysql files. Or should I have done otherwise?


--
Regards,
Erik P. Olsen


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Negative test of bacula-dir.

2006-03-01 Thread Erik P. Olsen

Erik P. Olsen wrote:

Arno Lehmann wrote:


Hello,

On 2/26/2006 8:30 PM, Erik P. Olsen wrote:


Dan Langille wrote:



...


[EMAIL PROTECTED] conf]# ../bin/bacula-dir -d 99 -t -c bacula-dir.conf
bacula-dir: dird.c:128 Debug level = 99
bacula-dir: mysql.c:142 mysql_init done
bacula-dir: mysql.c:162 mysql_real_connect done
bacula-dir: mysql.c:164 db_user=bacula db_name=bacula db_password=
26-Feb 20:18 bacula-dir:  Fatal error: Could not open database bacula.
26-Feb 20:18 bacula-dir:  Fatal error: mysql.c:170 Unable to connect 
to MySQL server.

Database=bacula User=bacula
It is probably not running or your password is incorrect.
26-Feb 20:18 bacula-dir ERROR TERMINATION
Please correct configuration file: bacula-dir.conf



Is MySQL running?





Yes



Please show us the Catalog resource from bacula-dir.conf





Catalog {
  Name = MyCatalog
  dbname = bacula; user = bacula; password = 
}



Can you connect to mysql on the command line using the parameters in 
the Catalog resource?



Yes:

[EMAIL PROTECTED] ~]$ mysql -u bacula
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 10 to server version: 4.1.18-standard

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql




What happens when you enter 'use bacula'?



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

Apparently I can open and use bacula database from the command line and 
bacula can't. I don't see any no permission messages so I believe the 
necessary permissions are in place. Could it be that a special link 
between bacula and mysql has not been set up and thus is missing?


I am a total loss on this problem and don't know what to do other than a 
total reinstall of both bacula and mysql. Insidentally, both bacula-fd 
and bacula-sd start up without problems it is only bacula-dir which 
causes problems.


--
Regards,
Erik P. Olsen


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Negative test of bacula-dir.

2006-03-01 Thread Sebastian Stark


On 01.03.2006, at 11:09, Erik P. Olsen wrote:

What happens when you enter 'use bacula'?

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
Apparently I can open and use bacula database from the command line  
and bacula can't. I don't see any no permission messages so I  
believe the necessary permissions are in place. Could it be that a  
special link between bacula and mysql has not been set up and thus  
is missing?


I am a total loss on this problem and don't know what to do other  
than a total reinstall of both bacula and mysql. Insidentally, both  
bacula-fd and bacula-sd start up without problems it is only  
bacula-dir which causes problems.


Any chance that you linked bacula to a different libmysqlclient? I  
can see you're using mysqld 4.1, if you used 4.0 headers/libs to  
compile bacula this could be the problem.



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Negative test of bacula-dir.

2006-02-26 Thread Dan Langille
On 26 Feb 2006 at 16:17, Erik P. Olsen wrote:

 I have come to the point where I've started testing the configuration 
 files. However, the first test fails:
 
 [EMAIL PROTECTED] conf]# ../bin/bacula-dir -t -c bacula-dir.conf
 26-Feb 15:57 bacula-dir:  Fatal error: Could not open database bacula.
 26-Feb 15:57 bacula-dir:  Fatal error: mysql.c:170 Unable to connect to 
 MySQL server.
 Database=bacula User=bacula
 It is probably not running or your password is incorrect.
 26-Feb 15:57 bacula-dir ERROR TERMINATION
 Please correct configuration file: bacula-dir.conf
 
 Is there any log somewhere which could tell me why the database bacula 
 could not be opened?

You could increase the debugging level by adding -d 99 or something 
similar.

Is MySQL running?

Please show us the Catalog resource from bacula-dir.conf

Can you connect to mysql on the command line using the parameters in 
the Catalog resource?

-- 
Dan Langille : Software Developer looking for work
my resume: http://www.freebsddiary.org/dan_langille.php




---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Negative test of bacula-dir.

2006-02-26 Thread Erik P. Olsen

Dan Langille wrote:

On 26 Feb 2006 at 16:17, Erik P. Olsen wrote:


I have come to the point where I've started testing the configuration 
files. However, the first test fails:


[EMAIL PROTECTED] conf]# ../bin/bacula-dir -t -c bacula-dir.conf
26-Feb 15:57 bacula-dir:  Fatal error: Could not open database bacula.
26-Feb 15:57 bacula-dir:  Fatal error: mysql.c:170 Unable to connect to 
MySQL server.

Database=bacula User=bacula
It is probably not running or your password is incorrect.
26-Feb 15:57 bacula-dir ERROR TERMINATION
Please correct configuration file: bacula-dir.conf

Is there any log somewhere which could tell me why the database bacula 
could not be opened?



You could increase the debugging level by adding -d 99 or something 
similar.


[EMAIL PROTECTED] conf]# ../bin/bacula-dir -d 99 -t -c bacula-dir.conf
bacula-dir: dird.c:128 Debug level = 99
bacula-dir: mysql.c:142 mysql_init done
bacula-dir: mysql.c:162 mysql_real_connect done
bacula-dir: mysql.c:164 db_user=bacula db_name=bacula db_password=
26-Feb 20:18 bacula-dir:  Fatal error: Could not open database bacula.
26-Feb 20:18 bacula-dir:  Fatal error: mysql.c:170 Unable to connect to 
MySQL server.

Database=bacula User=bacula
It is probably not running or your password is incorrect.
26-Feb 20:18 bacula-dir ERROR TERMINATION
Please correct configuration file: bacula-dir.conf



Is MySQL running?


Yes


Please show us the Catalog resource from bacula-dir.conf


Catalog {
  Name = MyCatalog
  dbname = bacula; user = bacula; password = 
}


Can you connect to mysql on the command line using the parameters in 
the Catalog resource?



Yes:

[EMAIL PROTECTED] ~]$ mysql -u bacula
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 10 to server version: 4.1.18-standard

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql

Regards,
Erik P. Olsen


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Negative test of bacula-dir.

2006-02-26 Thread Arno Lehmann

Hello,

On 2/26/2006 8:30 PM, Erik P. Olsen wrote:

Dan Langille wrote:

...

[EMAIL PROTECTED] conf]# ../bin/bacula-dir -d 99 -t -c bacula-dir.conf
bacula-dir: dird.c:128 Debug level = 99
bacula-dir: mysql.c:142 mysql_init done
bacula-dir: mysql.c:162 mysql_real_connect done
bacula-dir: mysql.c:164 db_user=bacula db_name=bacula db_password=
26-Feb 20:18 bacula-dir:  Fatal error: Could not open database bacula.
26-Feb 20:18 bacula-dir:  Fatal error: mysql.c:170 Unable to connect to 
MySQL server.

Database=bacula User=bacula
It is probably not running or your password is incorrect.
26-Feb 20:18 bacula-dir ERROR TERMINATION
Please correct configuration file: bacula-dir.conf



Is MySQL running?



Yes



Please show us the Catalog resource from bacula-dir.conf



Catalog {
  Name = MyCatalog
  dbname = bacula; user = bacula; password = 
}



Can you connect to mysql on the command line using the parameters in 
the Catalog resource?



Yes:

[EMAIL PROTECTED] ~]$ mysql -u bacula
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 10 to server version: 4.1.18-standard

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql


What happens when you enter 'use bacula'?

Arno

--
IT-Service Lehmann[EMAIL PROTECTED]
Arno Lehmann  http://www.its-lehmann.de


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Negative test of bacula-dir.

2006-02-26 Thread Erik P. Olsen

Arno Lehmann wrote:

Hello,

On 2/26/2006 8:30 PM, Erik P. Olsen wrote:


Dan Langille wrote:


...


[EMAIL PROTECTED] conf]# ../bin/bacula-dir -d 99 -t -c bacula-dir.conf
bacula-dir: dird.c:128 Debug level = 99
bacula-dir: mysql.c:142 mysql_init done
bacula-dir: mysql.c:162 mysql_real_connect done
bacula-dir: mysql.c:164 db_user=bacula db_name=bacula db_password=
26-Feb 20:18 bacula-dir:  Fatal error: Could not open database bacula.
26-Feb 20:18 bacula-dir:  Fatal error: mysql.c:170 Unable to connect 
to MySQL server.

Database=bacula User=bacula
It is probably not running or your password is incorrect.
26-Feb 20:18 bacula-dir ERROR TERMINATION
Please correct configuration file: bacula-dir.conf



Is MySQL running?




Yes



Please show us the Catalog resource from bacula-dir.conf




Catalog {
  Name = MyCatalog
  dbname = bacula; user = bacula; password = 
}



Can you connect to mysql on the command line using the parameters in 
the Catalog resource?



Yes:

[EMAIL PROTECTED] ~]$ mysql -u bacula
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 10 to server version: 4.1.18-standard

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql



What happens when you enter 'use bacula'?


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

Regards,
Erik P. Olsen




---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users