Keycloak Upgrade to Version 26.2.5-ucs1 - Running prescript of 5.0/keycloak=26.2.5-ucs1 failed. Aborting

Today I want to upgrade Keycloak:
Keycloak: Version 25.0.6-ucs4 → 26.2.5-ucs1

But the upgrade failed. Running prescript of 5.0/keycloak=26.2.5-ucs1 failed. Aborting…

Workaround
remove all IPv6 settings of the Univention UCS Server
Upgrade Keycloak → THis time successful
Reinsert the IPv6 settings on the UCS Server

Logfile appcenter.log:
1237144 actions.upgrade-search 25-07-14 17:11:01 [ DEBUG]: Calling upgrade-search
1237144 actions.upgrade-search.progress 25-07-14 17:11:01 [ DEBUG]: 0
1237144 actions.update 25-07-14 17:11:01 [ DEBUG]: Calling update
1237144 actions.update.progress 25-07-14 17:11:01 [ DEBUG]: 0
1237144 actions.update 25-07-14 17:11:01 [ INFO]: Downloading “https://appcenter.software-univention.de/meta-inf/app-categories.ini”…
1237144 actions.update 25-07-14 17:11:01 [ DEBUG]: … Not Modified
1237144 actions.update 25-07-14 17:11:01 [ INFO]: Downloading “https://appcenter.software-univention.de/meta-inf/rating.ini”…
1237144 actions.update 25-07-14 17:11:01 [ DEBUG]: … Not Modified
1237144 actions.update 25-07-14 17:11:01 [ INFO]: Downloading “https://appcenter.software-univention.de/meta-inf/license_types.ini”…
1237144 actions.update 25-07-14 17:11:02 [ DEBUG]: … Not Modified
1237144 actions.update 25-07-14 17:11:02 [ INFO]: Downloading “https://appcenter.software-univention.de/meta-inf/ucs.ini”…
1237144 actions.update 25-07-14 17:11:02 [ DEBUG]: … Not Modified
1237144 actions.update 25-07-14 17:11:02 [ INFO]: Downloading “https://appcenter.software-univention.de/meta-inf/suggestions.json”…
1237144 actions.update 25-07-14 17:11:02 [ DEBUG]: … Not Modified
1237144 actions.update 25-07-14 17:11:02 [ INFO]: Downloading “https://appcenter.software-univention.de/meta-inf/5.2/all.tar.gpg”…
1237144 actions.update 25-07-14 17:11:02 [ DEBUG]: … Not Modified
1237144 actions.update 25-07-14 17:11:02 [ INFO]: Downloading “https://appcenter.software-univention.de/meta-inf/5.0/all.tar.gpg”…
1237144 actions.update 25-07-14 17:11:02 [ DEBUG]: … Not Modified
1237144 actions.update.progress 25-07-14 17:11:02 [ DEBUG]: 100
1237144 cache 25-07-14 17:11:02 [ DEBUG]: Cache outdated. Need to rebuild
1237144 cache 25-07-14 17:11:02 [ DEBUG]: Loaded 54 apps from cache
1237144 cache 25-07-14 17:11:02 [ DEBUG]: Cache outdated. Need to rebuild
1237144 cache 25-07-14 17:11:02 [ DEBUG]: Loaded 441 apps from cache
1237144 actions.upgrade-search 25-07-14 17:11:02 [ DEBUG]: Checking samba4=4.21
1237144 actions.upgrade-search 25-07-14 17:11:02 [ DEBUG]: Checking 5.0/keycloak=25.0.6-ucs4
1237144 actions.upgrade-search 25-07-14 17:11:02 [ INFO]: Executing interface update_available for keycloak
1237144 actions.upgrade-search 25-07-14 17:11:02 [ INFO]: No interface defined
1237144 actions.upgrade-search.progress 25-07-14 17:11:02 [ DEBUG]: 100
1251724 cache 25-07-14 17:41:25 [ DEBUG]: Cache outdated. Need to rebuild
1251724 cache 25-07-14 17:41:25 [ DEBUG]: Loaded 441 apps from cache
1252178 cache 25-07-14 17:41:43 [ DEBUG]: Cache outdated. Need to rebuild
1252178 cache 25-07-14 17:41:43 [ DEBUG]: Loaded 54 apps from cache
1252178 cache 25-07-14 17:41:43 [ DEBUG]: Cache outdated. Need to rebuild
1252178 cache 25-07-14 17:41:43 [ DEBUG]: Loaded 441 apps from cache
1252178 cache 25-07-14 17:41:43 [ DEBUG]: Cache outdated. Need to rebuild
1252178 cache 25-07-14 17:41:43 [ DEBUG]: Loaded 441 apps from cache
1251724 utils 25-07-14 17:41:46 [ INFO]: Resolving dependencies for keycloak
1251724 actions.update 25-07-14 17:41:46 [ DEBUG]: Calling update
1251724 actions.update.progress 25-07-14 17:41:46 [ DEBUG]: 0
1251724 actions.update 25-07-14 17:41:46 [ INFO]: Downloading “https://appcenter.software-univention.de/meta-inf/app-categories.ini”…
1251724 actions.update 25-07-14 17:41:46 [ DEBUG]: … Not Modified
1251724 actions.update 25-07-14 17:41:46 [ INFO]: Downloading “https://appcenter.software-univention.de/meta-inf/rating.ini”…
1251724 actions.update 25-07-14 17:41:46 [ DEBUG]: … Not Modified
1251724 actions.update 25-07-14 17:41:46 [ INFO]: Downloading “https://appcenter.software-univention.de/meta-inf/license_types.ini”…
1251724 actions.update 25-07-14 17:41:46 [ DEBUG]: … Not Modified
1251724 actions.update 25-07-14 17:41:46 [ INFO]: Downloading “https://appcenter.software-univention.de/meta-inf/ucs.ini”…
1251724 actions.update 25-07-14 17:41:46 [ DEBUG]: … Not Modified
1251724 actions.update 25-07-14 17:41:46 [ INFO]: Downloading “https://appcenter.software-univention.de/meta-inf/suggestions.json”…
1251724 actions.update 25-07-14 17:41:46 [ DEBUG]: … Not Modified
1251724 actions.update 25-07-14 17:41:46 [ INFO]: Downloading “https://appcenter.software-univention.de/meta-inf/5.2/all.tar.gpg”…
1251724 actions.update 25-07-14 17:41:47 [ DEBUG]: … Not Modified
1251724 actions.update 25-07-14 17:41:47 [ INFO]: Downloading “https://appcenter.software-univention.de/meta-inf/5.0/all.tar.gpg”…
1251724 actions.update 25-07-14 17:41:47 [ DEBUG]: … Not Modified
1251724 actions.update.progress 25-07-14 17:41:47 [ DEBUG]: 100
1251724 actions.upgrade 25-07-14 17:41:47 [ INFO]: 5.0/keycloak=26.2.5-ucs1 is a Docker App. No sane dry run is implemented
1251724 actions.upgrade 25-07-14 17:44:29 [ DEBUG]: Calling upgrade
1251724 actions.upgrade.progress 25-07-14 17:44:29 [ DEBUG]: 0
1251724 utils 25-07-14 17:44:29 [ INFO]: Resolving dependencies for keycloak
1251724 actions.upgrade 25-07-14 17:44:29 [ INFO]: Going to upgrade Keycloak (26.2.5-ucs1)
1251724 actions.upgrade 25-07-14 17:44:29 [ INFO]: Showing README for 5.0/keycloak=26.2.5-ucs1
1251724 actions.upgrade.readme 25-07-14 17:44:29 [ DEBUG]: Calling elinks -dump /var/cache/univention-appcenter/appcenter.software-univention.de/5.0/keycloak_20250508142809.README_UPDATE_DE
1251724 actions.upgrade.readme 25-07-14 17:44:29 [ INFO]: Hinweise zum Update
1251724 actions.upgrade.readme 25-07-14 17:44:29 [ INFO]:
1251724 actions.upgrade.readme 25-07-14 17:44:29 [ INFO]: Wenn die App auf mehreren Systemen in der Domäne installiert ist, müssen
1251724 actions.upgrade.readme 25-07-14 17:44:29 [ INFO]: Sie sicherstellen, dass alle Installationen auf die gleiche Version der
1251724 actions.upgrade.readme 25-07-14 17:44:29 [ INFO]: Keycloak App aktualisiert werden, um einen ordnungsgemäßen Betrieb
1251724 actions.upgrade.readme 25-07-14 17:44:29 [ INFO]: sicherzustellen.
1251724 actions.upgrade.readme 25-07-14 17:44:29 [ INFO]:
1251724 actions.upgrade.readme 25-07-14 17:44:29 [ INFO]: Eine Übersicht zu den Änderungen und Fehlerbehebungen finden Sie im
1251724 actions.upgrade.readme 25-07-14 17:44:29 [ INFO]: [1]Keycloak App Changelog. Nachfolgend finden Sie wichtige Informationen
1251724 actions.upgrade.readme 25-07-14 17:44:29 [ INFO]: zu bestimmten Versionen.
1251724 actions.upgrade.readme 25-07-14 17:44:29 [ INFO]:
1251724 actions.upgrade.readme 25-07-14 17:44:29 [ INFO]: Version: 26.1.4-ucs1
1251724 actions.upgrade.readme 25-07-14 17:44:29 [ INFO]:
1251724 actions.upgrade.readme 25-07-14 17:44:29 [ INFO]: • Wenn Sie PostgreSQL als Datenbankmanagementsystem für Keycloak
1251724 actions.upgrade.readme 25-07-14 17:44:29 [ INFO]: einsetzen, benötigen Sie PostgreSQL in Version 12 oder höher.
1251724 actions.upgrade.readme 25-07-14 17:44:29 [ INFO]:
1251724 actions.upgrade.readme 25-07-14 17:44:29 [ INFO]: Version: 23.0.7-ucs1
1251724 actions.upgrade.readme 25-07-14 17:44:29 [ INFO]:
1251724 actions.upgrade.readme 25-07-14 17:44:29 [ INFO]: • Das Feature Ad-hoc Föderation wurde aus der App aufgrund von
1251724 actions.upgrade.readme 25-07-14 17:44:29 [ INFO]: Inkompatibilitäten mit der neuen Keycloak-Version entfernt. Falls
1251724 actions.upgrade.readme 25-07-14 17:44:29 [ INFO]: diese Funktion produktiv verwendet wurde, updaten Sie nicht und
1251724 actions.upgrade.readme 25-07-14 17:44:29 [ INFO]: kontaktieren Sie den Univention support (support@univention.de)
1251724 actions.upgrade.readme 25-07-14 17:44:29 [ INFO]:
1251724 actions.upgrade.readme 25-07-14 17:44:29 [ INFO]: Version: 21.0.1-ucs3
1251724 actions.upgrade.readme 25-07-14 17:44:29 [ INFO]:
1251724 actions.upgrade.readme 25-07-14 17:44:29 [ INFO]: • Die UCR Variable ucs/server/sso/virtualhost wurde durch
1251724 actions.upgrade.readme 25-07-14 17:44:29 [ INFO]: keycloak/apache/config ersetzt. Falls Sie diese Variable verwendet
1251724 actions.upgrade.readme 25-07-14 17:44:29 [ INFO]: haben um die UCS Apache Konfiguration für Keycloak zu deaktivieren,
1251724 actions.upgrade.readme 25-07-14 17:44:29 [ INFO]: setzen Sie bitte keycloak/apache/config=true vor dem Update.
1251724 actions.upgrade.readme 25-07-14 17:44:29 [ INFO]:
1251724 actions.upgrade.readme 25-07-14 17:44:29 [ INFO]: Version: 21.0.1-ucs1
1251724 actions.upgrade.readme 25-07-14 17:44:29 [ INFO]:
1251724 actions.upgrade.readme 25-07-14 17:44:29 [ INFO]: • Ab dieser Version benötigt die App ein CPU die das Microarchitecture
1251724 actions.upgrade.readme 25-07-14 17:44:29 [ INFO]: Level x86-64-v2 unterstützt (siehe auch [2]help.univention.de)
1251724 actions.upgrade.readme 25-07-14 17:44:29 [ INFO]: • Für den Zugriff auf den userinfo Endpunkt (openid) wird nun der Scope
1251724 actions.upgrade.readme 25-07-14 17:44:29 [ INFO]: openid in der Liste der angefordert Scopes benötigt (siehe auch
1251724 actions.upgrade.readme 25-07-14 17:44:29 [ INFO]: [3]UserInfo endpoint not fully standards compliant · Issue #14184 · keycloak/keycloak · GitHub).
1251724 actions.upgrade.readme 25-07-14 17:44:29 [ INFO]:
1251724 actions.upgrade.readme 25-07-14 17:44:29 [ INFO]: References
1251724 actions.upgrade.readme 25-07-14 17:44:29 [ INFO]:
1251724 actions.upgrade.readme 25-07-14 17:44:29 [ INFO]: Visible links
1251724 actions.upgrade.readme 25-07-14 17:44:29 [ INFO]: 1. Changelog — Univention Keycloak app manual 26.2.5
1251724 actions.upgrade.readme 25-07-14 17:44:29 [ INFO]: 2. Keycloak App requires x86-64-v2
1251724 actions.upgrade.readme 25-07-14 17:44:29 [ INFO]: 3. UserInfo endpoint not fully standards compliant · Issue #14184 · keycloak/keycloak · GitHub
1251724 actions.configure 25-07-14 17:44:29 [ DEBUG]: Calling configure
1251724 actions.configure.progress 25-07-14 17:44:29 [ DEBUG]: 0
1251724 actions.configure 25-07-14 17:44:29 [ INFO]: Configuring 5.0/keycloak=26.2.5-ucs1
1251724 actions.configure.progress 25-07-14 17:44:29 [ DEBUG]: 100
1251724 actions.upgrade 25-07-14 17:44:29 [ DEBUG]: Calling prescript (preinst)
1251724 actions.upgrade 25-07-14 17:44:29 [ DEBUG]: Calling /var/cache/univention-appcenter/appcenter.software-univention.de/5.0/keycloak_20250508142809.preinst --old-version 25.0.6-ucs4 --version 26.2.5-ucs1 --error-file /tmp/tmpiw2gjxga --binddn uid=Administrator,cn=users,dc=asp,dc=lan --bindpwdfile /tmp/tmpp0tx2inx --locale de
1251724 actions.upgrade 25-07-14 17:44:30 [ WARNING]: Traceback (most recent call last):
1251724 actions.upgrade 25-07-14 17:44:30 [ WARNING]: File “”, line 32, in
1251724 actions.upgrade 25-07-14 17:44:30 [ WARNING]: File “/usr/lib/python3/dist-packages/psycopg2/init.py”, line 122, in connect
1251724 actions.upgrade 25-07-14 17:44:30 [ WARNING]: conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
1251724 actions.upgrade 25-07-14 17:44:30 [ WARNING]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1251724 actions.upgrade 25-07-14 17:44:30 [ WARNING]: psycopg2.OperationalError: connection to server at “ucs.asp.lan” (2a01:4f8:XXX:YYYY::Z), port 5432 failed: FATAL: kein pg_hba.conf-Eintrag für Host »2a01:4f8:XXX:YYYY::Z«, Benutzer »keycloak«, Datenbank »keycloak«, SSL-Verschlüsselung
1251724 actions.upgrade 25-07-14 17:44:30 [ WARNING]:
1251724 actions.upgrade 25-07-14 17:44:30 [ DEBUG]: /var/cache/univention-appcenter/appcenter.software-univention.de/5.0/keycloak_20250508142809.preinst returned with 1
1251724 actions.upgrade 25-07-14 17:44:30 [CRITICAL]: Running prescript of 5.0/keycloak=26.2.5-ucs1 failed. Aborting…
1251724 actions.upgrade-search 25-07-14 17:44:30 [ DEBUG]: Calling upgrade-search
1251724 actions.upgrade-search.progress 25-07-14 17:44:30 [ DEBUG]: 0
1251724 actions.upgrade-search 25-07-14 17:44:30 [ DEBUG]: Checking 5.0/keycloak=26.2.5-ucs1
1251724 actions.upgrade-search.progress 25-07-14 17:44:30 [ DEBUG]: 100
1251724 actions.upgrade.progress 25-07-14 17:44:30 [ DEBUG]: 100

I think that the file /etc/postgresql/15/main/pg_hba.conf needs to be adjusted.

Best regards Stephan

Hey,

You knew what the problem is, should have tried to search the forum first.

Check if this will resolve your issue: