Problem: App Upgrade Fails With "ldapsearch -x failed"

Problem

An app upgrade fails with “ldapsearch -x failed”.

Environment

Upgrading the app with univention-app upgrade <APP> fails. The output is similar to the following:

Starting docker-app-etherpad-lite (via systemctl): docker-app-etherpad-lite.service.
[...]
 
Checking for local repository:                          none
Checking for package updates:                           none
Checking for app updates:                               skipped
[...]
Running 20univention-join.inst skipped (already executed)
Running 30univention-appcenter.inst skipped (already executed)
Error: ldapsearch -x failed
W: The config registry variable 'update/container/check/last' does not exist
W: The config registry variable 'update/container/check/type' does not exist
Package upgrade script failed
Aborting...

the app is running in a docker container and during the upgrade procedure the container is being upgraded, too. This fails with an ldapsearch error.

Solution

Step 1

Switch into the docker container on your host (here app Etherpad-Lite)
univention-app shell etherpad-lite

Step 2

Test univention-ldapsearch itself from within the docker container

root@ucsdocker:~# univention-ldapsearch "uid=a*"
ldap_start_tls: Can't contact LDAP server (-1)

If you get the above error verify the settings in the file /etc/ldap/ldap.conf and rewrite it by
ucr commit /etc/ldap/ldap.conf
If univention-ldapsearch still fails proceed with the next step.

Step 3

Make sure your DNS resolution is working fine:
root@dockerucs:~# host $(ucr get ldap/master)

Step 4

Reset the password for the computer account based on Steps 1 of this article.

1 Like
Mastodon