Problem:SAML login causes _dbm.error: cannot add item to database


The following traceback shows, if you are login with saml on a school replica.

Bug 54880

17.06.22 15:28:30.238  MAIN        ( ERROR   ) : Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/cherrypy/", line 670, in respond
    response.body = self.handler()
  File "/usr/lib/python3/dist-packages/cherrypy/lib/", line 220, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/cherrypy/", line 60, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/usr/sbin/univention-management-console-web-server", line 1258, in index
    return acs(binding, message, relay_state)
  File "/usr/sbin/univention-management-console-web-server", line 1281, in attribute_consuming_service_iframe
    response = self.acs(message, binding)
  File "/usr/sbin/univention-management-console-web-server", line 1395, in acs
    response = self.sp.parse_authn_request_response(message, binding, self.outstanding_queries)
  File "/usr/lib/python3/dist-packages/saml2/", line 717, in parse_authn_request_response
  File "/usr/lib/python3/dist-packages/saml2/", line 27, in add_information_about_person
  File "/usr/lib/python3/dist-packages/saml2/", line 129, in set
    self._db[cni] = data
  File "/usr/lib/python3.7/", line 125, in __setitem__
    self.dict[key.encode(self.keyencoding)] = f.getvalue()
_dbm.error: cannot add item to database


This Error is fixed in UCS 5.0-6 Erratum 914, so you could update Primary Node and all Backup Nodes that are used as SAML IDP to the latest Version.

univention-upgrade --ignoressh --ignoreterm --noninteractive


Set a UCRV to true so that no more caching is performed. Exactly as described above on the Primary Node and all Backup Nodes that are used as SAML IDP.

ucr set umc/saml/in-memory-identity-cache=true