Re: [Bacula-users] mysql authorization fail (Could not open Catalog) on a clean 5.2.5 install. what did i miss in my config?

2012-02-12 Thread Adrian Reyer
On Sat, Feb 11, 2012 at 06:56:54PM -0800, p50...@150ml.com wrote:
   bacula-dir -d -v -t -c bacula-dir.conf
   bacula-dir: dird.c:954 Could not open Catalog MyCatalog,
   database bacula.
   bacula-dir: dird.c:959 mysql.c:203 Unable to connect to MySQL
   server.
   Database=bacula User=bacula
   MySQL connect failed either server not running or your
   authorization is incorrect.
   11-Feb 18:39 bacula-dir ERROR TERMINATION
   Please correct configuration file: bacula-dir.conf

Perhaps there are different assumtions on where your mysql.sock resides?
It doesn't exactly claim 'Permission denied', 'Authorization failed' or
similar, it might as well be unable to access the socket due to
permissions or location.
You could try and connect via tcp/ip to verify, just add the
DB Address = localhost;
statement to your catalog definition.

Catalog {
  Name = MyCatalog
  dbname = bacula; dbuser = bacula; DB Address = localhost; dbpassword = 
DBPass
}

Regards,
Adrian
-- 
LiHAS - Adrian Reyer - Hessenwiesenstraße 10 - D-70565 Stuttgart
Fon: +49 (7 11) 78 28 50 90 - Fax:  +49 (7 11) 78 28 50 91
Mail: li...@lihas.de - Web: http://lihas.de
Linux, Netzwerke, Consulting  Support - USt-ID: DE 227 816 626 Stuttgart

--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] mysql authorization fail (Could not open Catalog) on a clean 5.2.5 install. what did i miss in my config?

2012-02-12 Thread p50bac
hi

On Sun, Feb 12, 2012, at 11:15 AM, Adrian Reyer wrote:
 Perhaps there are different assumtions on where your mysql.sock resides?
 It doesn't exactly claim 'Permission denied', 'Authorization failed' or
 similar, it might as well be unable to access the socket due to
 permissions or location.
 You could try and connect via tcp/ip to verify, just add the
 DB Address = localhost;
 statement to your catalog definition.

 Catalog {
   Name = MyCatalog
   dbname = bacula; dbuser = bacula; DB Address = localhost;
   dbpassword = DBPass
 }

modifying,

# Generic catalog service
Catalog {
  Name = MyCatalog
- dbname = bacula; dbuser = bacula; dbpassword = DbPass
+ dbname = bacula; dbuser = bacula; DB Address =
localhost; dbpassword = DbPass
}

then,

service bacula-dir restart
bacula-dir -d -v -t -c bacula-dir.conf

returns ok, with no error. so, TCP works.

checking,

grep sock /etc/my.cnf -B1

[client]
socket  =
/var/cache/mysql/mysql.sock

[mysqld_safe]
socket  =
/var/cache/mysql/mysql.sock

[mysqld_secure_installation]
socket  =
/var/cache/mysql/mysql.sock

[mysqld]
socket  =
/var/cache/mysql/mysql.sock

ls -al /var/cache/mysql/mysql.sock
srwxrwxrwx 1 mysql mysql 0 Feb 12 18:08
/var/cache/mysql/mysql.sock=

checking, i've verifyied all of my other mysql-socket-using apps are ok
with that specified socket location.

Q: is bacula presumimg some other location, rather than adopting the
settings in /etc/my.cnf, or the executable's default,

mysqladmin --print-defaults
mysqladmin would have been started with the following
arguments:
  --socket=/var/cache/mysql/mysql.sock --password=##
  --port=3306 

on a hunch,

ln -sf /var/cache/mysql/mysql.sock /var/run/mysql/mysql.sock

and returning

- dbname = bacula; dbuser = bacula; DB Address =
localhost; dbpassword = DbPass
+ dbname = bacula; dbuser = bacula; dbpassword = DbPass

then,

service bacula-dir restart
bacula-dir -d -v -t -c bacula-dir.conf

is, now, ok.

checking,

grep sock `grep -rlni sock /usr/lib64/bacula`
if ($args{db_socket}) {
$ENV{PGHOST}=$args{db_socket};
if ($args{db_socket}) { # unix socket is fastest
than net socket
$addr = socket=$args{db_socket};
# db_socket=

looks like a socket specification can be made.  reading @ bacula docs,

Configuring_Director.html
DB Socket = socket-name
This is the name of a socket to use on the local
host to connect to the database. This directive
is used only by MySQL and is ignored by SQLite.
Normally, if neither DB Socket or DB Address are
specified, MySQL will use the default socket. If
the DB Socket is specified, the MySQL server
must reside on the same machine as the Director.

it's supposed to use the default socket ...

specifying the socket manually,

rm  /var/run/mysql/mysql.sock
- dbname = bacula; dbuser = bacula; dbpassword = DbPass
+ dbname = bacula; dbuser = bacula; DB Socket =
/var/cache/mysql/mysql.sock; dbpassword = DbPass

and, now,

service bacula-dir restart
bacula-dir -d -v -t -c bacula-dir.conf

returns ok.

as you suspected -- socket location! i'd suspect bacula *should* take
the socket location as specified in /etc/my.cnf, but the manual spec of
socket location in the bacula-dir.conf Catalog stanza is an apparently
working solution.

thanks a lot.

--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] SD crashes

2012-02-12 Thread Joe Nyland
Hello everyone,

I hope someone would be able to offer any suggestions of why I am seeing the 
following behaviour in my current Bacula setup:

Since the tail end of last week, I have been having issues with my MySQL 
backups in Bacula, where they would randomly appear to 'crash', normally when 
performing a copy of a backup to another pool - but I'm not sure yet if this is 
the trigger.

Running 'status dir' after one of these 'crashes' gives the following output 
for the running jobs:

Running Jobs:
Console connected at 12-Feb-12 15:53
Console connected at 13-Feb-12 06:58
 JobId Level   Name   Status
==
  2107 FullWebServer1_MySQL_Copy.2012-02-13_04.30.00_28 is running  
Crashed Job
  2108 FullWebServer1_MySQL.2012-02-13_04.30.00_29 is running   
Crashed Job
  2111 FullMythTVServer1_MySQL.2012-02-13_05.00.00_32 is waiting for higher 
priority jobs to finish
  2113 FullTestServer_MySQL.2012-02-13_05.00.00_34 is waiting execution
  2114 FullMythTVServer1_MySQL_Copy.2012-02-13_05.30.00_35 is waiting 
execution
  2115 FullWebServer1_MySQL_Copy.2012-02-13_05.30.00_36 is waiting execution
  2116 FullWebServer1_MySQL.2012-02-13_05.30.00_37 has a fatal error
  2117 FullTestServer_MySQL_Copy.2012-02-13_05.30.00_38 is waiting execution
  2121 FullMythTVServer1_MySQL_Copy.2012-02-13_06.30.00_42 is waiting 
execution
  2122 FullWebServer1_MySQL_Copy.2012-02-13_06.30.00_43 is waiting execution
  2123 FullWebServer1_MySQL.2012-02-13_06.30.00_44 has a fatal error
  2124 FullTestServer_MySQL_Copy.2012-02-13_06.30.00_45 is waiting execution
  2125 FullMythTVServer1_MySQL.2012-02-13_07.00.00_47 has a fatal error
  2126 FullWebServer1_MySQL.2012-02-13_07.00.00_48 has a fatal error


Once the above appears, I am unable to view the status of any storage resource 
on my SD:

*status storage=FileServer1_Full
Connecting to Storage daemon FileServer1_Full at FileServer1:9103

FileServer1-sd Version: 5.0.1 (24 February 2010) x86_64-pc-linux-gnu ubuntu 
10.04
Daemon started 12-Feb-12 15:53, 92 Jobs run since started.
 Heap: heap=1,671,168 smbytes=1,188,608 max_bytes=1,388,208 bufs=577 
max_bufs=994
Sizes: boffset_t=8 size_t=8 int32_t=4 int64_t=8

Running Jobs:
Reading: Full Copy job WebServer1_MySQL_Copy JobId=2107 
Volume=WebServer1_MySQL_1325
pool=WebServer1_MySQL device=WebServer1_MySQL 
(/mnt/backup/Bacula/Databases/WebServer1)
Files=4 Bytes=164,924 Bytes/sec=17
FDSocket closed


Jobs waiting to reserve a drive:


Terminated Jobs:
 JobId  LevelFiles  Bytes   Status   FinishedName 
===
  2091  Full  292.45 K  OK   13-Feb-12 03:30 
TestServer_MySQL_Copy
  2096  Full  52.258 M  OK   13-Feb-12 03:30 
MythTVServer1_MySQL_Copy
  2098  Full  4164.9 K  OK   13-Feb-12 03:30 
WebServer1_MySQL_Copy
  2100  Full  292.45 K  OK   13-Feb-12 03:30 
TestServer_MySQL_Copy
  2078  Full  1,1452.942 G  OK   13-Feb-12 03:31 SVN_Copy
  2102  Full  52.259 M  OK   13-Feb-12 04:01 MythTVServer1_MySQL
  2103  Full  4164.9 K  OK   13-Feb-12 04:01 WebServer1_MySQL
  2104  Full  292.37 K  OK   13-Feb-12 04:01 TestServer_MySQL
  2105  Full  52.259 M  OK   13-Feb-12 04:30 
MythTVServer1_MySQL_Copy
  2109  Full  292.37 K  OK   13-Feb-12 04:30 
TestServer_MySQL_Copy


Device status:
Device Default (/mnt/backup/Bacula) is not open.
snip
Device WebServer1_Inc (/mnt/backup/Bacula/WebServer1/Incremental) is not open.
Device WebServer1_MySQL (/mnt/backup/Bacula/Databases/WebServer1) is mounted 
with:
Volume:  WebServer1_MySQL_1325
Pool:WebServer1_MySQL
Media type:  File
Total Bytes Read=0 Blocks Read=0 Bytes/block=0
Positioned at File=0 Block=0
Device WebServer1_MySQL_Copy (/mnt/mac_backup/Bacula/Databases/WebServer1) is 
not open.
Device WebServer1_Full_Copy (/mnt/mac_backup/Bacula/WebServer1/Full) is not 
open.
Device WebServer1_Inc_Copy (/mnt/mac_backup/Bacula/WebServer1/Incrementals) 
is not open.
snip
Device SharedData_Diff (/mnt/backup/Bacula/Shared/Differential) is not open.


Used Volume status:

NOTE: bconsole appears to crash here - no further output is produced, and 
bconsole does not respond to any key presses. I have to Ctrl + C to exit out 
from bconsole. Furthermore, the only way I can clear our the failed jobs from 
the 'Running jobs queue' is to exit from bconsole, issue 'sudo service 
bacula-sd stop' twice, then restart the SD and restart bacula-director.

What I have is for 4 of my clients I run a MySQL backup hourly at 00:00, 01:00, 
etc. I then copy the MySQL backups to another storage