Postgres Server Unreachable

33 views
Skip to first unread message

Dustin Foudray

unread,
Dec 7, 2020, 7:57:13 PM12/7/20
to bareos-users
Hello all, I appreciate that there is such an active group for such a powerful backup software.  I'm having an issue where when I make some changed in the bareos-dir.d directory to any config file (mostly job & client) then restart the director it can't connect to the postgres DB anymore. Below is the log from a restart. 

I've confirmed that as the bareos user I can open psql.  The software was fully functional before the restart.  Postgres is running on port 5342, and I do not yet have a password for the bareos user set in postgres.

[root@xxx bareos-dir.d]# rpm -qa | grep bareos
bareos-database-tools-19.2.7-2.el7.x86_64
bareos-storage-19.2.7-2.el7.x86_64
bareos-common-19.2.7-2.el7.x86_64
bareos-database-common-19.2.7-2.el7.x86_64
bareos-director-19.2.7-2.el7.x86_64
bareos-tools-19.2.7-2.el7.x86_64
bareos-filedaemon-19.2.7-2.el7.x86_64
bareos-19.2.7-2.el7.x86_64
bareos-database-postgresql-19.2.7-2.el7.x86_64
bareos-bconsole-19.2.7-2.el7.x86_64
bareos-client-19.2.7-2.el7.x86_64
bareos-webui-19.2.7-2.el7.noarch

[root@xxx bareos-dir.d]# bareos-dbcheck -B
catalog=MyCatalog
db_name=bareos
db_driver=postgresql
db_user=bareos
db_password=
db_address=
db_port=0
db_socket=
db_type=PostgreSQL
working_dir=/var/lib/bareos

bareos-dir (100): cats/postgresql.cc:1031-0 db_init_database first time
bareos-dir (50): cats/postgresql.cc:243-0 pg_real_connect done
bareos-dir (50): cats/postgresql.cc:245-0 db_user=bareos db_name=bareos db_password=
bareos-dir: dird/check_catalog.cc:65-0 Could not open Catalog "MyCatalog", database "bareos".
bareos-dir (850): lib/message.cc:1309-0 Enter Jmsg type=3
bareos-dir (850): lib/message.cc:641-0 Enter DispatchMessage type=3 msg=bareos-dir JobId 0: Fatal error: Could not open Catalog "MyCatalog", database "bareos".
bareos-dir (850): lib/message.cc:873-0 APPEND for following msg: bareos-dir JobId 0: Fatal error: Could not open Catalog "MyCatalog", database "bareos".
bareos-dir (850): lib/message.cc:754-0 CONSOLE for following msg: bareos-dir JobId 0: Fatal error: Could not open Catalog "MyCatalog", database "bareos".
bareos-dir (850): lib/message.cc:757-0 Console file not open.
bareos-dir (850): lib/message.cc:847-0 MAIL for following msg: bareos-dir JobId 0: Fatal error: Could not open Catalog "MyCatalog", database "bareos".
bareos-dir (850): lib/message.cc:299-0 mailname=/var/lib/bareos/bareos-dir.bareos-dir.33583632.mail
bareos-dir (850): lib/message.cc:1309-0 Enter Jmsg type=3
bareos-dir (850): lib/message.cc:641-0 Enter DispatchMessage type=3 msg=bareos-dir JobId 0: Fatal error: cats/postgresql.cc:252 Unable to connect to PostgreSQL server. Database=bareos User=bareos
Possible causes: SQL server not running; password incorrect; max_connections exceeded.
bareos-dir (850): lib/message.cc:873-0 APPEND for following msg: bareos-dir JobId 0: Fatal error: cats/postgresql.cc:252 Unable to connect to PostgreSQL server. Database=bareos User=bareos
Possible causes: SQL server not running; password incorrect; max_connections exceeded.
bareos-dir (850): lib/message.cc:754-0 CONSOLE for following msg: bareos-dir JobId 0: Fatal error: cats/postgresql.cc:252 Unable to connect to PostgreSQL server. Database=bareos User=bareos
Possible causes: SQL server not running; password incorrect; max_connections exceeded.
bareos-dir (850): lib/message.cc:757-0 Console file not open.
bareos-dir (850): lib/message.cc:847-0 MAIL for following msg: bareos-dir JobId 0: Fatal error: cats/postgresql.cc:252 Unable to connect to PostgreSQL server. Database=bareos User=bareos
Possible causes: SQL server not running; password incorrect; max_connections exceeded.
bareos-dir: dird/check_catalog.cc:71-0 cats/postgresql.cc:252 Unable to connect to PostgreSQL server. Database=bareos User=bareos
Possible causes: SQL server not running; password incorrect; max_connections exceeded.
bareos-dir (850): lib/message.cc:1309-0 Enter Jmsg type=11
bareos-dir (850): lib/message.cc:641-0 Enter DispatchMessage type=11 msg=bareos-dir ERROR TERMINATION
Please correct the configuration in /etc/bareos/bareos-dir.d/*/*.conf
bareos-dir ERROR TERMINATION
Please correct the configuration in /etc/bareos/bareos-dir.d/*/*.conf
bareos-dir (850): lib/message.cc:873-0 APPEND for following msg: bareos-dir ERROR TERMINATION
Please correct the configuration in /etc/bareos/bareos-dir.d/*/*.conf
bareos-dir (850): lib/message.cc:754-0 CONSOLE for following msg: bareos-dir ERROR TERMINATION
Please correct the configuration in /etc/bareos/bareos-dir.d/*/*.conf
bareos-dir (850): lib/message.cc:757-0 Console file not open.
bareos-dir (850): lib/message.cc:847-0 MAIL for following msg: bareos-dir ERROR TERMINATION
Please correct the configuration in /etc/bareos/bareos-dir.d/*/*.conf

Dustin Foudray

unread,
Dec 12, 2020, 12:20:48 PM12/12/20
to bareos-users
I found that I just needed to remove the .pid lock manually, then for whatever reason even though it worked as root previously I needed to manually run `bareos-dir` as the bareos user, or just launch from systemctl which takes care of the user change on its own.
Reply all
Reply to author
Forward
0 new messages