Resolving opsi installation/update issues on UCS@school systems

Possible problem pictures:

  1. When installing opsi on the UCS@school system, the Univention App Center returns the following message:
An error has occurred: opsi4ucsappcenter: sub-process installed post-installation script returned the error value 1
  1. After the update to UCS@school 4.2 v6 the opsi daemon opsiconfd can not be started anymore:
Jan 12 16:03:23 school-opsi opsiconfd [5904]: Traceback (most recent call last):
Jan 12 16:03:23 school-opsi opsiconfd [5904]: File "/usr/bin/opsiconfd", line 12, in
Jan 12 16:03:23 school-opsi opsiconfd [5904]: from opsiconfd.opsiconfd import main
Jan 12 16:03:23 school-opsi opsiconfd [5904]: File "/usr/lib/python2.7/dist-packages/opsiconfd/opsiconfd.py", line 68, in
Jan 12 16:03:23 school-opsi opsiconfd [5904]: from OPSI.Backend.BackendManager import BackendManager
Jan 12 16:03:23 school-opsi opsiconfd [5904]: File "/usr/lib/python2.7/dist-packages/OPSI/Backend/BackendManager.py", line 40, in
Jan 12 16:03:23 school-opsi opsiconfd [5904]: from OPSI.Backend.Backend import (Backend, BackendModificationListener,
Jan 12 16:03:23 school-opsi opsiconfd [5904]: File "/usr/lib/python2.7/dist-packages/OPSI/Backend/Backend.py", line 47, in
Jan 12 16:03:23 school-opsi opsiconfd [5904]: from twisted.conch.ssh import keys
Jan 12 16:03:23 school-opsi opsiconfd [5904]: File "/usr/lib/python2.7/dist-packages/twisted/conch/ssh/keys.py", line 25, in
Jan 12 16:03:23 school-opsi opsiconfd [5904]: from cryptography.hazmat.primitives.asymmetric.utils import (
Jan 12 16:03:23 school-opsi opsiconfd [5904]: ImportError: No module named utils
Jan 12 16:03:23 school-opsi systemd [1]: opsiconfd.service: control process exited, code = exited status = 1
Jan 12 16:03:23 school-opsi systemd [1]: Failed to start Opsi configuration service.
Jan 12 16:03:23 school-opsi systemd [1]: Unit opsiconfd.service entered failed state.

The problem with opsi only occurs if UCS@school 4.2 v6 or python-twisted in version 16.2.0-1~bpo8+1A~4.2.0.201707181921 is installed on the system.

Solution:

  1. Update UCS@school to version 4.2 v7 or higher. Please note that the error message shown above will be displayed by the Univention App Center again and can be ignored until the following steps have been performed.
  2. The package python-twisted and its dependencies have to be downgraded to an older version:
apt-get install python-six=1.8.0-1 \
   python-cffi=0.8.6-1 \
   python-cryptography=0.6.1-1+deb8u1A~4.2.0.201706081606 \
   python-openssl=0.14-1 \
   python-twisted=14.0.2-3 \
   python-twisted-bin=14.0.2-3 \
   python-twisted-conch=1:14.0.2-3 \
   python-twisted-core=14.0.2-3 \
   python-twisted-mail=14.0.2-3 \
   python-twisted-names=14.0.2-3 \
   python-twisted-web=14.0.2-3 \
   python-twisted-news=14.0.2-3 \
   python-twisted-runner=14.0.2-3 \
   python-twisted-words=14.0.2-3
  1. Restart the UCS@school system
Mastodon