Univention Bugzilla – Bug 44419
univention-self-service: database setup broken when installed from DVD
Last modified: 2018-04-14 13:37:14 CEST
+++ This bug was initially created as a clone of Bug #44393 +++ I just installed from a 4.2 DVD (/mnt/omar/vmwares/iso-images/ucs/4.2-0/UCS_4.2-0-amd64.iso) and univention-self-service-master was installed. So the fix is on the DVD. But when using it, I got an exception: ============================================================================= Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/univention/management/console/protocol/modserver.py", line 178, in _recv self.handle(msg) File "/usr/lib/pymodules/python2.7/univention/management/console/protocol/modserver.py", line 178, in _recv self.handle(msg) File "/usr/lib/pymodules/python2.7/univention/management/console/protocol/modserver.py", line 290, in handle self.__handler.init() File "/usr/lib/pymodules/python2.7/univention/management/console/modules/passwordreset/__init__.py", line 212, in init self.db = TokenDB(MODULE) File "/usr/lib/pymodules/python2.7/univention/management/console/modules/passwordreset/tokendb.py", line 53, in __init__ self.conn = self.open_db() File "/usr/lib/pymodules/python2.7/univention/management/console/modules/passwordreset/tokendb.py", line 120, in open_db db_name=DB_NAME, db_user=DB_USER, db_pw=password)) File "/usr/lib/python2.7/dist-packages/psycopg2/__init__.py", line 164, in connect conn = _connect(dsn, connection_factory=connection_factory, async=async) OperationalError: The initialization of the module failed: Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/univention/management/console/protocol/modserver.py", line 178, in _recv self.handle(msg) File "/usr/lib/pymodules/python2.7/univention/management/console/protocol/modserver.py", line 290, in handle self.__handler.init() File "/usr/lib/pymodules/python2.7/univention/management/console/modules/passwordreset/__init__.py", line 212, in init self.db = TokenDB(MODULE) File "/usr/lib/pymodules/python2.7/univention/management/console/modules/passwordreset/tokendb.py", line 53, in __init__ self.conn = self.open_db() File "/usr/lib/pymodules/python2.7/univention/management/console/modules/passwordreset/tokendb.py", line 120, in open_db db_name=DB_NAME, db_user=DB_USER, db_pw=password)) File "/usr/lib/python2.7/dist-packages/psycopg2/__init__.py", line 164, in connect conn = _connect(dsn, connection_factory=connection_factory, async=async) OperationalError: FATAL: Passwort-Authentifizierung für Benutzer »selfservice« fehlgeschlagen FATAL: Passwort-Authentifizierung für Benutzer »selfservice« fehlgeschlagen ============================================================================= The problem is, that the DB creation code in univention-self-service-passwordreset-umc.postinst didn't run: if [ "$1" = "configure" -a -z "$2" ] ; then echo "Fresh installation..." su - postgres -c "echo \"CREATE ROLE selfservice WITH LOGIN;\" | psql" su - postgres -c "createdb selfservice -E UTF8 -O selfservice -T template0" fi So no database was created in PostgreSQL. The code after that did run however, creating the password file. I can only assume it has to do with the way system-setup works.
Please attach the setup.log. univention-self-service-master only has a 'Depends' on univention-postgresql. There may be a dependency loop, so that postgresql is not correctly configured compared to a later installation of only the self-service app. Maybe a pre-depends will work, but one has to look at the setup.log before a decision
I already deleted the VM :/
I had this problem, too.
Created attachment 9157 [details] setup.log
Code has been moved from postinst into joinscript in Bug #44393. *** This bug has been marked as a duplicate of bug 44393 ***