Can't run bacula any more.

classic Classic list List threaded Threaded
79 messages Options
1234
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't run bacula any more.

Erik P. Olsen-3
On 2017-03-06 at 14:41:57 Josip Deanovic wrote:

> I would use these two steps to check that:
> 1. ldd <path_to_your_bacula-dir_binary>
>    check if you can find something like libmysqlclient in the
>    output.
>
> 2. Check if your /usr/lib64/libbaccats.so symlink points to the
>    correct library (mysql and not postgres). Modern distributions
>    are usually using alternatives(8) to manage this.

Thanks Josip,

1. ldd /usr/sbin/bacula-dir|grep libmysql
        libmysqlclient.so.18 => /usr/lib64/mysql/libmysqlclient.so.18
        (0x00007fa905d81000)

2. The symlink points correctly which it didn't in my first shots :-)

--
Regards,
Erik P. Olsen, M.Sc. EE
Solsortvej 30
DK-2000 Frederiksberg
Denmark
 

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't run bacula any more.

Erik P. Olsen-3
In reply to this post by Simone Caronni-2
On 2017-03-06 at 13:59:50 Simone Caronni wrote:

> There are super short tutorials inside the bacula-common package that
> you can use to bring up a quick installation with a client, director
> and storage daemons:
>
> $ rpm -qd bacula-common
> /usr/share/doc/bacula-common/README.Redhat
> /usr/share/doc/bacula-common/quickstart_mysql.txt
> /usr/share/doc/bacula-common/quickstart_postgresql.txt
> /usr/share/doc/bacula-common/quickstart_sqlite3.txt
>
> You can even do copy/paste and it will just work. Inside there is
> also the library switching for the director backend through
> update-alternatives.
>
> There is no need to disable SELinux, the Bacula daemon has policies
> for all the daemons, behaviours and file system contexts since many
> years now:
>
> # semanage fcontext -l | grep bacula
> /bacula(/.*)?                                      all files
>  system_u:object_r:bacula_store_t:s0
> /etc/bacula.*                                      all files
>  system_u:object_r:bacula_etc_t:s0
> /etc/rc\.d/init\.d/bacula.*                        regular file
> system_u:object_r:bacula_initrc_exec_t:s0
> /usr/sbin/bacula.*                                 regular file
> system_u:object_r:bacula_exec_t:s0
> /usr/sbin/bat                                      regular file
> system_u:object_r:bacula_admin_exec_t:s0
> /usr/sbin/bconsole                                 regular file
> system_u:object_r:bacula_admin_exec_t:s0
> /var/bacula(/.*)?                                  all files
>  system_u:object_r:bacula_store_t:s0
> /var/lib/bacula.*                                  all files
>  system_u:object_r:bacula_var_lib_t:s0
> /var/log/bacula.*                                  all files
>  system_u:object_r:bacula_log_t:s0
> /var/run/bacula.*                                  regular file
> system_u:object_r:bacula_var_run_t:s0
> /var/spool/bacula.*                                all files
>  system_u:object_r:bacula_spool_t:s0
> /var/spool/bacula/log(/.*)?                        all files
>  system_u:object_r:var_log_t:s0
>
> There is no need to turn off SELinux and is actually not recommended.
> Much like turning off your firewall and enabling password-less
> logins. If SELinux is denying you something because you used
> non-standard RHEL/Fedora locations, just add the appropriate contexts
> to your system (semanage fcontext -a).

Thanks Simone,

I'll look into all your advice as soon as possible. I've gone back to
do backups with my old retired machine since I can't be without backups
too long, so I'll wait till the coming weekend to work again on the
problem.

And I'll not touch my selinux setup. If a programme doesn't work with
selinux it won't be installed on my system.

--
Regards,
Erik P. Olsen, M.Sc. EE
Solsortvej 30
DK-2000 Frederiksberg
Denmark

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't run bacula any more.

Richard
In reply to this post by Erik P. Olsen-3


> Date: Monday, March 06, 2017 13:13:38 +0100
> From: "Erik P. Olsen" <[hidden email]>
>
> This is my catalogue definition:
>
>#
># Generic catalog service
>#
> Catalog {
>   Name = MyCatalog
>   dbname = "bacula"; dbuser = "bacula"; dbpassword = ""
> }
>
> I don't think there is any dbpassword. I tried to copy as much as
> possible from my old machine which does not use dbpassword and my
> tests for mysql connect seems to indicate that dbpassword is not
> needed.

There are scripts for setting up the mysql tables and permissions for
bacula. I believe that these are generally found in the
/etc/bacula/setup directory. Did you run these, or do the setup
manually (or none of the above)?



------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't run bacula any more.

Simone Caronni-2
In reply to this post by Erik P. Olsen-3
Hi Erik,

On Mon, Mar 6, 2017 at 3:21 PM, Erik P. Olsen <[hidden email]> wrote:
I'll look into all your advice as soon as possible.

actually, if there's anything obvious missing please let me know and I'll add it. The procedure in the quickstart files is automated on my system for checking discrepancies with various versions.

I don't see anything missing at the moment to bring up a working installation just by following those.

For the curious, the 3 how tos for Fedora are here:


They are differing only for the alternatives command and the table creations.

Regards,
--Simone


--
You cannot discover new oceans unless you have the courage to lose sight of the shore (R. W. Emerson).

http://xkcd.com/229/
http://negativo17.org/

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't run bacula any more.

Erik P. Olsen-3
In reply to this post by Richard
On 2017-03-06 at 14:27:18 Richard wrote:

> > Date: Monday, March 06, 2017 13:13:38 +0100
> > From: "Erik P. Olsen" <[hidden email]>
> >
> > This is my catalogue definition:
> >
> >#
> ># Generic catalog service
> >#
> > Catalog {
> >   Name = MyCatalog
> >   dbname = "bacula"; dbuser = "bacula"; dbpassword = ""
> > }
> >
> > I don't think there is any dbpassword. I tried to copy as much as
> > possible from my old machine which does not use dbpassword and my
> > tests for mysql connect seems to indicate that dbpassword is not
> > needed.  
>
> There are scripts for setting up the mysql tables and permissions for
> bacula. I believe that these are generally found in the
> /etc/bacula/setup directory. Did you run these, or do the setup
> manually (or none of the above)?

No, I don't have /etc/bacula/setup on my system. I used the scripts
in /usr/libexec/bacula but maybe in a wrong sequence because I had to
redo some of them.

--
Regards,
Erik P. Olsen, M.Sc. EE
Solsortvej 30
DK-2000 Frederiksberg
Denmark


 

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't run bacula any more.

Erik P. Olsen-3
In reply to this post by Simone Caronni-2
Hello Simone

On 2017-03-06 at 13:59:50 Simone Caronni wrote:

> /usr/share/doc/bacula-common/quickstart_mysql.txt
 
I followed your recipe but it failed at echo status dir=bacula-dir |
bconsole. Adding -d100 gave:

 Connecting to Director 192.168.1.36:9101
bconsole: bsock.c:203-0 Current 192.168.1.36:9101 All 192.168.1.36:9101
bconsole: bsock.c:278-0 Could not connect to server Director daemon
 192.168.1.36:9101. ERR=Connection refused

bacula-dir, bacula-fd, bacula-sd and bconsole are all installed on the
same system and firewall is set to open ports 9101-9103 for all
including mysqld.

What's so strange is that this system on my new laptop is a clone of my
desktop on which I have no problem running bacula. Only difference is
the IP-address of the director. I currently can't see any way to get
bacula to work on the new machine. And there is no help from the
manuals. Too bad.

--
Regards,
Erik P. Olsen, M.Sc. EE
Solsortvej 30
DK-2000 Frederiksberg
Denmark

------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't run bacula any more.

Gary R. Schmidt-3
On 11/03/2017 22:00, Erik P. Olsen wrote:
[SNIP]
> Only difference is
> the IP-address of the director.

Sounds like you have the old address set in some configuration file(s)
somewhere.

Run the director in the foreground with -d100.

Run the fd in the foreground with -d100.

Run the sd in the foreground with -d100.

Then run bconsole with -d100 and see what happens.

Oh, and when I say "foreground" I mean use a separate xterm or equivalent.

        Cheers,
                Gary B-)


------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't run bacula any more.

Erik P. Olsen-3
On 2017-03-12 at 00:38:58 Gary R. Schmidt wrote:

> On 11/03/2017 22:00, Erik P. Olsen wrote:
> [SNIP]
> > Only difference is
> > the IP-address of the director.  
>
> Sounds like you have the old address set in some configuration
> file(s) somewhere.
>
> Run the director in the foreground with -d100.

[root@Erik-PC ~]# bacula-dir -d100
bacula-dir: dird.c:208-0 Debug level = 100
bacula-dir: address_conf.c:274-0 Initaddr 0.0.0.0:9101
[root@Erik-PC ~]# bacula-dir: dird_conf.c:1958-0 runscript cmd=prune
expired volume yes type=@ bacula-dir: dird_conf.c:1958-0 runscript
cmd=/usr/libexec/bacula/make_catalog_backup.pl MyCatalog type=|
bacula-dir: dird_conf.c:1958-0 runscript cmd=truncate
storage=FileStorage pool=Files type=@ bacula-dir: dird_conf.c:1958-0
runscript cmd=truncate storage=CatalogueStorage pool=Catalogues type=@
bacula-dir: dird_conf.c:1958-0 runscript
cmd=/usr/libexec/bacula/delete_catalogue_backup type=| bacula-dir:
jcr.c:131-0 read_last_jobs seek to 192 bacula-dir: jcr.c:138-0 Read
num_items=0 bacula-dir: dir_plugins.c:151-0 Load Director plugins
bacula-dir: dir_plugins.c:153-0 No Director plugin directory!
bacula-dir: mysql.c:119-0 db_init_database first time bacula-dir:
mysql.c:218-0 mysql_init done bacula-dir: mysql.c:257-0
mysql_real_connect done bacula-dir: mysql.c:259-0 db_user=bacula
db_name=bacula db_password= bacula-dir: mysql.c:269-0 Error 1044
(42000): Access denied for user ''@'localhost' to database 'bacula'
bacula-dir: dird.c:969-0 Could not open Catalog "MyCatalog", database
"bacula". bacula-dir: dird.c:974-0 mysql.c:265 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:319-0 closedb ref=0 connected=0 db=0 11-mar 21:07 bacula-dir
ERROR TERMINATION Please correct configuration file: bacula-dir.conf

> Run the fd in the foreground with -d100.

[root@Erik-PC ~]# bacula-fd -d100
bacula-fd: filed_conf.c:542-0 Inserting Director res: epo-mon
bacula-fd: address_conf.c:274-0 Initaddr 0.0.0.0:9102
[root@Erik-PC ~]# epo-fd: jcr.c:131-0 read_last_jobs seek to 192
epo-fd: jcr.c:138-0 Read num_items=10
epo-fd: filed.c:257-0 filed: listening on port 9102
epo-fd: bnet_server.c:86-0 Addresses 0.0.0.0:9102

> Run the sd in the foreground with -d100.

[root@Erik-PC ~]# bacula-sd -d100
bacula-sd: address_conf.c:274-0 Initaddr 0.0.0.0:9103
bacula-sd: stored_conf.c:698-0 Inserting Director res: epo-mon
bacula-sd: stored_conf.c:698-0 Inserting Device res: FileBackup
[root@Erik-PC ~]# epo-sd: jcr.c:131-0 read_last_jobs seek to 192
epo-sd: jcr.c:138-0 Read num_items=0
epo-sd: stored.c:572-0 calling init_dev /backupdisk/bacula-catalogues
epo-sd: dev.c:342-0 init_dev: tape=0 dev_name=/backupdisk/bacula-catalogues
epo-sd: stored.c:574-0 SD init done /backupdisk/bacula-catalogues
epo-sd: bnet_server.c:86-0 Addresses 0.0.0.0:9103
epo-sd: acquire.c:673-0 Attach 0x38001c58 to dev "CatalogueBackup" (/backupdisk/bacula-catalogues)
epo-sd: stored.c:572-0 calling init_dev /backupdisk/bacula-files
epo-sd: dev.c:342-0 init_dev: tape=0 dev_name=/backupdisk/bacula-files
epo-sd: stored.c:574-0 SD init done /backupdisk/bacula-files
epo-sd: acquire.c:673-0 Attach 0x38002c58 to dev
"FileBackup" (/backupdisk/bacula-files)

> Then run bconsole with -d100 and see what happens.
[root@Erik-PC ~]# bconsole -d100
Connecting to Director 192.168.1.36:9101
bconsole: bsock.c:203-0 Current 192.168.1.36:9101 All 192.168.1.36:9101
bconsole: bsock.c:278-0 Could not connect to server Director daemon 192.168.1.36:9101. ERR=Connection refused
bconsole: bsock.c:101-0 Unable to connect to Director daemon on 192.168.1.36:9101. ERR=Connection refused
bconsole: bsock.c:203-0 Current 192.168.1.36:9101 All 192.168.1.36:9101
bconsole: bsock.c:278-0 Could not connect to server Director daemon 192.168.1.36:9101. ERR=Connection refused
bconsole: bsock.c:101-0 Unable to connect to Director daemon on 192.168.1.36:9101. ERR=Connection refused
bconsole: bsock.c:203-0 Current 192.168.1.36:9101 All 192.168.1.36:9101
bconsole: bsock.c:278-0 Could not connect to server Director daemon 192.168.1.36:9101. ERR=Connection refused
bconsole: bsock.c:101-0 Unable to connect to Director daemon on
192.168.1.36:9101. ERR=Connection refused

I can't really make anything out of this :-(

--
Regards,
Erik P. Olsen, M.Sc. EE
Solsortvej 30
DK-2000 Frederiksberg
Denmark


------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't run bacula any more.

Heitor Faria
Hello, Erik,

"mysql_real_connect done bacula-dir: mysql.c:259-0 db_user=bacula
db_name=bacula db_password= bacula-dir: mysql.c:269-0 Error 1044
(42000): Access denied for user ''@'localhost' to database 'bacula'
bacula-dir: dird.c:969-0 Could not open Catalog "MyCatalog", database
"bacula". bacula-dir: dird.c:974-0 mysql.c:265 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:319-0 closedb ref=0 connected=0 db=0 11-mar 21:07 bacula-dir
ERROR TERMINATION Please correct configuration file: bacula-dir.conf"

Your director daemon is "abending" right after you start it because it can't connect to MySQL Bacula catalog (you should have more friendly messages about that in your Bacula log).
Verify if bacula database, tables and user are created, MySQL service is running and has correct credentials.
Bacula database user and password is set at bacula-dir.conf, Catalog resource.

Regards,
--
===========================================================================
Heitor Medrado de Faria - LPIC-III | ITIL-F | Bacula Systems Certified Administrator II
• Do you need Bacula training? http://bacula.us/video-classes/ 
+55 61 8268-4220 | http://bacula.us 
===========================================================================

------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't run bacula any more.

Kern Sibbald
Hello Erik,

You probably forgot to run the ./grant_mysql_permissions script.

Best regards,
Kern

On 03/11/2017 11:28 PM, Heitor Faria wrote:

> Hello, Erik,
>
> "mysql_real_connect done bacula-dir: mysql.c:259-0 db_user=bacula
> db_name=bacula db_password= bacula-dir: mysql.c:269-0 Error 1044
> (42000): Access denied for user ''@'localhost' to database 'bacula'
> bacula-dir: dird.c:969-0 Could not open Catalog "MyCatalog", database
> "bacula". bacula-dir: dird.c:974-0 mysql.c:265 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:319-0 closedb ref=0 connected=0 db=0 11-mar 21:07 bacula-dir
> ERROR TERMINATION Please correct configuration file: bacula-dir.conf"
>
> Your director daemon is "abending" right after you start it because it can't connect to MySQL Bacula catalog (you should have more friendly messages about that in your Bacula log).
> Verify if bacula database, tables and user are created, MySQL service is running and has correct credentials.
> Bacula database user and password is set at bacula-dir.conf, Catalog resource.
>
> Regards,



------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't run bacula any more.

Erik P. Olsen-3
Hello Kern,

On 2017-03-12 at 07:05:49 Kern Sibbald wrote:

> You probably forgot to run the ./grant_mysql_permissions script.
 
No, I did not forget because I didn't know and this script is not on my
system and further more it is not mentioned in the manual.

--
Regards,
Erik P. Olsen, M.Sc. EE
Solsortvej 30
DK-2000 Frederiksberg
Denmark

------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't run bacula any more.

Kern Sibbald
Hello Erik,

Here is a section of the manual regarding getting MySQL running:

============================

Installing and Configuring MySQL - Phase II

At this point, you should have built and installed MySQL, or already have a running MySQL, and you should have configured, built and installed Bacula. If not, please complete these items before proceeding.

Please note that the ./configure used to build Bacula will need to include --with-mysql=mysql-directory, where mysql-directory is the directory name that you specified on the ./configure command for configuring MySQL. This is needed so that Bacula can find the necessary include headers and library files for interfacing to MySQL.

Bacula will install scripts for manipulating the database (create, delete, make tables etc) into the main installation directory. These files will be of the form *_bacula_* (e.g. create_bacula_database). These files are also available in the bacula-src/src/cats directory after running ./configure. If you inspect create_bacula_database, you will see that it calls create_mysql_database. The *_bacula_* files are provided for convenience. It doesn't matter what database you have chosen; create_bacula_database will always create your database.

Now you will create the Bacula MySQL database and the tables that Bacula uses.

  1. Start mysql. You might want to use the startmysql script provided in the Bacula release.

  2. cd install-directory This directory contains the Bacula catalog interface routines.

  3. ./grant_mysql_privileges This script creates unrestricted access rights for the user bacula. You may want to modify it to suit your situation. Please note that none of the userids, including root, are password protected. If you need more security, please assign a password to the root user and to bacula. The program mysqladmin can be used for this.

  4. ./create_mysql_database This script creates the MySQL bacula database. The databases you create as well as the access databases will be located in install-dir/var/ in a subdirectory with the name of the database, where install-dir is the directory name that you specified on the --prefix option. This can be important to know if you want to make a special backup of the Bacula database or to check its size.

  5. ./make_mysql_tables This script creates the MySQL tables used by Bacula.

Each of the three scripts (grant_mysql_privileges, create_mysql_database and make_mysql_tables) allows the addition of a command line argument. This can be useful for specifying the user and or password. For example, you might need to add -u root to the command line to have sufficient privilege to create the Bacula tables.

To take a closer look at the access privileges that you have setup with the above, you can do:

<mysql-directory>/bin/mysql -u root mysql
select * from user;

Newer versions of MySQL (e.g. 5.7) do not automatically create a user when granting permissions with the grant_mysql_privileges, and so the script may fail. In that case, you will want to do something similar to the following:

su
(enter root password)
<mysql-directory>/bin/mysql mysql
create user bacula identified by '<password>';

then re-run the script.
==============================================

If you have installed Bacula, the script is normally in the scripts directory.  Otherwise if you have the source code, it is in <bacula>/src/cats

Best regards,

Kern




On 03/12/2017 09:08 AM, Erik P. Olsen wrote:
Hello Kern,

On 2017-03-12 at 07:05:49 Kern Sibbald wrote:

You probably forgot to run the ./grant_mysql_permissions script.
 
No, I did not forget because I didn't know and this script is not on my
system and further more it is not mentioned in the manual.

--
Regards,
Erik P. Olsen, M.Sc. EE
Solsortvej 30
DK-2000 Frederiksberg
Denmark



------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't run bacula any more.

Simone Caronni-2
In reply to this post by Erik P. Olsen-3
On Sun, Mar 12, 2017 at 9:08 AM, Erik P. Olsen <[hidden email]> wrote:
On 2017-03-12 at 07:05:49 Kern Sibbald wrote:

> You probably forgot to run the ./grant_mysql_permissions script.

No, I did not forget because I didn't know and this script is not on my
system and further more it is not mentioned in the manual.

This is just some misunderstanding on the name of the script, it's not "permissions" but "privileges":


Nothing serious I would say.

Regards,
--Simone 



--
You cannot discover new oceans unless you have the courage to lose sight of the shore (R. W. Emerson).

http://xkcd.com/229/
http://negativo17.org/

------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't run bacula any more.

Erik P. Olsen-3
In reply to this post by Kern Sibbald
Hello Kern,

I've read the manual numerous times and followed the instructions again
and again.

mysql mysql
> select * from user;

works OK, so I assume everything is OK with the database and the access
privileges. There seems nothing I can do other than continue taking
backups from my old desktop which for other reasons is not advisable.

--
Regards,
Erik P. Olsen, M.Sc. EE
Solsortvej 30
DK-2000 Frederiksberg
Denmark


On 2017-03-12 at 09:20:15 Kern Sibbald wrote:

> Hello Erik,
>
> Here is a section of the manual regarding getting MySQL running:
>


 

------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't run bacula any more.

Richard


> Date: Sunday, March 12, 2017 11:53:57 +0100
> From: "Erik P. Olsen" <[hidden email]>
> To: Kern Sibbald <[hidden email]>
>
> Hello Kern,
>
> I've read the manual numerous times and followed the instructions
> again and again.
>
> mysql mysql
>> select * from user;
>
> works OK, so I assume everything is OK with the database and the
> access privileges. There seems nothing I can do other than continue
> taking backups from my old desktop which for other reasons is not
> advisable.
>

Looking back through all the messages in this thread, it appears that
you have two problems. One is that you can't connect to the director
daemon:

   bconsole: bsock.c:278-0 Could not connect to server Director
   daemon 192.168.1.36:9101. ERR=Connection refused

You likely need to fix the configuration in your bacula bconsole.conf
file.


The other is your db setup/access:

   Error 1044 (42000): Access denied for user ''@'localhost' to
   database 'bacula' bacula-dir: dird.c:969-0 Could not open
   Catalog "MyCatalog", database "bacula"


The sequence that you have tried:

   > mysql mysql
   >> select * from user;

doesn't tell you much of anything related to bacula. The "mysql" db
and "user" table are part of the mysql basic setup so will always be
there if you have mysql/mariadb installed and configured.

What you need to test for bacula is the existence of the db "bacula"
and (access to the) tables within that.

Start with the command:

   mysql -h <dbhost> -u bacula

[if you have changed the defaults in the "Catalog" section of your
bacula-dir.conf you will need to make the necessary adjustments to
the above.]

from the machine where you have the bacula-sd installed. If they are
all on the same (new) machine, then the "-h <dbhost>" part is
unnecessary.

This should get you the mysql herald and "mysql>" prompt. Assuming it
does, issue the command:

   show databases;

that should give you a list that includes "bacula". Assuming so, then:

   use bacula;
and:
   show tables;

Assuming no errors, the last command should give you a list of 20+
tables. Try issuing a:

   select * from <tablename>;

for any of them [e.g., "Client" or "Job"). Given that you haven't
done any backups yet they should be empty, but being able to read a
table goes somewhat to the access issue. You should also try
inserting a (minimal) record into one of the tables to see if you
have write access. You'll want to delete it if successful.

If any of this fails, try:

   use mysql;
   select * from user where User="bacula";

and let us know what gets returned.

Based on the results we can suggest further actions.



------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't run bacula any more.

Erik P. Olsen-3
On 2017-03-12 at 13:54:37 Richard wrote:

> Looking back through all the messages in this thread, it appears that
> you have two problems. One is that you can't connect to the director
> daemon:
>
>    bconsole: bsock.c:278-0 Could not connect to server Director
>    daemon 192.168.1.36:9101. ERR=Connection refused

If I add -d1000 to the bconsole command I get a few more trace lines
which show that bconsole does connect to the director daemon. For
example it reads the director password from the daemon and later issues
the misleading message about not being able to connect. Apparently it
refuses the connection because the director is unable to access the
database. That leads to the second problem you mentioned. I'll look
into that and get back with what I find.

I appreciate the information you gave because I know next to
nothing about sql databases.

--
Regards,
Erik P. Olsen, M.Sc. EE
Solsortvej 30
DK-2000 Frederiksberg
Denmark


------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't run bacula any more.

Erik P. Olsen-3
In reply to this post by Richard
On 2017-03-12 at 13:54:37 Richard wrote:

> What you need to test for bacula is the existence of the db "bacula"
> and (access to the) tables within that.
>
> Start with the command:
>
>    mysql -h <dbhost> -u bacula
>
> [if you have changed the defaults in the "Catalog" section of your
> bacula-dir.conf you will need to make the necessary adjustments to
> the above.]
>
> from the machine where you have the bacula-sd installed. If they are
> all on the same (new) machine, then the "-h <dbhost>" part is
> unnecessary.
>
> This should get you the mysql herald and "mysql>" prompt. Assuming it
> does, issue the command:
>
>    show databases;
>
> that should give you a list that includes "bacula". Assuming so, then:
[snip]

mysql -u bacula

was OK.

show databases;

gave:

+--------------------+
| Database           |
+--------------------+
| information_schema |
| test               |
+--------------------+

So apparently the scripts did not create the bacula database. I'll have
to see why that happened.

Thanks for the information.

--
Regards,
Erik P. Olsen, M.Sc. EE
Solsortvej 30
DK-2000 Frederiksberg
Denmark


------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't run bacula any more.

Sven Hartge-5
In reply to this post by Richard
On 12.03.2017 14:54, Richard wrote:

> Looking back through all the messages in this thread, it appears that
> you have two problems. One is that you can't connect to the director
> daemon:

> The other is your db setup/access:

Both problems will be related. He cannot connect to the director with
bconsole because the director dies because the database is not reachable
or not setup correctly.

First step should be to fix the database so that the director daemon
starts correctly and _then_ see if this automagically fixes the problem
with bconsole (I think it will).

Grüße,
Sven.



------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't run bacula any more.

Erik P. Olsen-3
On 2017-03-12 at 15:31:35 Sven Hartge wrote:

> First step should be to fix the database so that the director daemon
> starts correctly and _then_ see if this automagically fixes the
> problem with bconsole (I think it will).
 
Yes. The big thing is how to fix it. I have reinstall mariadb, dropped
the database and reran the scripts from /usr/libexec/bacula to no avail.
Last efford will be to remove mariadb and install mysqld instead.

--
Regards,
Erik P. Olsen, M.Sc. EE
Solsortvej 30
DK-2000 Frederiksberg
Denmark

------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't run bacula any more.

Richard
In reply to this post by Erik P. Olsen-3


> Date: Sunday, March 12, 2017 17:33:40 +0100
> From: "Erik P. Olsen" <[hidden email]>
> To: Sven Hartge <[hidden email]>
>
> On 2017-03-12 at 15:31:35 Sven Hartge wrote:
>
>> First step should be to fix the database so that the director
>> daemon starts correctly and _then_ see if this automagically fixes
>> the problem with bconsole (I think it will).
>  
> Yes. The big thing is how to fix it. I have reinstall mariadb,
> dropped the database and reran the scripts from /usr/libexec/bacula
> to no avail. Last efford will be to remove mariadb and install
> mysqld instead.
>

I don't believe that this is a mysql/mariadb issue as they are
basically interchangeable. Rather, it appears that one or more of the
scripts for setting up the bacula db and tables for isn't getting run
[successfully].

Could you provide a list of the files in your /usr/libexec/bacula/
directory?


[please reply only to the list. do not include my direct address.]

------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
1234
Loading...