Bacula-users

Re: [Bacula-users] can't connect to director

2014-07-27 12:30:58
Subject: Re: [Bacula-users] can't connect to director
From: Tim Dunphy <bluethundr AT gmail DOT com>
To: Bill Arlofski <waa-bacula AT revpol DOT com>
Date: Sun, 27 Jul 2014 12:24:52 -0400
HI Bill,

 Thanks for getting back to me on this! Ok, so let's take this a step at a time. I hope we can find a solution for this because I really need bacula to come online again. 

So, from the top. We've established that the database is there and that I can log in as the bacula user: 

[root@ops:/etc/bacula] #mysql -ubacula -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.

## redacted to save space ###

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

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

I tried a couple different grants for the DB user any of which should work I would think. 


mysql> select User,'@',Host  from user where User="bacula";

+--------+---+------------------+

| User   | @ | Host             |

+--------+---+------------------+

| bacula | @ | 10.122.95.91     |

| bacula | @ | localhost        |

| bacula | @ | ops.mydomain.com |

+--------+---+------------------+

3 rows in set (0.00 sec)


I selected only a few key elements to show that the user was there. Let me know if you'd like to see more info. 


This is what I have for DB grants: 


mysql> select * from db where User="bacula" AND Host="localhost" \G

*************************** 1. row ***************************

                 Host: localhost

                   Db: bacula

                 User: bacula

          Select_priv: Y

          Insert_priv: Y

          Update_priv: Y

          Delete_priv: Y

          Create_priv: Y

            Drop_priv: Y

           Grant_priv: N

      References_priv: Y

           Index_priv: Y

           Alter_priv: Y

Create_tmp_table_priv: Y

     Lock_tables_priv: Y

     Create_view_priv: Y

       Show_view_priv: Y

  Create_routine_priv: Y

   Alter_routine_priv: Y

         Execute_priv: Y

           Event_priv: Y

         Trigger_priv: Y

1 row in set (0.00 sec)

And the bacula tables are in the database: 


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

mysql> show tables;

+------------------+

| Tables_in_bacula |

+------------------+

| BaseFiles        |

| CDImages         |

| Client           |

| Device           |

| File             |

| FileSet          |

| Filename         |

| Job              |

| JobMedia         |

| Location         |

| LocationLog      |

| Log              |

| Media            |

| MediaType        |

| Path             |

| Pool             |

| Status           |

| Storage          |

| UnsavedFiles     |

| Version          |

+------------------+

20 rows in set (0.00 sec)


The bacula director service is running: 


[root@ops:/etc/bacula] #service bacula-dir status

bacula-dir (pid 2658) is running...


And it's listening on the right port: 

[root@ops:/etc/bacula] #netstat -tulpn | grep -i listen | grep bacula-dir

tcp        0      0 0.0.0.0:9101                0.0.0.0:*                   LISTEN      2658/bacula-dir



After that, you will need to make sure that the password in your bconsole.conf
matches the password in either bacula-dir's "Director" resource, or the
password in a bacula-dir  "Console" resource.

And yes, I've been able to verify that the database password matches what I have in the config.

Thanks so much for the advice. Now I just need to know where to go from here!

Thanks
Tim 



On Sun, Jul 27, 2014 at 10:45 AM, Bill Arlofski <waa-bacula AT revpol DOT com> wrote:

Hi Tim,


You showed that you can log into your mysql database, and that you can load
the bacula database, but you didn't show the output of a "show tables" command.

You need to make sure that the tables have been created in the Bacula
database, and that permissions have been granted to the mysql bacula user.

# mysql -u root -pPassword mysql

> select * from user where User="bacula";

and

> select * from db where User="bacula";

By default, the user "bacula" should have all access on Db "bacula" from
localhost.



If the DB looks OK, then you need to make sure the Bacula director is running
and bound to port 9101/TCP...

# service bacula-dir status


If the bacula-dir is running the following command should show it bound to
port 9101/TCP:

# netstat -tlpn

tcp   0  0 0.0.0.0:9101  0.0.0.0:*    LISTEN      15436/bacula-dir



After that, you will need to make sure that the password in your bconsole.conf
matches the password in either bacula-dir's "Director" resource, or the
password in a bacula-dir  "Console" resource.


Hope this helps.

Bill




--
Bill Arlofski
Reverse Polarity, LLC
http://www.revpol.com/
-- Not responsible for anything below this line --

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users



-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users