Re: [Bacula-users] Baculum error connecting to MySQL DB

2018-02-08 Thread Shawn Rappaport
Well, I must be blind. A few minutes after posting my message, I found this 
section in bacula-dir.conf:

# Generic catalog service
Catalog {
  Name = MyCatalog
  dbname = "bacula"; dbuser = "bacula"; dbpassword = ""
}

I added my password and now things are working again. Sorry for the false alarm.

--Shawn

On 2/8/18, 1:29 PM, "Shawn Rappaport"  wrote:

Hi Marcin,



Thanks for the info! I didn’t realize I was using an old version of 
baculum. I removed version 7 and installed version 9. I was then able to 
connect to the DB on the Catalog API tab. 

Now I’m running into a problem on the Console API tab. I have the Bconsole 
binary file path set to /sbin/bconsole and the Bconsole admin config file path 
set to /etc/bacula/bconsole.conf. I also have Use sudo checked. When I clicked 
Test, I got this:

Problem with connection to bconsole. Output=>Connecting to Director 
xbacdirector01-lv:9101, Exitcode=>1



Sure enough, when I tried to run bconsole from the Director server itself, 
the command times out:

10:53:05][root@xbacdirector01-lv:/etc/bacula:573]$ /sbin/bconsole

Connecting to Director xbacdirector01-lv:9101

[10:53:37][root@xbacdirector01-lv:/etc/bacula:574]$



I checked with ps and bacula-dir is not running. 



Next, I ran this to debug the problem with bacula-dir:

/sbin/bacula-dir -d100 -c /etc/bacula/bacula-dir.conf



Here is the relevant part of the output:

bacula-dir: mysql.c:263-0 mysql_real_connect done

bacula-dir: mysql.c:265-0 db_user=bacula db_name=bacula db_password=

bacula-dir: mysql.c:275-0 Error 1045 (28000): Access denied for user 
'bacula'@'localhost' (using password: NO)

bacula-dir: dird.c:1165-0 Could not open Catalog "MyCatalog", database 
"bacula".

bacula-dir: dird.c:1170-0 mysql.c:271 Unable to connect to MySQL server.

Database=bacula User=bacula

MySQL connect failed either server not running or your authorization is 
incorrect.

bacula-dir: mysql.c:325-0 closedb ref=0 connected=0 db=0

08-Feb 11:36 bacula-dir ERROR TERMINATION

Please correct configuration file: /etc/bacula/bacula-dir.conf



It looks like the problem is that the Director is trying to connect to the 
MySQL DB without a password. Does anyone know how to fix this so it uses the 
password I have set for bacula in the DB? I don’t see an option in 
bacula-dir.conf. Since the Director last worked, I haven’t changed anything 
with my configuration other than removing Baculum 7 and installing Baculum 9. 
So, I’m not sure what I did to screw things up.



Thanks!



--Shawn



On 2/7/18, 10:56 PM, "Marcin Haba"  wrote:



Hello Shawn,



It looks that you use an old Baculum version (7.x). I would suggest to

remove the 7.x and install 9.x (there is no direct update way between

versions 7 and 9). Here you can find how to install version Baculum

9.x:




https://urldefense.proofpoint.com/v2/url?u=http-3A__www.bacula.org_9.0.x-2Dmanuals_en_console_Baculum-5FAPI-5FWeb-5FGUI-5FTools.html=DwIFaQ=sy2pFYeXOTBQJUPqadkFIXq5lzPIgQxhI8DCCAdSjYc=N3_BTL1Tt2ryeleRqn2wc-R4w3v0TnI7dlgnwdQ7zE8=ZcS2AM_EDHBz-z5_zSpTo9mbsyyT-_wUTeVj75__FkI=Y0_N8HdGAovGbo9GNuMHAIEJfjKZqyueKogDlYMVqxI=



If you want to stay in version 7 then you can try the following:



1) To check connection try to connect to database by below mysql

command on host with Baculum:



mysql -u bacula -h xbacdirector01-lv -P 3306 bacula -p



2) check if you have installed "php-mysql" package



3) To fix your timezone setting (not related to the mysql) you can

find in /etc/php.ini file line:



;date.timezone =



and change it to



data.timezone = Your/Timezone



Supported by PHP timezone list is here:




https://urldefense.proofpoint.com/v2/url?u=http-3A__php.net_manual_en_timezones.php=DwIFaQ=sy2pFYeXOTBQJUPqadkFIXq5lzPIgQxhI8DCCAdSjYc=N3_BTL1Tt2ryeleRqn2wc-R4w3v0TnI7dlgnwdQ7zE8=ZcS2AM_EDHBz-z5_zSpTo9mbsyyT-_wUTeVj75__FkI=HttPEm6zAYRWfknioRpeXQIEY23GlxAJLaL81Sv7U5g=



At the end you need to restart the web server.



Good luck.



Best regards.

Marcin Haba (gani)



On 7 February 2018 at 23:47, Shawn Rappaport 
 wrote:

> I’m new to Bacula. I’ve been playing with the latest version for the 
past

> couple of days 

Re: [Bacula-users] Baculum error connecting to MySQL DB

2018-02-08 Thread Shawn Rappaport
Hi Marcin,

Thanks for the info! I didn’t realize I was using an old version of baculum. I 
removed version 7 and installed version 9. I was then able to connect to the DB 
on the Catalog API tab. 
Now I’m running into a problem on the Console API tab. I have the Bconsole 
binary file path set to /sbin/bconsole and the Bconsole admin config file path 
set to /etc/bacula/bconsole.conf. I also have Use sudo checked. When I clicked 
Test, I got this:
Problem with connection to bconsole. Output=>Connecting to Director 
xbacdirector01-lv:9101, Exitcode=>1

Sure enough, when I tried to run bconsole from the Director server itself, the 
command times out:
10:53:05][root@xbacdirector01-lv:/etc/bacula:573]$ /sbin/bconsole
Connecting to Director xbacdirector01-lv:9101
[10:53:37][root@xbacdirector01-lv:/etc/bacula:574]$

I checked with ps and bacula-dir is not running. 

Next, I ran this to debug the problem with bacula-dir:
/sbin/bacula-dir -d100 -c /etc/bacula/bacula-dir.conf

Here is the relevant part of the output:
bacula-dir: mysql.c:263-0 mysql_real_connect done
bacula-dir: mysql.c:265-0 db_user=bacula db_name=bacula db_password=
bacula-dir: mysql.c:275-0 Error 1045 (28000): Access denied for user 
'bacula'@'localhost' (using password: NO)
bacula-dir: dird.c:1165-0 Could not open Catalog "MyCatalog", database "bacula".
bacula-dir: dird.c:1170-0 mysql.c:271 Unable to connect to MySQL server.
Database=bacula User=bacula
MySQL connect failed either server not running or your authorization is 
incorrect.
bacula-dir: mysql.c:325-0 closedb ref=0 connected=0 db=0
08-Feb 11:36 bacula-dir ERROR TERMINATION
Please correct configuration file: /etc/bacula/bacula-dir.conf

It looks like the problem is that the Director is trying to connect to the 
MySQL DB without a password. Does anyone know how to fix this so it uses the 
password I have set for bacula in the DB? I don’t see an option in 
bacula-dir.conf. Since the Director last worked, I haven’t changed anything 
with my configuration other than removing Baculum 7 and installing Baculum 9. 
So, I’m not sure what I did to screw things up.

Thanks!

--Shawn

On 2/7/18, 10:56 PM, "Marcin Haba"  wrote:

Hello Shawn,

It looks that you use an old Baculum version (7.x). I would suggest to
remove the 7.x and install 9.x (there is no direct update way between
versions 7 and 9). Here you can find how to install version Baculum
9.x:


https://urldefense.proofpoint.com/v2/url?u=http-3A__www.bacula.org_9.0.x-2Dmanuals_en_console_Baculum-5FAPI-5FWeb-5FGUI-5FTools.html=DwIFaQ=sy2pFYeXOTBQJUPqadkFIXq5lzPIgQxhI8DCCAdSjYc=N3_BTL1Tt2ryeleRqn2wc-R4w3v0TnI7dlgnwdQ7zE8=ZcS2AM_EDHBz-z5_zSpTo9mbsyyT-_wUTeVj75__FkI=Y0_N8HdGAovGbo9GNuMHAIEJfjKZqyueKogDlYMVqxI=

If you want to stay in version 7 then you can try the following:

1) To check connection try to connect to database by below mysql
command on host with Baculum:

mysql -u bacula -h xbacdirector01-lv -P 3306 bacula -p

2) check if you have installed "php-mysql" package

3) To fix your timezone setting (not related to the mysql) you can
find in /etc/php.ini file line:

;date.timezone =

and change it to

data.timezone = Your/Timezone

Supported by PHP timezone list is here:


https://urldefense.proofpoint.com/v2/url?u=http-3A__php.net_manual_en_timezones.php=DwIFaQ=sy2pFYeXOTBQJUPqadkFIXq5lzPIgQxhI8DCCAdSjYc=N3_BTL1Tt2ryeleRqn2wc-R4w3v0TnI7dlgnwdQ7zE8=ZcS2AM_EDHBz-z5_zSpTo9mbsyyT-_wUTeVj75__FkI=HttPEm6zAYRWfknioRpeXQIEY23GlxAJLaL81Sv7U5g=

At the end you need to restart the web server.

Good luck.

Best regards.
Marcin Haba (gani)

On 7 February 2018 at 23:47, Shawn Rappaport  
wrote:
> I’m new to Bacula. I’ve been playing with the latest version for the past
> couple of days on a CentOS 7.3 server with a MySQL DB. I’m now trying to 
set
> up Baculum. I’m able to connect to the web interface. However, when I fill
> in all of the DB information on the Database tab and click Test, I get
> “Connection error”. I checked /var/log/httpd/baculum-error.log and see the
> following:
>
>
>
> [Wed Feb 07 12:18:37.550545 2018] [:error] [pid 10647] [client
> 172.31.48.196:53501] PHP Notice:  date_default_timezone_set(): Timezone ID
> 'PST' is invalid in /usr/share/baculum/htdocs/protected/Init.php on line 
31,
> referer: 
https://urldefense.proofpoint.com/v2/url?u=http-3A__xbacdirector01-2Dlv-3A9095_wizard_=DwIFaQ=sy2pFYeXOTBQJUPqadkFIXq5lzPIgQxhI8DCCAdSjYc=N3_BTL1Tt2ryeleRqn2wc-R4w3v0TnI7dlgnwdQ7zE8=ZcS2AM_EDHBz-z5_zSpTo9mbsyyT-_wUTeVj75__FkI=1C3vp4k2j0zaWcbCujUmZh6wrvLbP0DmRnE_5y5sS3c=
>
>
>
> The /etc/baculum/Data-apache/baculum.dbg file shows:
>
>
>
> Feb 07 20:18:37 [Info] [Execute] DBParams=Array
>
> (
>
> [type] => mysql
>
> [name] 

Re: [Bacula-users] Baculum error connecting to MySQL DB

2018-02-07 Thread Marcin Haba
Hello Shawn,

It looks that you use an old Baculum version (7.x). I would suggest to
remove the 7.x and install 9.x (there is no direct update way between
versions 7 and 9). Here you can find how to install version Baculum
9.x:

http://www.bacula.org/9.0.x-manuals/en/console/Baculum_API_Web_GUI_Tools.html

If you want to stay in version 7 then you can try the following:

1) To check connection try to connect to database by below mysql
command on host with Baculum:

mysql -u bacula -h xbacdirector01-lv -P 3306 bacula -p

2) check if you have installed "php-mysql" package

3) To fix your timezone setting (not related to the mysql) you can
find in /etc/php.ini file line:

;date.timezone =

and change it to

data.timezone = Your/Timezone

Supported by PHP timezone list is here:

http://php.net/manual/en/timezones.php

At the end you need to restart the web server.

Good luck.

Best regards.
Marcin Haba (gani)

On 7 February 2018 at 23:47, Shawn Rappaport  wrote:
> I’m new to Bacula. I’ve been playing with the latest version for the past
> couple of days on a CentOS 7.3 server with a MySQL DB. I’m now trying to set
> up Baculum. I’m able to connect to the web interface. However, when I fill
> in all of the DB information on the Database tab and click Test, I get
> “Connection error”. I checked /var/log/httpd/baculum-error.log and see the
> following:
>
>
>
> [Wed Feb 07 12:18:37.550545 2018] [:error] [pid 10647] [client
> 172.31.48.196:53501] PHP Notice:  date_default_timezone_set(): Timezone ID
> 'PST' is invalid in /usr/share/baculum/htdocs/protected/Init.php on line 31,
> referer: http://xbacdirector01-lv:9095/wizard/
>
>
>
> The /etc/baculum/Data-apache/baculum.dbg file shows:
>
>
>
> Feb 07 20:18:37 [Info] [Execute] DBParams=Array
>
> (
>
> [type] => mysql
>
> [name] => bacula
>
> [login] => bacula
>
> [password] => **
>
> [host] => xbacdirector01-lv
>
> [port] => 3306
>
> )
>
> , Connection=false, TablesFormat=NULL
>
>
>
> I’m able to connect to the database from a remote host so that shouldn’t be
> a problem.
>
>
>
> Does anyone have any ideas on what could be causing this connection to fail?
>
>
>
> Thanks!
>
>
>
> --Shawn
>
>
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
>



-- 
"Greater love hath no man than this, that a man lay down his life for
his friends." Jesus Christ

"Większej miłości nikt nie ma nad tę, jak gdy kto życie swoje kładzie
za przyjaciół swoich." Jezus Chrystus

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] Baculum error connecting to MySQL DB

2018-02-07 Thread Shawn Rappaport
I’m new to Bacula. I’ve been playing with the latest version for the past 
couple of days on a CentOS 7.3 server with a MySQL DB. I’m now trying to set up 
Baculum. I’m able to connect to the web interface. However, when I fill in all 
of the DB information on the Database tab and click Test, I get “Connection 
error”. I checked /var/log/httpd/baculum-error.log and see the following:

[Wed Feb 07 12:18:37.550545 2018] [:error] [pid 10647] [client 
172.31.48.196:53501] PHP Notice:  date_default_timezone_set(): Timezone ID 
'PST' is invalid in /usr/share/baculum/htdocs/protected/Init.php on line 31, 
referer: http://xbacdirector01-lv:9095/wizard/

The /etc/baculum/Data-apache/baculum.dbg file shows:

Feb 07 20:18:37 [Info] [Execute] DBParams=Array
(
[type] => mysql
[name] => bacula
[login] => bacula
[password] => **
[host] => xbacdirector01-lv
[port] => 3306
)
, Connection=false, TablesFormat=NULL

I’m able to connect to the database from a remote host so that shouldn’t be a 
problem.

Does anyone have any ideas on what could be causing this connection to fail?

Thanks!

--Shawn
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users