Re: [bareos-users] Re: /var/run/postgresql/.s.PGSQL.5432" failed: FATAL: role "bareos" does not exist

2023-11-30 Thread aeronex...@gmail.com
So, I figured that I was the only one as my configuation is very old and 
I do not update unless backups not working correctly.


So I am on Ubuntu 22.04 using Dell XPS13 running as a server.

Postgres is on a single server, no backup cluster. A script (in bareos) 
creates a download of all postgres databases incase of disaster.


psql (PostgreSQL) 14.9 (Ubuntu 14.9-0ubuntu0.22.04.1) after upgrade last 
saturday. (Don't really know what it was before saturday upgrade which 
is when i do regular ubuntu upgrades).


Is there any other info that would be helpful?

bee

On 11/30/23 4:26 AM, Bruno Friedmann (bruno-at-bareos) wrote:

Hello Jens, that would tend to prove the following.

When the upgraded packages are installed, the dbconfig should take 
care of the upgrade of the database. and only then the bareos-director 
should be restarted.


What you describe, seems to tell that for non expected reason the 
postgresql cluster instance is down when the director restart, which 
is as said: unexpected.


Would be great if someone else upgrading, can check in which state is 
the postgresql cluster after the dbconfig occur ?


Le mercredi 29 novembre 2023 à 21:46:05 UTC+1, jens.gr...@gmail.com a 
écrit :


Hi Bruno,

I had the same issue as Bruce had. I'm working on a Debian 11.8
system and the reboot was the only way to get bareos up and
running again.

Greetings, Jens

Bruno Friedmann (bruno-at-bareos) schrieb am Montag, 27. November
2023 um 10:30:32 UTC+1:

Hi Bruce, It look really weird to me, to have to reboot a
server due to Bareos update or upgrade.
Mostly update just need to restart services which all can be
done in one go with `systemctl restart bareos-dir bareos-sd
bareos-fd`

For upgrade, it has always been a good idea (beside reading
the documentation and changelog) to run the
/usr/lib/bareos/script/update_bareos_tables
/usr/lib/bareos/script/grant_bareos_privileges
Which update the database schema, and associated right
Then restart the service.

I would always in my case check each daemon before restart to
handle configuration warning deprecation etc.
`
bareos-dir -t -u bareos -g bareos
bareos-sd -t u bareos -g bareos
bareos-fd -t -u root -g bareos
`

If you still have to reboot, would be interesting to know
which platform requires that.
Le dimanche 26 novembre 2023 à 17:17:01 UTC+1, Bruce Eckstein
a écrit :

If this is the upgrade to version 23, I had a similar
issue. I needed to run
/usr/lib/bareos/script/update_bareos_tables to update the
tables in bareos. Then I had to reboot the server. I tried
to just reboot the postgresql but that did not work.
best of luck.

On Friday, May 5, 2023 at 4:39:51 AM UTC-4 DUCARROZ Birgit
wrote:

Hi,

Please can anyone help me with this issue?
--

sudo -u bareos -s

bareos@:/home/superuser$ psql

*psql: error: connection to server on socket
"/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:
role "bareos" does
not exist*



LOG- AND CONFIGURATION FILES:
--

netstat -nlp | grep 5432
tcp 0 0 127.0.0.1:5432  0.0.0.0:*
LISTEN 1218/postgres
unix 2 [ ACC ] STREAM LISTENING 59051 1218/postgres
/var/run/postgresql/.s.PGSQL.5432
--

ps axf | grep postgres
8021 pts/1 S+ 0:00 \_ grep
--color=auto postgres
1218 ? Ss 0:01 /usr/lib/postgresql/15/bin/postgres -D
/var/lib/postgresql/15/main -c
config_file=/etc/postgresql/15/main/postgresql.conf
1246 ? Ss 0:00 \_ postgres: 15/main: checkpointer
1247 ? Ss 0:00 \_ postgres: 15/main: background writer
1322 ? Ss 0:00 \_ postgres: 15/main: walwriter
1323 ? Ss 0:00 \_ postgres: 15/main: autovacuum launcher
1324 ? Ss 0:00 \_ postgres: 15/main: logical replication
launcher
--

/usr/sbin/bareos-dir -t
bareos-dir: dird/check_catalog.cc:64-0 Could not open
Catalog
"MyCatalog", database "bareos".
bareos-dir: dird/check_catalog.cc:71-0
cats/postgresql.cc:230 Unable to
connect to PostgreSQL server. Database=bareos 

[bareos-users] Re: /var/run/postgresql/.s.PGSQL.5432" failed: FATAL: role "bareos" does not exist

2023-11-30 Thread Bruno Friedmann (bruno-at-bareos)
Hello Jens, that would tend to prove the following.

When the upgraded packages are installed, the dbconfig should take care of 
the upgrade of the database. and only then the bareos-director should be 
restarted.

What you describe, seems to tell that for non expected reason the 
postgresql cluster instance is down when the director restart, which is as 
said: unexpected.

Would be great if someone else upgrading, can check in which state is the 
postgresql cluster after the dbconfig occur ?

Le mercredi 29 novembre 2023 à 21:46:05 UTC+1, jens.gr...@gmail.com a 
écrit :

> Hi Bruno,
>
> I had the same issue as Bruce had. I'm working on a Debian 11.8 system and 
> the reboot was the only way to get bareos up and running again.
>
> Greetings, Jens
>
> Bruno Friedmann (bruno-at-bareos) schrieb am Montag, 27. November 2023 um 
> 10:30:32 UTC+1:
>
>> Hi Bruce, It look really weird to me, to have to reboot a server due to 
>> Bareos update or upgrade.
>> Mostly update just need to restart services which all can be done in one 
>> go with `systemctl restart bareos-dir bareos-sd bareos-fd` 
>>
>> For upgrade, it has always been a good idea (beside reading the 
>> documentation and changelog) to run the 
>> /usr/lib/bareos/script/update_bareos_tables
>> /usr/lib/bareos/script/grant_bareos_privileges
>> Which update the database schema, and associated right 
>> Then restart the service.
>>
>> I would always in my case check each daemon before restart to handle 
>> configuration warning deprecation etc.
>> `
>> bareos-dir -t -u bareos -g bareos
>> bareos-sd -t u bareos -g bareos
>> bareos-fd -t -u root -g bareos
>> `
>>
>> If you still have to reboot, would be interesting to know which platform 
>> requires that.
>> Le dimanche 26 novembre 2023 à 17:17:01 UTC+1, Bruce Eckstein a écrit :
>>
>>> If this is the upgrade to version 23, I had a similar issue. I needed to 
>>> run /usr/lib/bareos/script/update_bareos_tables to update the tables in 
>>> bareos. Then I had to reboot the server. I tried to just reboot the 
>>> postgresql but that did not work.
>>> best of luck.
>>>
>>> On Friday, May 5, 2023 at 4:39:51 AM UTC-4 DUCARROZ Birgit wrote:
>>>
 Hi, 

 Please can anyone help me with this issue? 
 -- 
 sudo -u bareos -s 

 bareos@:/home/superuser$ psql 

 *psql: error: connection to server on socket 
 "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: role "bareos" does 
 not exist* 



 LOG- AND CONFIGURATION FILES: 
 -- 
 netstat -nlp | grep 5432 
 tcp 0 0 127.0.0.1:5432 0.0.0.0:* 
 LISTEN 1218/postgres 
 unix 2 [ ACC ] STREAM LISTENING 59051 1218/postgres 
 /var/run/postgresql/.s.PGSQL.5432 
 -- 
 ps axf | grep postgres 
 8021 pts/1 S+ 0:00 \_ grep 
 --color=auto postgres 
 1218 ? Ss 0:01 /usr/lib/postgresql/15/bin/postgres -D 
 /var/lib/postgresql/15/main -c 
 config_file=/etc/postgresql/15/main/postgresql.conf 
 1246 ? Ss 0:00 \_ postgres: 15/main: checkpointer 
 1247 ? Ss 0:00 \_ postgres: 15/main: background writer 
 1322 ? Ss 0:00 \_ postgres: 15/main: walwriter 
 1323 ? Ss 0:00 \_ postgres: 15/main: autovacuum launcher 
 1324 ? Ss 0:00 \_ postgres: 15/main: logical replication 
 launcher 
 -- 
 /usr/sbin/bareos-dir -t 
 bareos-dir: dird/check_catalog.cc:64-0 Could not open Catalog 
 "MyCatalog", database "bareos". 
 bareos-dir: dird/check_catalog.cc:71-0 cats/postgresql.cc:230 Unable to 
 connect to PostgreSQL server. Database=bareos User=bareos 
 Possible causes: SQL server not running; password incorrect; 
 max_connections exceeded. 
 (connection to server at "localhost" (127.0.0.1), port 5432 failed: 
 FATAL: password authentication failed for user "bareos" 
 connection to server at "localhost" (127.0.0.1), port 5432 failed: 
 FATAL: password authentication failed for user "bareos" 
 ) 
 bareos-dir ERROR TERMINATION 

 -- 

 /usr/sbin/bareos-dir --xc Catalog MyCatalog 
 Catalog { 
 Name = "MyCatalog" 
 DbAddress = "localhost" 
 DbPort = 5432 
 DbPassword = "test" 
 DbUser = "bareos" 
 DbName = "bareos" 
 } 
 -- 
 cat /etc/bareos/bareos-dir.d/catalog/MyCatalog.conf 
 Catalog { 
 Name = MyCatalog 
 dbname = bareos 
 dbaddress = 127.0.0.1 
 #dbaddress = localhost 
 dbport = 5432 
 dbuser = bareos 
 dbpassword = test 

 } 
 -- 
 cat /etc/dbconfig-common/bareos-database-common.conf 
 # automatically generated by the maintainer 

[bareos-users] Re: /var/run/postgresql/.s.PGSQL.5432" failed: FATAL: role "bareos" does not exist

2023-11-29 Thread jens.gr...@gmail.com
Hi Bruno,

I had the same issue as Bruce had. I'm working on a Debian 11.8 system and 
the reboot was the only way to get bareos up and running again.

Greetings, Jens

Bruno Friedmann (bruno-at-bareos) schrieb am Montag, 27. November 2023 um 
10:30:32 UTC+1:

> Hi Bruce, It look really weird to me, to have to reboot a server due to 
> Bareos update or upgrade.
> Mostly update just need to restart services which all can be done in one 
> go with `systemctl restart bareos-dir bareos-sd bareos-fd` 
>
> For upgrade, it has always been a good idea (beside reading the 
> documentation and changelog) to run the 
> /usr/lib/bareos/script/update_bareos_tables
> /usr/lib/bareos/script/grant_bareos_privileges
> Which update the database schema, and associated right 
> Then restart the service.
>
> I would always in my case check each daemon before restart to handle 
> configuration warning deprecation etc.
> `
> bareos-dir -t -u bareos -g bareos
> bareos-sd -t u bareos -g bareos
> bareos-fd -t -u root -g bareos
> `
>
> If you still have to reboot, would be interesting to know which platform 
> requires that.
> Le dimanche 26 novembre 2023 à 17:17:01 UTC+1, Bruce Eckstein a écrit :
>
>> If this is the upgrade to version 23, I had a similar issue. I needed to 
>> run /usr/lib/bareos/script/update_bareos_tables to update the tables in 
>> bareos. Then I had to reboot the server. I tried to just reboot the 
>> postgresql but that did not work.
>> best of luck.
>>
>> On Friday, May 5, 2023 at 4:39:51 AM UTC-4 DUCARROZ Birgit wrote:
>>
>>> Hi, 
>>>
>>> Please can anyone help me with this issue? 
>>> -- 
>>> sudo -u bareos -s 
>>>
>>> bareos@:/home/superuser$ psql 
>>>
>>> *psql: error: connection to server on socket 
>>> "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: role "bareos" does 
>>> not exist* 
>>>
>>>
>>>
>>> LOG- AND CONFIGURATION FILES: 
>>> -- 
>>> netstat -nlp | grep 5432 
>>> tcp 0 0 127.0.0.1:5432 0.0.0.0:* 
>>> LISTEN 1218/postgres 
>>> unix 2 [ ACC ] STREAM LISTENING 59051 1218/postgres 
>>> /var/run/postgresql/.s.PGSQL.5432 
>>> -- 
>>> ps axf | grep postgres 
>>> 8021 pts/1 S+ 0:00 \_ grep 
>>> --color=auto postgres 
>>> 1218 ? Ss 0:01 /usr/lib/postgresql/15/bin/postgres -D 
>>> /var/lib/postgresql/15/main -c 
>>> config_file=/etc/postgresql/15/main/postgresql.conf 
>>> 1246 ? Ss 0:00 \_ postgres: 15/main: checkpointer 
>>> 1247 ? Ss 0:00 \_ postgres: 15/main: background writer 
>>> 1322 ? Ss 0:00 \_ postgres: 15/main: walwriter 
>>> 1323 ? Ss 0:00 \_ postgres: 15/main: autovacuum launcher 
>>> 1324 ? Ss 0:00 \_ postgres: 15/main: logical replication 
>>> launcher 
>>> -- 
>>> /usr/sbin/bareos-dir -t 
>>> bareos-dir: dird/check_catalog.cc:64-0 Could not open Catalog 
>>> "MyCatalog", database "bareos". 
>>> bareos-dir: dird/check_catalog.cc:71-0 cats/postgresql.cc:230 Unable to 
>>> connect to PostgreSQL server. Database=bareos User=bareos 
>>> Possible causes: SQL server not running; password incorrect; 
>>> max_connections exceeded. 
>>> (connection to server at "localhost" (127.0.0.1), port 5432 failed: 
>>> FATAL: password authentication failed for user "bareos" 
>>> connection to server at "localhost" (127.0.0.1), port 5432 failed: 
>>> FATAL: password authentication failed for user "bareos" 
>>> ) 
>>> bareos-dir ERROR TERMINATION 
>>>
>>> -- 
>>>
>>> /usr/sbin/bareos-dir --xc Catalog MyCatalog 
>>> Catalog { 
>>> Name = "MyCatalog" 
>>> DbAddress = "localhost" 
>>> DbPort = 5432 
>>> DbPassword = "test" 
>>> DbUser = "bareos" 
>>> DbName = "bareos" 
>>> } 
>>> -- 
>>> cat /etc/bareos/bareos-dir.d/catalog/MyCatalog.conf 
>>> Catalog { 
>>> Name = MyCatalog 
>>> dbname = bareos 
>>> dbaddress = 127.0.0.1 
>>> #dbaddress = localhost 
>>> dbport = 5432 
>>> dbuser = bareos 
>>> dbpassword = test 
>>>
>>> } 
>>> -- 
>>> cat /etc/dbconfig-common/bareos-database-common.conf 
>>> # automatically generated by the maintainer scripts of 
>>> bareos-database-common 
>>> # any changes you make will be preserved, though your comments 
>>> # will be lost! to change your settings you should edit this 
>>> # file and then run "dpkg-reconfigure bareos-database-common" 
>>>
>>> # dbc_install: configure database with dbconfig-common? 
>>> # set to anything but "true" to opt out of assistance 
>>> dbc_install='true' 
>>>
>>> # dbc_upgrade: upgrade database with dbconfig-common? 
>>> # set to anything but "true" to opt out of assistance 
>>> dbc_upgrade='true' 
>>>
>>> # dbc_remove: deconfigure database with dbconfig-common? 
>>> # set to anything but "true" to opt out of assistance 
>>> dbc_remove='true' 
>>>
>>> # 

[bareos-users] Re: /var/run/postgresql/.s.PGSQL.5432" failed: FATAL: role "bareos" does not exist

2023-11-27 Thread Bruno Friedmann (bruno-at-bareos)
Hi Bruce, It look really weird to me, to have to reboot a server due to 
Bareos update or upgrade.
Mostly update just need to restart services which all can be done in one go 
with `systemctl restart bareos-dir bareos-sd bareos-fd` 

For upgrade, it has always been a good idea (beside reading the 
documentation and changelog) to run the 
/usr/lib/bareos/script/update_bareos_tables
/usr/lib/bareos/script/grant_bareos_privileges
Which update the database schema, and associated right 
Then restart the service.

I would always in my case check each daemon before restart to handle 
configuration warning deprecation etc.
`
bareos-dir -t -u bareos -g bareos
bareos-sd -t u bareos -g bareos
bareos-fd -t -u root -g bareos
`

If you still have to reboot, would be interesting to know which platform 
requires that.
Le dimanche 26 novembre 2023 à 17:17:01 UTC+1, Bruce Eckstein a écrit :

> If this is the upgrade to version 23, I had a similar issue. I needed to 
> run /usr/lib/bareos/script/update_bareos_tables to update the tables in 
> bareos. Then I had to reboot the server. I tried to just reboot the 
> postgresql but that did not work.
> best of luck.
>
> On Friday, May 5, 2023 at 4:39:51 AM UTC-4 DUCARROZ Birgit wrote:
>
>> Hi, 
>>
>> Please can anyone help me with this issue? 
>> -- 
>> sudo -u bareos -s 
>>
>> bareos@:/home/superuser$ psql 
>>
>> *psql: error: connection to server on socket 
>> "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: role "bareos" does 
>> not exist* 
>>
>>
>>
>> LOG- AND CONFIGURATION FILES: 
>> -- 
>> netstat -nlp | grep 5432 
>> tcp 0 0 127.0.0.1:5432 0.0.0.0:* 
>> LISTEN 1218/postgres 
>> unix 2 [ ACC ] STREAM LISTENING 59051 1218/postgres 
>> /var/run/postgresql/.s.PGSQL.5432 
>> -- 
>> ps axf | grep postgres 
>> 8021 pts/1 S+ 0:00 \_ grep 
>> --color=auto postgres 
>> 1218 ? Ss 0:01 /usr/lib/postgresql/15/bin/postgres -D 
>> /var/lib/postgresql/15/main -c 
>> config_file=/etc/postgresql/15/main/postgresql.conf 
>> 1246 ? Ss 0:00 \_ postgres: 15/main: checkpointer 
>> 1247 ? Ss 0:00 \_ postgres: 15/main: background writer 
>> 1322 ? Ss 0:00 \_ postgres: 15/main: walwriter 
>> 1323 ? Ss 0:00 \_ postgres: 15/main: autovacuum launcher 
>> 1324 ? Ss 0:00 \_ postgres: 15/main: logical replication 
>> launcher 
>> -- 
>> /usr/sbin/bareos-dir -t 
>> bareos-dir: dird/check_catalog.cc:64-0 Could not open Catalog 
>> "MyCatalog", database "bareos". 
>> bareos-dir: dird/check_catalog.cc:71-0 cats/postgresql.cc:230 Unable to 
>> connect to PostgreSQL server. Database=bareos User=bareos 
>> Possible causes: SQL server not running; password incorrect; 
>> max_connections exceeded. 
>> (connection to server at "localhost" (127.0.0.1), port 5432 failed: 
>> FATAL: password authentication failed for user "bareos" 
>> connection to server at "localhost" (127.0.0.1), port 5432 failed: 
>> FATAL: password authentication failed for user "bareos" 
>> ) 
>> bareos-dir ERROR TERMINATION 
>>
>> -- 
>>
>> /usr/sbin/bareos-dir --xc Catalog MyCatalog 
>> Catalog { 
>> Name = "MyCatalog" 
>> DbAddress = "localhost" 
>> DbPort = 5432 
>> DbPassword = "test" 
>> DbUser = "bareos" 
>> DbName = "bareos" 
>> } 
>> -- 
>> cat /etc/bareos/bareos-dir.d/catalog/MyCatalog.conf 
>> Catalog { 
>> Name = MyCatalog 
>> dbname = bareos 
>> dbaddress = 127.0.0.1 
>> #dbaddress = localhost 
>> dbport = 5432 
>> dbuser = bareos 
>> dbpassword = test 
>>
>> } 
>> -- 
>> cat /etc/dbconfig-common/bareos-database-common.conf 
>> # automatically generated by the maintainer scripts of 
>> bareos-database-common 
>> # any changes you make will be preserved, though your comments 
>> # will be lost! to change your settings you should edit this 
>> # file and then run "dpkg-reconfigure bareos-database-common" 
>>
>> # dbc_install: configure database with dbconfig-common? 
>> # set to anything but "true" to opt out of assistance 
>> dbc_install='true' 
>>
>> # dbc_upgrade: upgrade database with dbconfig-common? 
>> # set to anything but "true" to opt out of assistance 
>> dbc_upgrade='true' 
>>
>> # dbc_remove: deconfigure database with dbconfig-common? 
>> # set to anything but "true" to opt out of assistance 
>> dbc_remove='true' 
>>
>> # dbc_dbtype: type of underlying database to use 
>> # this exists primarily to let dbconfig-common know what database 
>> # type to use when a package supports multiple database types. 
>> # don't change this value unless you know for certain that this 
>> # package supports multiple database types 
>> dbc_dbtype='pgsql' 
>>
>> # dbc_dbuser: database user 
>> # the name of the user who we will use to connect to 

[bareos-users] Re: /var/run/postgresql/.s.PGSQL.5432" failed: FATAL: role "bareos" does not exist

2023-11-26 Thread Bruce Eckstein
If this is the upgrade to version 23, I had a similar issue. I needed to 
run /usr/lib/bareos/script/update_bareos_tables to update the tables in 
bareos. Then I had to reboot the server. I tried to just reboot the 
postgresql but that did not work.
best of luck.

On Friday, May 5, 2023 at 4:39:51 AM UTC-4 DUCARROZ Birgit wrote:

> Hi,
>
> Please can anyone help me with this issue?
> --
> sudo -u bareos -s
>
> bareos@:/home/superuser$ psql
>
> *psql: error: connection to server on socket 
> "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: role "bareos" does 
> not exist*
>
>
>
> LOG- AND CONFIGURATION FILES:
> --
> netstat -nlp | grep 5432
> tcp 0 0 127.0.0.1:5432 0.0.0.0:* 
> LISTEN 1218/postgres
> unix 2 [ ACC ] STREAM LISTENING 59051 1218/postgres 
> /var/run/postgresql/.s.PGSQL.5432
> --
> ps axf | grep postgres
> 8021 pts/1 S+ 0:00 \_ grep 
> --color=auto postgres
> 1218 ? Ss 0:01 /usr/lib/postgresql/15/bin/postgres -D 
> /var/lib/postgresql/15/main -c 
> config_file=/etc/postgresql/15/main/postgresql.conf
> 1246 ? Ss 0:00 \_ postgres: 15/main: checkpointer
> 1247 ? Ss 0:00 \_ postgres: 15/main: background writer
> 1322 ? Ss 0:00 \_ postgres: 15/main: walwriter
> 1323 ? Ss 0:00 \_ postgres: 15/main: autovacuum launcher
> 1324 ? Ss 0:00 \_ postgres: 15/main: logical replication 
> launcher
> --
> /usr/sbin/bareos-dir -t
> bareos-dir: dird/check_catalog.cc:64-0 Could not open Catalog 
> "MyCatalog", database "bareos".
> bareos-dir: dird/check_catalog.cc:71-0 cats/postgresql.cc:230 Unable to 
> connect to PostgreSQL server. Database=bareos User=bareos
> Possible causes: SQL server not running; password incorrect; 
> max_connections exceeded.
> (connection to server at "localhost" (127.0.0.1), port 5432 failed: 
> FATAL: password authentication failed for user "bareos"
> connection to server at "localhost" (127.0.0.1), port 5432 failed: 
> FATAL: password authentication failed for user "bareos"
> )
> bareos-dir ERROR TERMINATION
>
> --
>
> /usr/sbin/bareos-dir --xc Catalog MyCatalog
> Catalog {
> Name = "MyCatalog"
> DbAddress = "localhost"
> DbPort = 5432
> DbPassword = "test"
> DbUser = "bareos"
> DbName = "bareos"
> }
> --
> cat /etc/bareos/bareos-dir.d/catalog/MyCatalog.conf
> Catalog {
> Name = MyCatalog
> dbname = bareos
> dbaddress = 127.0.0.1
> #dbaddress = localhost
> dbport = 5432
> dbuser = bareos
> dbpassword = test
>
> }
> --
> cat /etc/dbconfig-common/bareos-database-common.conf
> # automatically generated by the maintainer scripts of 
> bareos-database-common
> # any changes you make will be preserved, though your comments
> # will be lost! to change your settings you should edit this
> # file and then run "dpkg-reconfigure bareos-database-common"
>
> # dbc_install: configure database with dbconfig-common?
> # set to anything but "true" to opt out of assistance
> dbc_install='true'
>
> # dbc_upgrade: upgrade database with dbconfig-common?
> # set to anything but "true" to opt out of assistance
> dbc_upgrade='true'
>
> # dbc_remove: deconfigure database with dbconfig-common?
> # set to anything but "true" to opt out of assistance
> dbc_remove='true'
>
> # dbc_dbtype: type of underlying database to use
> # this exists primarily to let dbconfig-common know what database
> # type to use when a package supports multiple database types.
> # don't change this value unless you know for certain that this
> # package supports multiple database types
> dbc_dbtype='pgsql'
>
> # dbc_dbuser: database user
> # the name of the user who we will use to connect to the database.
> dbc_dbuser='bareos'
>
> # dbc_dbpass: database user password
> # the password to use with the above username when connecting
> # to a database, if one is required
> dbc_dbpass='test'
>
> # dbc_dballow: allowed host to connect from
> # only for database types that support specifying the host from
> # which the database user is allowed to connect from
> # this string defines for which host the dbc_dbuser is allowed
> # to connect
> # this value is only really used again when you reconfigure the
> # package
> dbc_dballow='localhost'
>
> # dbc_dbserver: database host.
> # leave unset to use localhost (or a more efficient local method
> # if it exists).
> dbc_dbserver='localhost'
>
> # dbc_dbport: remote database port
> # leave unset to use the default. only applicable if you are
> # using a remote database.
> dbc_dbport='5432'
>
> # dbc_dbname: name of database
> # this is the name of your application's database.
> dbc_dbname='bareos'
>
> # dbc_dbadmin: name of the administrative user
> # this is the administrative user that is used to create all 

[bareos-users] Re: /var/run/postgresql/.s.PGSQL.5432" failed: FATAL: role "bareos" does not exist

2023-05-05 Thread Bruno Friedmann
Did you respect all steps to configure the database, espcially its initial 
3 
steps 
https://docs.bareos.org/bareos-22/IntroductionAndTutorial/InstallingBareos.html#prepare-bareos-database
and 
https://docs.bareos.org/bareos-22/IntroductionAndTutorial/InstallingBareos.html#id5

On Friday, May 5, 2023 at 10:39:51 AM UTC+2 DUCARROZ Birgit wrote:

> Hi,
>
> Please can anyone help me with this issue?
> --
> sudo -u bareos -s
>
> bareos@:/home/superuser$ psql
>
> *psql: error: connection to server on socket 
> "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: role "bareos" does 
> not exist*
>
>
>
> LOG- AND CONFIGURATION FILES:
> --
> netstat -nlp | grep 5432
> tcp 0 0 127.0.0.1:5432 0.0.0.0:* 
> LISTEN 1218/postgres
> unix 2 [ ACC ] STREAM LISTENING 59051 1218/postgres 
> /var/run/postgresql/.s.PGSQL.5432
> --
> ps axf | grep postgres
> 8021 pts/1 S+ 0:00 \_ grep 
> --color=auto postgres
> 1218 ? Ss 0:01 /usr/lib/postgresql/15/bin/postgres -D 
> /var/lib/postgresql/15/main -c 
> config_file=/etc/postgresql/15/main/postgresql.conf
> 1246 ? Ss 0:00 \_ postgres: 15/main: checkpointer
> 1247 ? Ss 0:00 \_ postgres: 15/main: background writer
> 1322 ? Ss 0:00 \_ postgres: 15/main: walwriter
> 1323 ? Ss 0:00 \_ postgres: 15/main: autovacuum launcher
> 1324 ? Ss 0:00 \_ postgres: 15/main: logical replication 
> launcher
> --
> /usr/sbin/bareos-dir -t
> bareos-dir: dird/check_catalog.cc:64-0 Could not open Catalog 
> "MyCatalog", database "bareos".
> bareos-dir: dird/check_catalog.cc:71-0 cats/postgresql.cc:230 Unable to 
> connect to PostgreSQL server. Database=bareos User=bareos
> Possible causes: SQL server not running; password incorrect; 
> max_connections exceeded.
> (connection to server at "localhost" (127.0.0.1), port 5432 failed: 
> FATAL: password authentication failed for user "bareos"
> connection to server at "localhost" (127.0.0.1), port 5432 failed: 
> FATAL: password authentication failed for user "bareos"
> )
> bareos-dir ERROR TERMINATION
>
> --
>
> /usr/sbin/bareos-dir --xc Catalog MyCatalog
> Catalog {
> Name = "MyCatalog"
> DbAddress = "localhost"
> DbPort = 5432
> DbPassword = "test"
> DbUser = "bareos"
> DbName = "bareos"
> }
> --
> cat /etc/bareos/bareos-dir.d/catalog/MyCatalog.conf
> Catalog {
> Name = MyCatalog
> dbname = bareos
> dbaddress = 127.0.0.1
> #dbaddress = localhost
> dbport = 5432
> dbuser = bareos
> dbpassword = test
>
> }
> --
> cat /etc/dbconfig-common/bareos-database-common.conf
> # automatically generated by the maintainer scripts of 
> bareos-database-common
> # any changes you make will be preserved, though your comments
> # will be lost! to change your settings you should edit this
> # file and then run "dpkg-reconfigure bareos-database-common"
>
> # dbc_install: configure database with dbconfig-common?
> # set to anything but "true" to opt out of assistance
> dbc_install='true'
>
> # dbc_upgrade: upgrade database with dbconfig-common?
> # set to anything but "true" to opt out of assistance
> dbc_upgrade='true'
>
> # dbc_remove: deconfigure database with dbconfig-common?
> # set to anything but "true" to opt out of assistance
> dbc_remove='true'
>
> # dbc_dbtype: type of underlying database to use
> # this exists primarily to let dbconfig-common know what database
> # type to use when a package supports multiple database types.
> # don't change this value unless you know for certain that this
> # package supports multiple database types
> dbc_dbtype='pgsql'
>
> # dbc_dbuser: database user
> # the name of the user who we will use to connect to the database.
> dbc_dbuser='bareos'
>
> # dbc_dbpass: database user password
> # the password to use with the above username when connecting
> # to a database, if one is required
> dbc_dbpass='test'
>
> # dbc_dballow: allowed host to connect from
> # only for database types that support specifying the host from
> # which the database user is allowed to connect from
> # this string defines for which host the dbc_dbuser is allowed
> # to connect
> # this value is only really used again when you reconfigure the
> # package
> dbc_dballow='localhost'
>
> # dbc_dbserver: database host.
> # leave unset to use localhost (or a more efficient local method
> # if it exists).
> dbc_dbserver='localhost'
>
> # dbc_dbport: remote database port
> # leave unset to use the default. only applicable if you are
> # using a remote database.
> dbc_dbport='5432'
>
> # dbc_dbname: name of database
> # this is the name of your application's database.
> dbc_dbname='bareos'
>
> # dbc_dbadmin: name of the administrative user
> # this is the administrative user that is 

[bareos-users] Re: /var/run/postgresql/.s.PGSQL.5432" failed: FATAL: role "bareos" does not exist

2023-05-05 Thread Serhii Zahuba
You need to create user bareos on you postgres server and give him rights 
to database bareos



пʼятниця, 5 травня 2023 р. о 11:39:51 UTC+3 DUCARROZ Birgit пише:

> Hi,
>
> Please can anyone help me with this issue?
> --
> sudo -u bareos -s
>
> bareos@:/home/superuser$ psql
>
> *psql: error: connection to server on socket 
> "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: role "bareos" does 
> not exist*
>
>
>
> LOG- AND CONFIGURATION FILES:
> --
> netstat -nlp | grep 5432
> tcp 0 0 127.0.0.1:5432 0.0.0.0:* 
> LISTEN 1218/postgres
> unix 2 [ ACC ] STREAM LISTENING 59051 1218/postgres 
> /var/run/postgresql/.s.PGSQL.5432
> --
> ps axf | grep postgres
> 8021 pts/1 S+ 0:00 \_ grep 
> --color=auto postgres
> 1218 ? Ss 0:01 /usr/lib/postgresql/15/bin/postgres -D 
> /var/lib/postgresql/15/main -c 
> config_file=/etc/postgresql/15/main/postgresql.conf
> 1246 ? Ss 0:00 \_ postgres: 15/main: checkpointer
> 1247 ? Ss 0:00 \_ postgres: 15/main: background writer
> 1322 ? Ss 0:00 \_ postgres: 15/main: walwriter
> 1323 ? Ss 0:00 \_ postgres: 15/main: autovacuum launcher
> 1324 ? Ss 0:00 \_ postgres: 15/main: logical replication 
> launcher
> --
> /usr/sbin/bareos-dir -t
> bareos-dir: dird/check_catalog.cc:64-0 Could not open Catalog 
> "MyCatalog", database "bareos".
> bareos-dir: dird/check_catalog.cc:71-0 cats/postgresql.cc:230 Unable to 
> connect to PostgreSQL server. Database=bareos User=bareos
> Possible causes: SQL server not running; password incorrect; 
> max_connections exceeded.
> (connection to server at "localhost" (127.0.0.1), port 5432 failed: 
> FATAL: password authentication failed for user "bareos"
> connection to server at "localhost" (127.0.0.1), port 5432 failed: 
> FATAL: password authentication failed for user "bareos"
> )
> bareos-dir ERROR TERMINATION
>
> --
>
> /usr/sbin/bareos-dir --xc Catalog MyCatalog
> Catalog {
> Name = "MyCatalog"
> DbAddress = "localhost"
> DbPort = 5432
> DbPassword = "test"
> DbUser = "bareos"
> DbName = "bareos"
> }
> --
> cat /etc/bareos/bareos-dir.d/catalog/MyCatalog.conf
> Catalog {
> Name = MyCatalog
> dbname = bareos
> dbaddress = 127.0.0.1
> #dbaddress = localhost
> dbport = 5432
> dbuser = bareos
> dbpassword = test
>
> }
> --
> cat /etc/dbconfig-common/bareos-database-common.conf
> # automatically generated by the maintainer scripts of 
> bareos-database-common
> # any changes you make will be preserved, though your comments
> # will be lost! to change your settings you should edit this
> # file and then run "dpkg-reconfigure bareos-database-common"
>
> # dbc_install: configure database with dbconfig-common?
> # set to anything but "true" to opt out of assistance
> dbc_install='true'
>
> # dbc_upgrade: upgrade database with dbconfig-common?
> # set to anything but "true" to opt out of assistance
> dbc_upgrade='true'
>
> # dbc_remove: deconfigure database with dbconfig-common?
> # set to anything but "true" to opt out of assistance
> dbc_remove='true'
>
> # dbc_dbtype: type of underlying database to use
> # this exists primarily to let dbconfig-common know what database
> # type to use when a package supports multiple database types.
> # don't change this value unless you know for certain that this
> # package supports multiple database types
> dbc_dbtype='pgsql'
>
> # dbc_dbuser: database user
> # the name of the user who we will use to connect to the database.
> dbc_dbuser='bareos'
>
> # dbc_dbpass: database user password
> # the password to use with the above username when connecting
> # to a database, if one is required
> dbc_dbpass='test'
>
> # dbc_dballow: allowed host to connect from
> # only for database types that support specifying the host from
> # which the database user is allowed to connect from
> # this string defines for which host the dbc_dbuser is allowed
> # to connect
> # this value is only really used again when you reconfigure the
> # package
> dbc_dballow='localhost'
>
> # dbc_dbserver: database host.
> # leave unset to use localhost (or a more efficient local method
> # if it exists).
> dbc_dbserver='localhost'
>
> # dbc_dbport: remote database port
> # leave unset to use the default. only applicable if you are
> # using a remote database.
> dbc_dbport='5432'
>
> # dbc_dbname: name of database
> # this is the name of your application's database.
> dbc_dbname='bareos'
>
> # dbc_dbadmin: name of the administrative user
> # this is the administrative user that is used to create all of the above
> # The exception is the MySQL/MariaDB localhost case, where this value is
> # ignored and instead is determined from /etc/mysql/debian.cnf.
>