Dear Comunity,
since some time I’ve noticed while updating an error like:
pg.InternalError: FATAL: kein pg_hba.conf-Eintrag für Host »192.168.x.y«, Benutzer »ucs-role$«, Datenbank »pkgdb«, SSL an
actually - I on all ucs machines. On every system the output looks like this:
root@ucs-role:~# univention-pkgdb-scan
Traceback (most recent call last):
File "/usr/sbin/univention-pkgdb-scan", line 37, in <module>
univention.pkgdb.main()
File "/usr/lib/pymodules/python2.7/univention/pkgdb.py", line 578, in main
connection = open_database_connection(config_registry, pkgdbu=False)
File "/usr/lib/pymodules/python2.7/univention/pkgdb.py", line 560, in open_database_connection
connection = pgdb.connect(database=connectstring)
File "/usr/lib/python2.7/dist-packages/pgdb.py", line 1615, in connect
cnx = _connect(dbname, dbhost, dbport, dbopt, dbuser, dbpasswd)
pg.InternalError: FATAL: kein pg_hba.conf-Eintrag für Host »192.168.x.y«, Benutzer »ucs-role$«, Datenbank »pkgdb«, SSL an
I followed the postgres update guide provided here and here. So there was an update from 9.1, 9.4, to 9.6.
Seaching the forum only got me issues that are 10 years old. So I thought I just ask again as my knowledge of postgresql is very limited.
Is there an easy fix for this?
Best,
Bernd
Hi,
yes there is a fix available. Please check here.
/CV
Hi,
thank you @Christian_Voelker. Wonder why my search didn’t find this… But I’ve missed one point in my description of the error. It seams like the »pkgdb« database vanished from all systems:
root@ucs-master:/etc# univention-pkgdb-scan --db-server 'master.domain.com' --add 'ucs-slave$'
Traceback (most recent call last):
File "/usr/sbin/univention-pkgdb-scan", line 37, in <module>
univention.pkgdb.main()
File "/usr/lib/pymodules/python2.7/univention/pkgdb.py", line 576, in main
connection = open_database_connection(config_registry, pkgdbu=True)
File "/usr/lib/pymodules/python2.7/univention/pkgdb.py", line 560, in open_database_connection
connection = pgdb.connect(database=connectstring)
File "/usr/lib/python2.7/dist-packages/pgdb.py", line 1615, in connect
cnx = _connect(dbname, dbhost, dbport, dbopt, dbuser, dbpasswd)
pg.InternalError: FATAL: Datenbank »pkgdb« existiert nicht
How do I create this database? The software-installation-monitor is installed on master and backup.
Thank you for helping out,
Bernd
There should be two join scripts related (I am currently unsure about correct naming please check!):
40univention-postgresql
50univention-pkgdb
They should be located under /usr/lib/univention-install
but might be named slightly different. So just run these scripts again with
univention-run-join-scripts 40univention-postgresql,50univention-pkgdb
It should create the missing database.
/CV
I’ve tried this yesterday through UMC (the old threads…) but it didn’t work - same error:
Di 12. Mär 21:54:14 CET 2019
univention-run-join-scripts finished
cp: der Aufruf von stat für '' ist nicht möglich: Datei oder Verzeichnis nicht gefunden
univention-run-join-scripts started
Do 14. Mär 20:42:23 CET 2019
univention-join-hooks: looking for hook type "join/pre-joinscripts" on ucs-master.domain.com
Found hooks:
RUNNING 40univention-postgresql.inst
2019-03-14 20:42:23.694799763+01:00 (in joinscript_init)
File: /etc/postgresql/pam_ldap.conf
2019-03-14 20:42:23.788669493+01:00 (in joinscript_save_current_version)
EXITCODE=0
RUNNING 50univention-pkgdb.inst
2019-03-14 20:42:23.833158362+01:00 (in joinscript_init)
Traceback (most recent call last):
File "/usr/sbin/univention-pkgdb-scan", line 37, in <module>
univention.pkgdb.main()
File "/usr/lib/pymodules/python2.7/univention/pkgdb.py", line 576, in main
connection = open_database_connection(config_registry, pkgdbu=True)
File "/usr/lib/pymodules/python2.7/univention/pkgdb.py", line 560, in open_database_connection
connection = pgdb.connect(database=connectstring)
File "/usr/lib/python2.7/dist-packages/pgdb.py", line 1615, in connect
cnx = _connect(dbname, dbhost, dbport, dbopt, dbuser, dbpasswd)
pg.InternalError: FATAL: Datenbank »pkgdb« existiert nicht
EXITCODE=1
6ac43157-a6d5-4950-a94e-0490ef2c41c9
univention-join-hooks: looking for hook type "join/post-joinscripts" on ucs-master.domain.com
Found hooks:
Same output with:
univention-run-join-scripts --run-scripts --force 40univention-postgresql 50univention-pkgdb
Just a question:
Do you use the package database?
How about uninstalling it? And, if used, reinstall. Do you have the correct version of PostgreSQL installed? There are several topics in the forum with detailed steps how to upgrade to the latest version (yes, has to be done manually!).
/CV
That was more than one question… 
So yes the package was installed. I uninstalled it. I’ve tried to reinstall it - but it fails.
As far as I can see 9.6 is installed.
root@ucs-master:/etc# ps aux | grep postgres
postgres 2726 0.0 0.5 267944 24052 ? S 10:12 0:00 /usr/lib/postgresql/9.6/bin/postgres -D /var/lib/postgresql/9.6/main -c config_file=/etc/postgresql/9.6/main/postgresql.conf
postgres 2747 0.0 0.0 267944 3544 ? Ss 10:12 0:00 postgres: checkpointer process
postgres 2748 0.0 0.0 267944 3544 ? Ss 10:12 0:00 postgres: writer process
postgres 2749 0.0 0.0 267944 3544 ? Ss 10:12 0:00 postgres: wal writer process
postgres 2750 0.0 0.1 268360 6456 ? Ss 10:12 0:00 postgres: autovacuum launcher process
postgres 2751 0.0 0.0 123080 2788 ? Ss 10:12 0:00 postgres: stats collector process
root 26441 0.0 0.0 14316 972 pts/1 R+ 10:25 0:00 grep postgres
I followed this.
Is the database »pkgdb« needed for anything else? If not - I will just leave it as it is. I’m not working much with the app.
Thanks for helping out
Bernd