Hi Daniel,

You need to update the pg_hba.conf on the postgres server side.

Here's below an extract of one of my postgreSQL server pg_hba.conf

# TYPE  DATABASE        USER            ADDRESS                 METHOD
...
host    bacula          bacula          192.168.1.0/24          md5
...

You must add above line (adapt the address to fit to your environment.

then reload postgreSQL service.

You can test it from the server where you installed Bacula-Web with this
command

$ psql -h db-server.domain.com -U bacula -p 5432 -d bacula -W

If you are running RHEL 9, please have a look at
https://www.bacula-web.org/docs/install/selinux

Hope it helps.

p.s: I'll update the documentation for both MySQL/MariaDB and postgreSQL.

Best,

Davide

On Wed, Nov 27, 2024 at 9:47 PM White, Daniel E. (GSFC-764.0)[AEGIS] via
Bacula-users <bacula-users@lists.sourceforge.net> wrote:

> Community Bacula 15.0.2 on RHEL 9 from https://www.bacula.org/packages/<access
> key>/rpms/15.0.2/el9/x86_64/
>
> Bacula-web installed with Composer
>
> I set up "authentication":
>
> ----------------------------------------------
>
> sudo -u apache php bwc setupauth
>
> It's now time to setup the application back-end database
> [Important!] Please note that all information stored in the user database
> will be destroyed
> Can we proceed ?
>   [0] yes
>   [1] no
>  > 0
> You have selected: yes
> Deleting users authentication database
> Database file removed
> Creating database schema
> Database created
> User creation
> Username: admin
> Email: <redacted>
> Password: <redacted>
> 1 user created successfuly
> You can now connect to your Bacula-Web instance using provided credentials
>
> ----------------------------------------------
>
> If I leave the database section of "config.php" commented out,
>
> // PostgreSQL bacula catalog
> // $config[0]['label'] = 'Prod Server';
> // $config[0]['host'] = 'db-server.domain.com';
> // $config[0]['login'] = 'bacula';
> // $config[0]['password'] = 'otherstrongpassword';
> // $config[0]['db_name'] = 'bacula';
> // $config[0]['db_type'] = 'pgsql';
> // $config[0]['db_port'] = '5432';
>
> ----------------------------------------------
>
> I get this: (abbreviated)
>
> 200~Bacula-Web logo Bacula-Web
>  Oops, it looks like something went wrong somehow :(
>  Configuration error
>  Configuration error: catalog id <0> is empty or does not exist
>  File: /var/www/html/bacula-web/core/Db/Database.php on line 54 in
> function App\Libs\FileConfig::get_Value
>  File: /var/www/html/bacula-web/core/Db/DatabaseFactory.php on line 36 in
> function Core\Db\Database->__construct
>  File: /var/www/html/bacula-web/application/config/container-bindings.php
> on line 68 in function Core\Db\DatabaseFactory::getDatabase
>
> ----------------------------------------------
>
> If I fill it in,
>
> ----------------------------------------------
>
> // PostgreSQL bacula catalog
> $config[0]['label'] = 'Prod Server';
> $config[0]['host'] = 'db-server.domain.com';
> $config[0]['login'] = 'bacula';
> $config[0]['password'] = '<redacted>';
> $config[0]['db_name'] = 'bacula';
> $config[0]['db_type'] = 'pgsql';
> $config[0]['db_port'] = '5432';
>
> ----------------------------------------------
>
> I get this: (abbreviated)
>
> ----------------------------------------------
>
> 200~Bacula-Web logo Bacula-Web
>  Oops, it looks like something went wrong somehow :(
>  Database error
>  SQLSTATE[08006] [7] FATAL: Ident authentication failed for user "bacula"
>  File: /var/www/html/bacula-web/core/Db/Database.php on line 81 in
> function PDO->__construct
>  File: /var/www/html/bacula-web/core/Db/DatabaseFactory.php on line 36 in
> function Core\Db\Database->__construct
>  File: /var/www/html/bacula-web/application/config/container-bindings.php
> on line 68 in function Core\Db\DatabaseFactory::getDatabase
>
> ----------------------------------------------
>
> Any clues out there for this clueless one ?
>
>
>
> _______________________________________________
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
>
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to