Bacula-users

Re: [Bacula-users] bscan mysql authorization error

2010-08-23 15:23:23
Subject: Re: [Bacula-users] bscan mysql authorization error
From: John Drescher <drescherjm AT gmail DOT com>
To: Bruno Friedmann <bruno AT ioda-net DOT ch>, jjest AT u.washington DOT edu
Date: Mon, 23 Aug 2010 15:19:35 -0400
On Mon, Aug 23, 2010 at 3:09 PM, Bruno Friedmann <bruno AT ioda-net DOT ch> 
wrote:
> On 08/23/2010 08:02 PM, Jeremiah D. Jester wrote:
>> Wanted to check again to see if anyone has any thoughts on this.
>>
>> JJ
>>
>> From: Jeremiah D. Jester [mailto:jjest AT u.washington DOT edu]
>> Sent: Friday, August 20, 2010 9:59 AM
>> To: bacula-users
>> Subject: [Bacula-users] bscan mysql authorization error
>>
>> Hello,
>>
>> I am trying to wipe one of my tapes that would not allocate to a pool upon 
>> labeling. The tape is loaded in the drive and I've stopped bacula-sd. 
>> However, when I attempt to issue the bscan command below it tells me it 
>> cannot access the mysql server. I've tested with the password located in my 
>> bacula-dir.conf files and it works just fine. Any ideas? Is there a bscan 
>> config file that I should have that may be missing?
>>
>> Thanks,
>> JJ
>>
>> BSCAN ERROR
>>
>> [root@scrappy bacula]# ./bin/bscan -V 000006L4 -v -s -m -c bacula-sd.conf 
>> /dev/nst0
>> bscan: butil.c:281 Using device: "/dev/nst0" for reading.
>> 20-Aug 09:49 bscan JobId 0: Invalid slot=0 defined in catalog for Volume 
>> "000006L4" on "Drive1" (/dev/nst0). Manual load may be required.
>> 20-Aug 09:49 bscan JobId 0: 3301 Issuing autochanger "loaded? drive 0" 
>> command.
>> 20-Aug 09:49 bscan JobId 0: 3302 Autochanger "loaded? drive 0", result is 
>> Slot 16.
>> 20-Aug 09:49 bscan JobId 0: Ready to read from volume "000006L4" on device 
>> "Drive1" (/dev/nst0).
>> 20-Aug 09:50 bscan: ERROR TERMINATION at bscan.c:304
>> mysql.c:194 Unable to connect to MySQL server.
>> Database=bacula User=bacula
>> MySQL connect failed either server not running or your authorization is 
>> incorrect.
>>
>> TESTING BACULA CREDENTIALS - WORKS!
>>
>> [root@scrappy bacula]# mysql -u bacula -p bacula
>> Enter password:
>> Reading table information for completion of table and column names
>> You can turn off this feature to get a quicker startup with -A
>>
>> Welcome to the MySQL monitor.  Commands end with ; or \g.
>> Your MySQL connection id is 17
>> Server version: 5.0.77 Source distribution
>>
>> Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
>>
>> mysql>
>>
>
> Can't say many things about ...
>
> but
>  bscan -?
> Copyright (C) 2001-2009 Free Software Foundation Europe e.V.
>
> Version: 3.0.3 (18 October 2009)
>
> Usage: bscan [ options ] <bacula-archive>
>       -b bootstrap      specify a bootstrap file
>       -c <file>         specify configuration file
>       -d <nn>           set debug level to <nn>
>       -dt               print timestamp in debug output
>       -m                update media info in database
>       -D <driver name>  specify the driver database name (default NULL)
>       -n <name>         specify the database name (default bacula)
>       -u <user>         specify database user name (default bacula)
>       -P <password>     specify database password (default none)
>       -h <host>         specify database host (default NULL)
>       -t <port>         specify database port (default 0)
>       -p                proceed inspite of I/O errors
>       -r                list records
>       -s                synchronize or store in database
>       -S                show scan progress periodically
>       -v                verbose
>       -V <Volumes>      specify Volume names (separated by |)
>       -w <dir>          specify working directory (default from conf file)
>       -?                print this message
>
> Also remember perhaps to start bscan under the user making bacula backup 
> (usually bacula)
> you can also configure a .my.cnf (chown bacula, chmod 0600) file inside the 
> /var/lib/bacula (if home of bacula user )
>

That makes good sense. I believe the configuration file you pass to
bscan is for the storage not the director configuration file so if
your database settings are not default they will fail unless you pass
them using the options.

John

------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

<Prev in Thread] Current Thread [Next in Thread>