Add a backup domain controller issues with OX

open-xchange
ucs-4-2
s4-connector

#1

I just installed a new Univention Domain Backup server which causes OpenXchange to throw an error in the
/var/log/univention/connector-s4.log

25.07.2017 21:36:04,161 LDAP        (PROCESS): sync to ucs: Resync rejected dn: CN=dns-dc2,CN=Users,DC=intranet,DC=fascha
ng,DC=at
25.07.2017 21:36:04,174 LDAP        (PROCESS): sync to ucs:   [          user] [    modify] uid=dns-dc2,cn=users,dc=intra
net,dc=faschang,dc=at
25.07.2017 21:36:04,473 LDAP        (ERROR  ): Unknown Exception during sync_to_ucs
25.07.2017 21:36:04,473 LDAP        (ERROR  ): Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/univention/s4connector/__init__.py", line 1497, in sync_to_ucs
    result = self.modify_in_ucs(property_type, object, module, position)
  File "/usr/lib/pymodules/python2.7/univention/s4connector/__init__.py", line 1281, in modify_in_ucs
    return ucs_object.modify() and self.__modify_custom_attributes(property_type, object, ucs_object, module, position)
  File "/usr/lib/pymodules/python2.7/univention/admin/handlers/users/user.py", line 1663, in modify
    return super(object, self).modify(*args, **kwargs)
  File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 324, in modify
    return self._modify(modify_childs, ignore_license=ignore_license)
  File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 806, in _modify
    self.call_udm_property_hook('hook_ldap_pre_modify', self)
  File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 655, in call_udm_property_hook
    func(module)
  File "/usr/lib/pymodules/python2.7/univention/admin/hooks.d/oxAccess.py", line 196, in hook_ldap_pre_modify
    self.check_mailaddr(module)
  File "/usr/lib/pymodules/python2.7/univention/admin/hooks.d/oxAccess.py", line 93, in check_mailaddr
    raise univention.admin.uexceptions.valueError(oxAccess._("The primary mail address is required for Open-Xchange users
. Currently the users' primary mail address is not set."))
TypeError: unbound method <lambda>() must be called with oxAccess instance as first argument (got str instance instead)

There was an user dnc-dc2 created with OpenXchange enabled which can´t be correct. Disabling Ox for this user and the Error is gone.

root@mail:/etc/cron.d# univention-app info
UCS: 4.2-1 errata99
App Center compatibility: 4
Installed: mailserver=11 open-xchange-text=7.8.4-ucs1 oxseforucs=7.8.4-ucs4
Upgradable:

Greets
Matthias Hütter


#2

Cron sends me an other Error every 5 Minutes after this:

Traceback (most recent call last):
  File "/usr/lib/univention-directory-listener/system/ox-user.py", line 832, in <module>
    handler.process_pending()
  File "/usr/lib/pymodules/python2.7/univention/ox/listener_tools.py", line 133, in process_pending
    return self.process(func)
  File "/usr/lib/pymodules/python2.7/univention/ox/listener_tools.py", line 188, in process
    result = func(dn, entry.new, entry.old, entry.action)
  File "/usr/lib/univention-directory-listener/system/ox-user.py", line 178, in handler
    return unqueued_handler(dn, new, old, command)
  File "/usr/lib/univention-directory-listener/system/ox-user.py", line 283, in unqueued_handler
    oxhomeserver = get_ox_home_server_for_context(ldapCon, contextnum)
  File "/usr/lib/univention-directory-listener/system/ox-user.py", line 828, in get_ox_home_server_for_context
    raise RuntimeError('Cannot find context information for ID %r.' % (context_id,))
RuntimeError: Cannot find context information for ID ''.

#3

there have been five Files in /var/spool/univention-directory-listener/ox-user. I moved them away and now the /usr/share/univention-ox/process-listener runs without error.
My guess is that the add of my Backupdomaincontroller added a user to OX which was rejected because of the missing Primary address. After i disabled OX for that user the listener tried to remove the User from OX but failed because the User with missing Primary Address has never been added.

Greets
Matthias Hütter