Bug 43274 - AttributeError: ReconnectLDAPObject has no attribute '_l'
AttributeError: ReconnectLDAPObject has no attribute '_l'
Status: REOPENED
Product: UCS
Classification: Unclassified
Component: UMC - Domain management (Generic)
UCS 5.0
Other Linux
: P5 normal (vote)
: ---
Assigned To: UMC maintainers
https://github.com/python-ldap/python...
:
: 40883 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-01-02 17:57 CET by Florian Best
Modified: 2023-01-13 14:28 CET (History)
5 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.034
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2021092421000404, 2019020621001277, 2018102821000339, 2019011921000335, 2018091421000681, 2018011821000081, 2016122121000842, 2017042621000276, 2020022721000173, 2020012721000764, 2020112621000309, 2021093021000465
Bug group (optional): Error handling, External feedback
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2017-01-02 17:57:09 CET
Version: 4.1-4 errata366 (Vahr)

Traceback(2208a66d665b8702c69c99caf570d47d):
Execution of command 'udm/syntax/choices/info computers/computer' has failed:

Traceback (most recent call last):
  File "%PY2.7%/univention/management/console/base.py", line 281, in execute
    function(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 190, in _response
    return function(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 318, in _response
    result = _multi_response(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 462, in _response
    return list(function(self, iterator, *nones))
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 284, in _fake_func
    yield function(self, *args)
  File "%PY2.7%/univention/management/console/modules/udm/__init__.py", line 909, in syntax_choices_info
    return info_syntax_choices(syntax)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 1134, in info_syntax_choices
    size += len(module.search(filter=filter_s, simple=not syn.use_objects))
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 86, in _decorated
    return method(*args, **kwargs)
  File "%PY2.7%/univention/management/console/ldap.py", line 141, in _decorated
    result = func(*args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 474, in search
    result = ldap_connection.searchDn(filter=unicode(lookup_filter), base=container, scope=scope, sizelimit=sizelimit)
  File "%PY2.7%/univention/admin/uldap.py", line 345, in searchDn
    return self.lo.searchDn(filter, base, scope, unique, required, timeout, sizelimit)
  File "%PY2.7%/univention/uldap.py", line 301, in searchDn
    return [x[0] for x in self.search(filter, base, scope, ['dn'], unique, required, timeout, sizelimit, serverctrls)]
  File "%PY2.7%/univention/uldap.py", line 284, in search
    res = self.lo.search_ext_s(base, ldap_scope, filter, attr, serverctrls=serverctrls, clientctrls=None, timeout=timeout, sizelimit=sizelimit)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 918, in search_ext_s
    return self._apply_method_s(SimpleLDAPObject.search_ext_s,*args,**kwargs)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 865, in _apply_method_s
    self.reconnect(self._uri,retry_max=self._retry_max,retry_delay=self._retry_delay)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 843, in reconnect
    SimpleLDAPObject.unbind_s(self)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 600, in unbind_s
    return self.unbind_ext_s(None,None)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 591, in unbind_ext_s
    msgid = self.unbind_ext(serverctrls,clientctrls)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 588, in unbind_ext
    return self._ldap_call(self._l.unbind_ext,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 136, in __getattr__
    self.__class__.__name__,repr(name)
AttributeError: ReconnectLDAPObject has no attribute '_l'
Comment 1 Florian Best univentionstaff 2017-01-05 18:41:47 CET
Looks like a threading issue during reconnection. I guess it's not good to use the same instance in different threads.
Comment 2 Florian Best univentionstaff 2017-01-09 16:09:47 CET
This is probably fixed in debian strech upstream python-ldap (2.4.28-0.1).
Comment 3 Florian Best univentionstaff 2017-04-27 12:02:53 CEST
Reported again, 4.2-0 errata2 (Lesum)
Comment 4 Johannes Keiser univentionstaff 2018-08-01 12:58:30 CEST
Reported again: UCS Version: 4.2-2 errata216 (Lesum)

Execution of command 'udm/syntax/choices/info computers/computer' has failed:

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/univention/management/console/base.py", line 250, in execute
    function.__func__(self, request, *args, **kwargs)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py", line 192, in _response
    return function(self, request)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py", line 318, in _response
    result = _multi_response(self, request)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py", line 192, in _response
    return function(self, request)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py", line 440, in _response
    return list(function(self, iterator, *nones))
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py", line 286, in _fake_func
    yield function(self, *args)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/udm/__init__.py", line 913, in syntax_choices_info
    return info_syntax_choices(syntax)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/udm/udm_ldap.py", line 1144, in info_syntax_choices
    size += len(module.search(filter=filter_s, simple=not syn.use_objects))
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/udm/udm_ldap.py", line 82, in _decorated
    return method(*args, **kwargs)
  File "/usr/lib/pymodules/python2.7/univention/management/console/ldap.py", line 143, in _decorated
    result = func(*args, **kwargs)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/udm/udm_ldap.py", line 484, in search
    result = self.module.lookup(None, ldap_connection, filter_s, base=container, superordinate=superordinate, scope=scope, sizelimit=sizelimit)
  File "/usr/lib/pymodules/python2.7/univention/admin/handlers/networks/network.py", line 327, in lookup
    for dn, attrs in lo.search(unicode(filter), base, scope, [], unique, required, timeout, sizelimit):
  File "/usr/lib/pymodules/python2.7/univention/admin/uldap.py", line 423, in search
    return self.lo.search(filter, base, scope, attr, unique, required, timeout, sizelimit)
  File "/usr/lib/pymodules/python2.7/univention/uldap.py", line 301, in search
    res = self.lo.search_ext_s(base, ldap_scope, filter, attr, serverctrls=serverctrls, clientctrls=None, timeout=timeout, sizelimit=sizelimit)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 918, in search_ext_s
    return self._apply_method_s(SimpleLDAPObject.search_ext_s,*args,**kwargs)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 865, in _apply_method_s
    self.reconnect(self._uri,retry_max=self._retry_max,retry_delay=self._retry_delay)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 843, in reconnect
    SimpleLDAPObject.unbind_s(self)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 600, in unbind_s
    return self.unbind_ext_s(None,None)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 591, in unbind_ext_s
    msgid = self.unbind_ext(serverctrls,clientctrls)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 588, in unbind_ext
    return self._ldap_call(self._l.unbind_ext,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 136, in __getattr__
    self.__class__.__name__,repr(name)
AttributeError: ReconnectLDAPObject has no attribute '_l'
Comment 5 Johannes Keiser univentionstaff 2018-10-05 19:06:40 CEST
Version: 4.3-2 errata234 (Neustadt)

Interner Server-Fehler in "udm/nav/object/query (navigation)".
Request: udm/nav/object/query (navigation)

  File "%PY2.7%/notifier/threads.py", line 78, in _run
    tmp = self._function()
  File "%PY2.7%/notifier/__init__.py", line 104, in __call__
    return self._function( *tmp, **self._kwargs )
  File "%PY2.7%/univention/management/console/modules/udm/__init__.py", line 1072, in _thread
    for module, obj in list_objects(container, object_type=object_type):
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 1006, in list_objects
    result = ldap_connection.search(base=container, scope='one')
  File "%PY2.7%/univention/admin/uldap.py", line 696, in search
    return self.lo.search(filter, base, scope, attr, unique, required, timeout, sizelimit)
  File "%PY2.7%/univention/uldap.py", line 315, in search
    res = self.lo.search_ext_s(base, ldap_scope, filter, attr, serverctrls=serverctrls, clientctrls=None, timeout=timeout, sizelimit=sizelimit)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 993, in search_ext_s
    return self._apply_method_s(SimpleLDAPObject.search_ext_s,*args,**kwargs)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 935, in _apply_method_s
    self.reconnect(self._uri,retry_max=self._retry_max,retry_delay=self._retry_delay)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 915, in reconnect
    SimpleLDAPObject.unbind_s(self)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 650, in unbind_s
    return self.unbind_ext_s(None,None)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 634, in unbind_ext_s
    msgid = self.unbind_ext(serverctrls,clientctrls)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 626, in unbind_ext
    res = self._ldap_call(self._l.unbind_ext,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 136, in __getattr__
    self.__class__.__name__,repr(name)
AttributeError: ReconnectLDAPObject has no attribute '_l'

Role: domaincontroller_master
Comment 6 Stefan Gohmann univentionstaff 2019-01-03 07:23:41 CET
This issue has been filled against UCS 4.1. The maintenance with bug and security fixes for UCS 4.1 has ended on 5st of April 2018.

Customers still on UCS 4.1 are encouraged to update to UCS 4.3. Please contact
your partner or Univention for any questions.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or simply reopen the issue. In this case please provide detailed information on how this issue is affecting you.
Comment 7 Johannes Keiser univentionstaff 2019-01-31 14:22:02 CET
Reported again: Version: 4.3-2 errata229 (Neustadt)

Internal server error during "udm/syntax/choices (users/user)".
Request: udm/syntax/choices (users/user)

  File "%PY2.7%/notifier/threads.py", line 78, in _run
    tmp = self._function()
  File "%PY2.7%/notifier/__init__.py", line 104, in __call__
    return self._function( *tmp, **self._kwargs )
  File "%PY2.7%/univention/management/console/modules/udm/__init__.py", line 942, in _thread
    return read_syntax_choices(syntax, request.options)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 83, in _decorated
    return method(*args, **kwargs)
  File "%PY2.7%/univention/management/console/ldap.py", line 143, in _decorated
    result = func(*args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 1261, in read_syntax_choices
    keys = module.search(**search_options)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 83, in _decorated
    return method(*args, **kwargs)
  File "%PY2.7%/univention/management/console/ldap.py", line 143, in _decorated
    result = func(*args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 482, in search
    result = ldap_connection.searchDn(filter=unicode(lookup_filter), base=container, scope=scope, sizelimit=sizelimit)
  File "%PY2.7%/univention/admin/uldap.py", line 736, in searchDn
    return self.lo.searchDn(filter, base, scope, unique, required, timeout, sizelimit)
  File "%PY2.7%/univention/uldap.py", line 325, in searchDn
    return [x[0] for x in self.search(filter, base, scope, ['dn'], unique, required, timeout, sizelimit, serverctrls)]
  File "%PY2.7%/univention/uldap.py", line 315, in search
    res = self.lo.search_ext_s(base, ldap_scope, filter, attr, serverctrls=serverctrls, clientctrls=None, timeout=timeout, sizelimit=sizelimit)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 993, in search_ext_s
    return self._apply_method_s(SimpleLDAPObject.search_ext_s,*args,**kwargs)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 935, in _apply_method_s
    self.reconnect(self._uri,retry_max=self._retry_max,retry_delay=self._retry_delay)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 915, in reconnect
    SimpleLDAPObject.unbind_s(self)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 650, in unbind_s
    return self.unbind_ext_s(None,None)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 634, in unbind_ext_s
    msgid = self.unbind_ext(serverctrls,clientctrls)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 626, in unbind_ext
    res = self._ldap_call(self._l.unbind_ext,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 136, in __getattr__
    self.__class__.__name__,repr(name)
AttributeError: ReconnectLDAPObject has no attribute '_l'

Role: domaincontroller_master
Comment 8 Johannes Keiser univentionstaff 2019-01-31 21:24:16 CET
Reported again: Version: 4.3-2 errata291 (Neustadt)

Interner Server-Fehler in "udm/get (networks/network)".
Request: udm/get (networks/network)

  File "%PY2.7%/notifier/threads.py", line 78, in _run
    tmp = self._function()
  File "%PY2.7%/notifier/__init__.py", line 104, in __call__
    return self._function( *tmp, **self._kwargs )
  File "%PY2.7%/univention/management/console/modules/udm/__init__.py", line 509, in _get
    obj = module.get(ldap_dn)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 84, in _decorated
    return method(*args, **kwargs)
  File "%PY2.7%/univention/management/console/ldap.py", line 143, in _decorated
    result = func(*args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 519, in get
    obj = self.module.object(None, ldap_connection, None, ldap_dn, superordinate, attributes=attributes)
  File "%PY2.7%/univention/admin/handlers/__init__.py", line 218, in __init__
    self.oldattr = self.lo.get(self.dn, attr=attr, required=True)
  File "%PY2.7%/univention/admin/uldap.py", line 656, in get
    return self.lo.get(dn, attr, required)
  File "%PY2.7%/univention/uldap.py", line 273, in get
    result = self.lo.search_s(dn, ldap.SCOPE_BASE, '(objectClass=*)', attr)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 597, in search_s
    return self.search_ext_s(base,scope,filterstr,attrlist,attrsonly,None,None,timeout=self.timeout)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 993, in search_ext_s
    return self._apply_method_s(SimpleLDAPObject.search_ext_s,*args,**kwargs)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 935, in _apply_method_s
    self.reconnect(self._uri,retry_max=self._retry_max,retry_delay=self._retry_delay)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 915, in reconnect
    SimpleLDAPObject.unbind_s(self)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 650, in unbind_s
    return self.unbind_ext_s(None,None)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 634, in unbind_ext_s
    msgid = self.unbind_ext(serverctrls,clientctrls)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 626, in unbind_ext
    res = self._ldap_call(self._l.unbind_ext,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 136, in __getattr__
    self.__class__.__name__,repr(name)
AttributeError: ReconnectLDAPObject has no attribute '_l'

Role: domaincontroller_master
Comment 9 Florian Best univentionstaff 2019-02-06 11:19:43 CET
*** Bug 40883 has been marked as a duplicate of this bug. ***
Comment 10 Florian Best univentionstaff 2019-03-17 13:27:31 CET
(In reply to Florian Best from comment #2)
> This is probably fixed in debian strech upstream python-ldap (2.4.28-0.1).
Seems not. https://github.com/python-ldap/python-ldap/issues/253.
Comment 11 Johannes Keiser univentionstaff 2019-03-25 15:24:34 CET
Reported again: Version: 4.3-3 errata419 (Neustadt)

Interner Server-Fehler in "udm/syntax/choices (users/user)".
Request: udm/syntax/choices (users/user)

  File "%PY2.7%/notifier/threads.py", line 78, in _run
    tmp = self._function()
  File "%PY2.7%/notifier/__init__.py", line 104, in __call__
    return self._function( *tmp, **self._kwargs )
  File "%PY2.7%/univention/management/console/modules/udm/__init__.py", line 967, in _thread
    return read_syntax_choices(syntax, request.options)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 84, in _decorated
    return method(*args, **kwargs)
  File "%PY2.7%/univention/management/console/ldap.py", line 143, in _decorated
    result = func(*args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 1267, in read_syntax_choices
    keys = module.search(**search_options)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 84, in _decorated
    return method(*args, **kwargs)
  File "%PY2.7%/univention/management/console/ldap.py", line 143, in _decorated
    result = func(*args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 483, in search
    result = ldap_connection.searchDn(filter=unicode(lookup_filter), base=container, scope=scope, sizelimit=sizelimit)
  File "%PY2.7%/univention/admin/uldap.py", line 736, in searchDn
    return self.lo.searchDn(filter, base, scope, unique, required, timeout, sizelimit)
  File "%PY2.7%/univention/uldap.py", line 325, in searchDn
    return [x[0] for x in self.search(filter, base, scope, ['dn'], unique, required, timeout, sizelimit, serverctrls)]
  File "%PY2.7%/univention/uldap.py", line 315, in search
    res = self.lo.search_ext_s(base, ldap_scope, filter, attr, serverctrls=serverctrls, clientctrls=None, timeout=timeout, sizelimit=sizelimit)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 993, in search_ext_s
    return self._apply_method_s(SimpleLDAPObject.search_ext_s,*args,**kwargs)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 935, in _apply_method_s
    self.reconnect(self._uri,retry_max=self._retry_max,retry_delay=self._retry_delay)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 915, in reconnect
    SimpleLDAPObject.unbind_s(self)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 650, in unbind_s
    return self.unbind_ext_s(None,None)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 634, in unbind_ext_s
    msgid = self.unbind_ext(serverctrls,clientctrls)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 626, in unbind_ext
    res = self._ldap_call(self._l.unbind_ext,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 136, in __getattr__
    self.__class__.__name__,repr(name)
AttributeError: ReconnectLDAPObject has no attribute '_l'
Comment 12 Christian Castens univentionstaff 2020-08-21 12:17:23 CEST
reported again:
Version: 4.4-3 errata455 (Blumenthal)

Traceback(d41d8cd98f00b204e9800998ecf8427e):
Interner Server-Fehler in "udm/nav/container/query (navigation)".
Request: udm/nav/container/query (navigation)

  File "/usr/lib/python2.7/dist-packages/notifier/threads.py", line 80, in _run
    result = self._function()
  File "/usr/lib/python2.7/dist-packages/notifier/__init__.py", line 104, in __call__
    return self._function(*tmp, **self._kwargs)
  File "/usr/lib/python2.7/dist-packages/univention/management/console/modules/udm/udm_ldap.py", line 97, in _decorated
    return method(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/univention/management/console/ldap.py", line 143, in _decorated
    result = func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/univention/management/console/modules/udm/__init__.py", line 1046, in _container_query
    xmodule = UDM_Module(xmodule)
  File "/usr/lib/python2.7/dist-packages/univention/management/console/modules/udm/udm_ldap.py", line 410, in __init__
    self.load(force_reload=force_reload)
  File "/usr/lib/python2.7/dist-packages/univention/management/console/modules/udm/udm_ldap.py", line 432, in load
    self.module = _module_cache.get(module, None, force_reload, *self.get_ldap_connection())  # FIXME: template_object not used?!
  File "/usr/lib/python2.7/dist-packages/univention/management/console/modules/udm/udm_ldap.py", line 389, in get
    udm_modules.init(ldap_connection, ldap_position, self[name], template_object, force_reload=force_reload)
  File "/usr/lib/python2.7/dist-packages/univention/admin/modules.py", line 202, in init
    update_extended_options(lo, module, position)
  File "/usr/lib/python2.7/dist-packages/univention/admin/modules.py", line 275, in update_extended_options
    for dn, attrs in lo.search(base=position.getDomainConfigBase(), filter='(&(objectClass=univentionUDMOption)%s)' % (module_filter,)):
  File "/usr/lib/python2.7/dist-packages/univention/admin/uldap.py", line 755, in search
    return self.lo.search(filter, base, scope, attr, unique, required, timeout, sizelimit, serverctrls=serverctrls, response=response)
  File "/usr/lib/python2.7/dist-packages/univention/uldap.py", line 199, in _decorated
    return func(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/univention/uldap.py", line 507, in search
    res = self.lo.search_ext_s(base, ldap_scope, filter, attr, serverctrls=serverctrls, clientctrls=None, timeout=timeout, sizelimit=sizelimit)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 993, in search_ext_s
    return self._apply_method_s(SimpleLDAPObject.search_ext_s,*args,**kwargs)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 935, in _apply_method_s
    self.reconnect(self._uri,retry_max=self._retry_max,retry_delay=self._retry_delay)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 915, in reconnect
    SimpleLDAPObject.unbind_s(self)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 650, in unbind_s
    return self.unbind_ext_s(None,None)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 634, in unbind_ext_s
    msgid = self.unbind_ext(serverctrls,clientctrls)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 626, in unbind_ext
    res = self._ldap_call(self._l.unbind_ext,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 136, in __getattr__
    self.__class__.__name__,repr(name)
AttributeError: ReconnectLDAPObject has no attribute '_l'

Role: domaincontroller_master
Comment 13 Christian Castens univentionstaff 2021-10-05 10:51:48 CEST
reported again
Version: 4.4-8 errata1058 (Blumenthal)
Role: domaincontroller_master
Comment 14 Maximilian Janßen univentionstaff 2021-11-19 15:34:18 CET
Version: 5.0-0 errata104

Error: 
Internal server error during "udm/query (users/user)".
Request: udm/query (users/user)

  File "%PY3%/notifier/threads.py", line 80, in _run
    result = self._function()
  File "%PY3%/notifier/__init__.py", line 105, in __call__
    return self._function(*tmp, **self._kwargs)
  File "%PY3%/univention/management/console/modules/udm/__init__.py", line 617, in _thread
    module = self.get_module(object_type, obj.dn)
  File "%PY3%/univention/management/console/modules/udm/__init__.py", line 224, in get_module
    return get_module(flavor, ldap_dn, self.get_ldap_connection()[0])
  File "%PY3%/univention/management/console/modules/udm/udm_ldap.py", line 1179, in get_module
    modules = udm_modules.objectType(None, ldap_connection, ldap_dn, module_base=base)
  File "%PY3%/univention/admin/modules.py", line 1031, in objectType
    attr = lo.get(dn)
  File "%PY3%/univention/admin/uldap.py", line 624, in get
    return self.lo.get(dn, attr, required)
  File "%PY3%/univention/uldap.py", line 208, in _decorated
    return func(self, *args, **kwargs)
  File "%PY3%/univention/uldap.py", line 442, in get
    result = self.lo.search_s(dn, ldap.SCOPE_BASE, '(objectClass=*)', attr)
  File "%PY3%/ldap/ldapobject.py", line 852, in search_s
    return self.search_ext_s(base,scope,filterstr,attrlist,attrsonly,None,None,timeout=self.timeout)
  File "%PY3%/ldap/ldapobject.py", line 1259, in search_ext_s
    return self._apply_method_s(SimpleLDAPObject.search_ext_s,*args,**kwargs)
  File "%PY3%/ldap/ldapobject.py", line 1201, in _apply_method_s
    self.reconnect(self._uri,retry_max=self._retry_max,retry_delay=self._retry_delay)
  File "%PY3%/ldap/ldapobject.py", line 1181, in reconnect
    SimpleLDAPObject.unbind_s(self)
  File "%PY3%/ldap/ldapobject.py", line 905, in unbind_s
    return self.unbind_ext_s(None,None)
  File "%PY3%/ldap/ldapobject.py", line 889, in unbind_ext_s
    msgid = self.unbind_ext(serverctrls,clientctrls)
  File "%PY3%/ldap/ldapobject.py", line 881, in unbind_ext
    res = self._ldap_call(self._l.unbind_ext,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
  File "%PY3%/ldap/ldapobject.py", line 352, in __getattr__
    self.__class__.__name__,repr(name)
AttributeError: ReconnectLDAPObject has no attribute '_l'

Role: domaincontroller_master
Comment 15 Florian Best univentionstaff 2022-03-09 11:46:17 CET
Also happened in our Jenkins Tests:

1 times in /var/log/univention/management-console-web-server.log:
https://jenkins.knut.univention.de:8181/job/UCS-5.0/job/UCS-5.0-1/job/AutotestJoin/SambaVersion=s4,Systemrolle=master-part-II/ws/test/management-console-web-server.log
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/notifier/threads.py", line 80, in _run
    result = self._function()
  File "/usr/lib/python3/dist-packages/notifier/__init__.py", line 105, in __call__
    return self._function(*tmp, **self._kwargs)
  File "/usr/lib/python3/dist-packages/univention/management/console/modules/udm/udm_ldap.py", line 101, in _decorated
    return method(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/univention/management/console/ldap.py", line 152, in _decorated
    result = func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/univention/management/console/modules/udm/__init__.py", line 992, in _thread
    return read_syntax_choices(syntax, request.options, ldap_connection=ldap_connection, ldap_position=ldap_position)
  File "/usr/lib/python3/dist-packages/univention/management/console/modules/udm/udm_ldap.py", line 1443, in read_syntax_choices
    keys = module.search(**search_options)
  File "/usr/lib/python3/dist-packages/univention/management/console/modules/udm/udm_ldap.py", line 678, in search
    result = ldap_connection.searchDn(filter=six.text_type(lookup_filter), base=container, scope=scope, sizelimit=sizelimit, serverctrls=serverctrls, response=response)
  File "/usr/lib/python3/dist-packages/univention/admin/uldap.py", line 711, in searchDn
    return self.lo.searchDn(filter, base, scope, unique, required, timeout, sizelimit, serverctrls=serverctrls, response=response)
  File "/usr/lib/python3/dist-packages/univention/uldap.py", line 545, in searchDn
    return [x[0] for x in self.search(filter, base, scope, ['dn'], unique, required, timeout, sizelimit, serverctrls, response)]
  File "/usr/lib/python3/dist-packages/univention/uldap.py", line 208, in _decorated
    return func(self, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/univention/uldap.py", line 517, in search
    res = self.lo.search_ext_s(base, ldap_scope, filter, attr, serverctrls=serverctrls, clientctrls=None, timeout=timeout, sizelimit=sizelimit)
  File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 1259, in search_ext_s
    return self._apply_method_s(SimpleLDAPObject.search_ext_s,*args,**kwargs)
  File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 1201, in _apply_method_s
    self.reconnect(self._uri,retry_max=self._retry_max,retry_delay=self._retry_delay)
  File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 1181, in reconnect
    SimpleLDAPObject.unbind_s(self)
  File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 905, in unbind_s
    return self.unbind_ext_s(None,None)
  File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 889, in unbind_ext_s
    msgid = self.unbind_ext(serverctrls,clientctrls)
  File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 881, in unbind_ext
    res = self._ldap_call(self._l.unbind_ext,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
  File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 352, in __getattr__
    self.__class__.__name__,repr(name)
AttributeError: ReconnectLDAPObject has no attribute '_l'
Comment 16 Florian Best univentionstaff 2022-03-09 12:54:44 CET
The rest of the logs:

09.03.22 06:32:58.353  DEBUG_INIT
09.03.22 06:33:00.032  MODULE      ( PROCESS ) : Loading python module.
09.03.22 06:33:01.514  MODULE      ( PROCESS ) : Imported python module.
09.03.22 06:33:01.514  MODULE      ( PROCESS ) : Module instance created.
09.03.22 06:33:01.514  MODULE      ( PROCESS ) : Module socket initialized.
09.03.22 06:33:01.547  MODULE      ( PROCESS ) : Setting user LDAP DN 'uid=zezherkswn,cn=testusers,cn=users,dc=AutoTest091,dc=local'
09.03.22 06:33:01.548  MODULE      ( PROCESS ) : Setting auth type to None
09.03.22 06:33:01.548  MODULE      ( PROCESS ) : Initializing module.
09.03.22 06:33:01.613  MAIN        ( PROCESS ) : LDAP bind for user 'uid=zezherkswn,cn=testusers,cn=users,dc=AutoTest091,dc=local'.
09.03.22 06:33:27.222  DEBUG_INIT
09.03.22 06:33:28.938  MODULE      ( PROCESS ) : Loading python module.
09.03.22 06:33:31.130  MODULE      ( PROCESS ) : Imported python module.
09.03.22 06:33:31.130  MODULE      ( PROCESS ) : Module instance created.
09.03.22 06:33:31.130  MODULE      ( PROCESS ) : Module socket initialized.
09.03.22 06:33:31.183  MODULE      ( PROCESS ) : Setting user LDAP DN 'uid=zezherkswn,cn=testusers,cn=users,dc=AutoTest091,dc=local'
09.03.22 06:33:31.183  MODULE      ( PROCESS ) : Setting auth type to None
09.03.22 06:33:31.183  MODULE      ( PROCESS ) : Initializing module.
09.03.22 06:33:31.247  MAIN        ( PROCESS ) : LDAP bind for user 'uid=zezherkswn,cn=testusers,cn=users,dc=AutoTest091,dc=local'.
09.03.22 06:33:37.848  ADMIN       ( WARN    ) : mapValueDecoded returns a list for service. This is probably not wanted?
09.03.22 06:33:37.850  ADMIN       ( WARN    ) : mapValueDecoded returns a list for service. This is probably not wanted?
09.03.22 06:33:37.857  ADMIN       ( WARN    ) : mapValueDecoded returns a list for service. This is probably not wanted?
09.03.22 06:33:37.858  ADMIN       ( WARN    ) : mapValueDecoded returns a list for service. This is probably not wanted?
09.03.22 06:33:37.883  ADMIN       ( WARN    ) : mapValueDecoded returns a list for service. This is probably not wanted?
09.03.22 06:33:39.157  ADMIN       ( WARN    ) : mapValueDecoded returns a list for objectFlag. This is probably not wanted?
09.03.22 06:33:40.127  ADMIN       ( WARN    ) : mapValueDecoded returns a list for service. This is probably not wanted?
09.03.22 06:33:40.133  ADMIN       ( WARN    ) : mapValueDecoded returns a list for service. This is probably not wanted?
09.03.22 06:33:40.135  ADMIN       ( WARN    ) : mapValueDecoded returns a list for service. This is probably not wanted?
09.03.22 06:33:40.136  ADMIN       ( WARN    ) : mapValueDecoded returns a list for service. This is probably not wanted?
09.03.22 06:33:40.140  ADMIN       ( WARN    ) : mapValueDecoded returns a list for service. This is probably not wanted?
09.03.22 06:33:40.801  ADMIN       ( WARN    ) : mapValueDecoded returns a list for service. This is probably not wanted?
09.03.22 06:33:40.802  ADMIN       ( WARN    ) : mapValueDecoded returns a list for service. This is probably not wanted?
09.03.22 06:33:40.804  ADMIN       ( WARN    ) : mapValueDecoded returns a list for service. This is probably not wanted?
09.03.22 06:33:40.805  ADMIN       ( WARN    ) : mapValueDecoded returns a list for service. This is probably not wanted?
09.03.22 06:33:40.812  ADMIN       ( WARN    ) : mapValueDecoded returns a list for service. This is probably not wanted?
09.03.22 06:33:42.037  ADMIN       ( WARN    ) : mapValueDecoded returns a list for service. This is probably not wanted?
09.03.22 06:33:42.972  ADMIN       ( WARN    ) : mapValueDecoded returns a list for service. This is probably not wanted?
09.03.22 06:33:42.981  ADMIN       ( WARN    ) : mapValueDecoded returns a list for service. This is probably not wanted?
09.03.22 06:33:42.994  MODULE      ( PROCESS ) : Internal server error during "udm/syntax/choices (users/user)".
09.03.22 06:36:05.360  MAIN        ( WARN    ) : Shutting down all open connections
09.03.22 06:36:05.361  MAIN        ( WARN    ) : Shutting down all open connections
09.03.22 06:36:05.366  MAIN        ( WARN    ) : Shutting down all open connections
09.03.22 06:36:05.366  MAIN        ( WARN    ) : Shutting down all open connections
09.03.22 06:36:05.376  MAIN        ( WARN    ) : Shutting down all open connections
09.03.22 06:36:05.377  MAIN        ( WARN    ) : Shutting down all open connections
09.03.22 06:39:54.743  MAIN        ( PROCESS ) : LDAP bind for user 'uid=zezherkswn,cn=testusers,cn=users,dc=AutoTest091,dc=local'.
09.03.22 06:39:54.745  MAIN        ( ERROR   ) : LDAP authentication for 'uid=zezherkswn,cn=testusers,cn=users,dc=AutoTest091,dc=local' failed: {'desc': 'Invalid credentials'}
09.03.22 06:49:15.892  DEBUG_INIT
Comment 17 Daniel Tröder univentionstaff 2022-04-20 09:18:50 CEST
Happend today in the UDM REST API, serving on an ID Broker server as backend of the Kelvin REST API (which is turn the backend of the ID Broker Self-disclosure API).

Many requests were running in parallel and the UDM REST API was started with -c=0 on a 4 CPU core machine. So the log may be a little full...

==============================================================================

19.04.22 15:46:38        INFO      (     1622) : 200 GET /udm/users/user/?filter=(%26(%26(%7C(objectClass%3DucsschoolTeacher)(objectClass%3DucsschoolStaff)(objectClass%3DucsschoolStudent))(%26(idBrokerPseudonym0001%3D312d8fc5-1813-4d7b-a1d7-f
19.04.22 15:46:38        INFO      (     1333) : 200 GET /udm/users/user/?filter=(%26(%26(%7C(objectClass%3DucsschoolTeacher)(objectClass%3DucsschoolStaff)(objectClass%3DucsschoolStudent))(%26(idBrokerPseudonym0001%3D312d8fc5-1813-4d7b-a1d7-f
19.04.22 15:46:38.877  ADMIN       ( WARN    ) : mapValueDecoded returns a list for service. This is probably not wanted?
19.04.22 15:46:38.879  ADMIN       ( WARN    ) : mapValueDecoded returns a list for service. This is probably not wanted?
19.04.22 15:46:38.880  ADMIN       ( WARN    ) : mapValueDecoded returns a list for service. This is probably not wanted?
19.04.22 15:46:38.881  ADMIN       ( WARN    ) : mapValueDecoded returns a list for service. This is probably not wanted?
19.04.22 15:46:38.882  ADMIN       ( WARN    ) : mapValueDecoded returns a list for service. This is probably not wanted?
19.04.22 15:46:38.894  ADMIN       ( WARN    ) : mapValueDecoded returns a list for service. This is probably not wanted?
19.04.22 15:46:38.899  ADMIN       ( WARN    ) : mapValueDecoded returns a list for service. This is probably not wanted?
19.04.22 15:46:38.899  ADMIN       ( WARN    ) : mapValueDecoded returns a list for service. This is probably not wanted?
19.04.22 15:46:38        INFO      (     1626) : 200 GET /udm/users/user/?filter=uid%3DTraeger1-TEST-121-helmke.hoege&scope=sub&hidden=true (0.0.0.0) 2479.86ms
19.04.22 15:46:38        INFO      (     1334) : 200 GET /udm/users/user/?filter=uid%3DTraeger1-TEST-121-helmke.hoege&scope=sub&hidden=true (127.0.0.1) 2543.19ms
19.04.22 15:46:38.919  ADMIN       ( WARN    ) : mapValueDecoded returns a list for service. This is probably not wanted?
19.04.22 15:46:38.919  ADMIN       ( WARN    ) : mapValueDecoded returns a list for service. This is probably not wanted?
19.04.22 15:46:38        INFO      (     1626) : 200 GET /udm/users/user/uid=Traeger1-TEST-121-armin.acord,cn=schueler,cn=users,ou=Traeger1-TEST-121,dc=ucs,dc=testing,dc=univention-id-broker,dc=com (0.0.0.0) 1260.29ms
19.04.22 15:46:38        INFO      (     1324) : 200 GET /udm/users/user/uid=Traeger1-TEST-121-armin.acord,cn=schueler,cn=users,ou=Traeger1-TEST-121,dc=ucs,dc=testing,dc=univention-id-broker,dc=com (127.0.0.1) 1440.67ms
19.04.22 15:46:38.944  MAIN        ( WARN    ) : Reaching service failed: HTTP 599: Empty reply from server
19.04.22 15:46:38.944  MAIN        ( WARN    ) : Reaching service failed: HTTP 599: Empty reply from server
19.04.22 15:46:38       ERROR      (     1325) : 503 GET /udm/users/user/?filter=uid%3DTraeger1-TEST-121-moritz.midde&scope=sub&hidden=true (127.0.0.1) 240.79ms
19.04.22 15:46:38       ERROR      (     1334) : 503 GET /udm/users/user/uid=Traeger1-TEST-121-blomma.roett,cn=schueler,cn=users,ou=Traeger1-TEST-121,dc=ucs,dc=testing,dc=univention-id-broker,dc=com (127.0.0.1) 255.12ms
19.04.22 15:46:38        INFO      (     1624) : 200 GET /udm/users/user/?filter=uid%3DTraeger1-TEST-121-bodo.farthma&scope=sub&hidden=true (0.0.0.0) 1379.68ms
19.04.22 15:46:38        INFO      (     1334) : 200 GET /udm/users/user/?filter=uid%3DTraeger1-TEST-121-bodo.farthma&scope=sub&hidden=true (127.0.0.1) 1831.76ms
19.04.22 15:46:38     WARNING      (     1319) : child 0 (pid 1622) killed by signal 11, restarting
19.04.22 15:46:39.079  MAIN        ( ERROR   ) : 1319: Could not kill(Signals.SIGTERM) 1622: [Errno 3] No such process
19.04.22 15:46:39       ERROR      (     1645) : Uncaught exception GET /udm/users/user/uid=Traeger1-TEST-121-helmke.hoege,cn=schueler,cn=users,ou=Traeger1-TEST-121,dc=ucs,dc=testing,dc=univention-id-broker,dc=com (0.0.0.0)
    HTTPServerRequest(protocol='http', host='self-disclosure-api1.ucs.testing.univention-id-broker.com', method='GET', uri='/udm/users/user/uid=Traeger1-TEST-121-helmke.hoege,cn=schueler,cn=users,ou=Traeger1-TEST-121,dc=ucs,dc=testing,dc=univ
    Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 1197, in _apply_method_s
        return func(self,*args,**kwargs)
      File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 908, in whoami_s
        return self._ldap_call(self._l.whoami_s,serverctrls,clientctrls)
      File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 329, in _ldap_call
        reraise(exc_type, exc_value, exc_traceback)
      File "/usr/lib/python3/dist-packages/ldap/compat.py", line 44, in reraise
        raise exc_value
      File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 313, in _ldap_call
        result = func(*args,**kwargs)
    ldap.SERVER_DOWN: {'desc': "Can't contact LDAP server"}
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 1167, in reconnect
        SimpleLDAPObject.start_tls_s(self)
      File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 864, in start_tls_s
        return self._ldap_call(self._l.start_tls_s)
      File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 329, in _ldap_call
        reraise(exc_type, exc_value, exc_traceback)
      File "/usr/lib/python3/dist-packages/ldap/compat.py", line 44, in reraise
        raise exc_value
      File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 313, in _ldap_call
        result = func(*args,**kwargs)
    ldap.SERVER_DOWN: {'desc': "Can't contact LDAP server", 'errno': 107, 'info': 'Transport endpoint is not connected'}
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/tornado/web.py", line 1569, in _execute
        result = self.prepare()
      File "/usr/lib/python3/dist-packages/univention/admin/rest/module.py", line 391, in prepare
        self.parse_authorization(authorization)
      File "/usr/lib/python3/dist-packages/univention/admin/rest/module.py", line 401, in parse_authorization
        if self.ldap_connection.whoami():
      File "/usr/lib/python3/dist-packages/univention/admin/uldap.py", line 569, in whoami
        return self.lo.whoami()
      File "/usr/lib/python3/dist-packages/univention/uldap.py", line 337, in whoami
        dn = self.lo.whoami_s()
      File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 1262, in whoami_s
        return self._apply_method_s(SimpleLDAPObject.whoami_s,*args,**kwargs)
      File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 1201, in _apply_method_s
        self.reconnect(self._uri,retry_max=self._retry_max,retry_delay=self._retry_delay)
      File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 1181, in reconnect
        SimpleLDAPObject.unbind_s(self)
      File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 905, in unbind_s
        return self.unbind_ext_s(None,None)
      File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 889, in unbind_ext_s
        msgid = self.unbind_ext(serverctrls,clientctrls)
      File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 881, in unbind_ext
        res = self._ldap_call(self._l.unbind_ext,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
      File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 352, in __getattr__
        self.__class__.__name__,repr(name)
    AttributeError: ReconnectLDAPObject has no attribute '_l'

---------------------------------------------------------------------------------------------------

This is repeated 3 times (probably for the other UDM REST API processes) and then:

---------------------------------------------------------------------------------------------------

19.04.22 15:46:39       ERROR      (     1626) : Uncaught exception GET /udm/users/user/?filter=uid%3DTraeger1-TEST-121-aloisio.godt&scope=sub&hidden=true (0.0.0.0)
    HTTPServerRequest(protocol='http', host='self-disclosure-api1.ucs.testing.univention-id-broker.com', method='GET', uri='/udm/users/user/?filter=uid%3DTraeger1-TEST-121-aloisio.godt&scope=sub&hidden=true', version='HTTP/1.1', remote_ip='0.
    Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/tornado/web.py", line 1569, in _execute
        result = self.prepare()
      File "/usr/lib/python3/dist-packages/univention/admin/rest/module.py", line 391, in prepare
        self.parse_authorization(authorization)
      File "/usr/lib/python3/dist-packages/univention/admin/rest/module.py", line 399, in parse_authorization
        (self.request.user_dn, self.request.username) = shared_memory.authenticated[authorization]
      File "<string>", line 2, in __getitem__
      File "/usr/lib/python3.7/multiprocessing/managers.py", line 795, in _callmethod
        conn.send((self._id, methodname, args, kwds))
      File "/usr/lib/python3.7/multiprocessing/connection.py", line 206, in send
        self._send_bytes(_ForkingPickler.dumps(obj))
      File "/usr/lib/python3.7/multiprocessing/connection.py", line 404, in _send_bytes
        self._send(header + buf)
      File "/usr/lib/python3.7/multiprocessing/connection.py", line 368, in _send
        n = write(self._handle, buf)
    BrokenPipeError: [Errno 32] Broken pipe
19.04.22 15:46:39       ERROR      (     1626) : 500 GET /udm/users/user/?filter=uid%3DTraeger1-TEST-121-aloisio.godt&scope=sub&hidden=true (0.0.0.0) 5.12ms

---------------------------------------------------------------------------------------------------

This is repeated 18 times. Then again ReconnectLDAPObject followed by BrokenPipeErrors and then no more tracebacks, but instead:

---------------------------------------------------------------------------------------------------

    AttributeError: ReconnectLDAPObject has no attribute '_l'
19.04.22 15:46:42       ERROR      (     1334) : 500 GET /udm/users/user/?filter=uid%3DTraeger1-TEST-121-odelia.kolkm&scope=sub&hidden=true (127.0.0.1) 4090.93ms
19.04.22 15:46:42       ERROR      (     1626) : 500 GET /udm/users/user/?filter=uid%3DTraeger1-TEST-121-odelia.kolkm&scope=sub&hidden=true (0.0.0.0) 3901.20ms
19.04.22 15:46:42.871  MAIN        ( WARN    ) : Reaching service failed: HTTP 599: Unknown
19.04.22 15:46:42       ERROR      (     1334) : 503 GET /udm/groups/group/cn=Traeger1-TEST-121-2d,cn=klassen,cn=schueler,cn=groups,ou=Traeger1-TEST-121,dc=ucs,dc=testing,dc=univention-id-broker,dc=com (127.0.0.1) 1.92ms
19.04.22 15:46:42.875  MAIN        ( WARN    ) : Reaching service failed: HTTP 599: Unknown
19.04.22 15:46:42       ERROR      (     1334) : 503 GET /udm/users/user/?filter=(%26(%26(%7C(objectClass%3DucsschoolTeacher)(objectClass%3DucsschoolStaff)(objectClass%3DucsschoolStudent))(%26(idBrokerPseudonym0001%3D13834717-b35e-4b91-8d16-1
19.04.22 15:46:43.294  MAIN        ( WARN    ) : Reaching service failed: HTTP 599: Unknown
19.04.22 15:46:43       ERROR      (     1324) : 503 GET /udm/users/user/?filter=(%26(%26(%7C(objectClass%3DucsschoolTeacher)(objectClass%3DucsschoolStaff)(objectClass%3DucsschoolStudent))(%26(idBrokerPseudonym0001%3D1784488b-5cea-4596-8dda-2
19.04.22 15:46:43.446  MAIN        ( WARN    ) : Reaching service failed: HTTP 599: Unknown

[..]

==============================================================================

In the end all EN processes had died,and the (unused) DE processes survived:

==============================================================================

[0 root@self-disclosure-api1 ~] ps ax | grep direc
 1316 ?        S      0:00 /usr/bin/python3 -m univention.admin.rest -l de_DE.UTF-8 -c 0 -s /var/run/univention-directory-manager-rest-de-de.socket
 1701 ?        Sl     0:04 /usr/bin/python3 -m univention.admin.rest -l de_DE.UTF-8 -c 0 -s /var/run/univention-directory-manager-rest-de-de.socket   # multiprocessing manager
 1800 ?        S      0:00 /usr/bin/python3 -m univention.admin.rest -l de_DE.UTF-8 -c 0 -s /var/run/univention-directory-manager-rest-de-de.socket   # child 0
 1812 ?        S      0:00 /usr/bin/python3 -m univention.admin.rest -l de_DE.UTF-8 -c 0 -s /var/run/univention-directory-manager-rest-de-de.socket   # child 1
 1819 ?        S      0:00 /usr/bin/python3 -m univention.admin.rest -l de_DE.UTF-8 -c 0 -s /var/run/univention-directory-manager-rest-de-de.socket   # child 2
 1821 ?        S      0:00 /usr/bin/python3 -m univention.admin.rest -l de_DE.UTF-8 -c 0 -s /var/run/univention-directory-manager-rest-de-de.socket   # child 3

==============================================================================

After "systemctl restart univention-directory-manager-rest.service" all ran again as expected:

==============================================================================

 7385 ?        S      0:00 /usr/bin/python3 -m univention.admin.rest -l de_DE.UTF-8 -c 0 -s /var/run/univention-directory-manager-rest-de-de.socket
 7386 ?        S      0:00 /usr/bin/python3 -m univention.admin.rest -l en_DK.UTF-8 -c 0 -s /var/run/univention-directory-manager-rest-en-dk.socket
 7404 ?        Sl     0:00 /usr/bin/python3 -m univention.admin.rest -l de_DE.UTF-8 -c 0 -s /var/run/univention-directory-manager-rest-de-de.socket   # multiprocessing manager
 7418 ?        Sl     0:00 /usr/bin/python3 -m univention.admin.rest -l en_DK.UTF-8 -c 0 -s /var/run/univention-directory-manager-rest-en-dk.socket   # multiprocessing manager
 7426 ?        S      0:00 /usr/bin/python3 -m univention.admin.rest -l de_DE.UTF-8 -c 0 -s /var/run/univention-directory-manager-rest-de-de.socket   # child 0
 7430 ?        S      0:00 /usr/bin/python3 -m univention.admin.rest -l de_DE.UTF-8 -c 0 -s /var/run/univention-directory-manager-rest-de-de.socket   # child 1
 7433 ?        S      0:00 /usr/bin/python3 -m univention.admin.rest -l de_DE.UTF-8 -c 0 -s /var/run/univention-directory-manager-rest-de-de.socket   # child 2
 7434 ?        S      0:00 /usr/bin/python3 -m univention.admin.rest -l de_DE.UTF-8 -c 0 -s /var/run/univention-directory-manager-rest-de-de.socket   # child 3
 7440 ?        Sl     0:00 /usr/bin/python3 -m univention.admin.rest -l en_DK.UTF-8 -c 0 -s /var/run/univention-directory-manager-rest-en-dk.socket   # child 0
 7441 ?        Sl     0:00 /usr/bin/python3 -m univention.admin.rest -l en_DK.UTF-8 -c 0 -s /var/run/univention-directory-manager-rest-en-dk.socket   # child 1
 7442 ?        Rl     0:00 /usr/bin/python3 -m univention.admin.rest -l en_DK.UTF-8 -c 0 -s /var/run/univention-directory-manager-rest-en-dk.socket   # child 2
 7443 ?        Rl     0:00 /usr/bin/python3 -m univention.admin.rest -l en_DK.UTF-8 -c 0 -s /var/run/univention-directory-manager-rest-en-dk.socket   # child 3
Comment 18 Daniel Tröder univentionstaff 2022-04-20 09:20:10 CEST
[0 root@self-disclosure-api1 ~] univention-app info
UCS: 5.0-1 errata287
Installed: ucsschool=5.0 v1 4.4/ucsschool-apis=1.0.1 4.4/ucsschool-kelvin-rest-api=1.5.2
Upgradable: ucsschool-kelvin-rest-api
Comment 19 Philipp Hahn univentionstaff 2023-01-13 14:28:03 CET
UCS 5.0-2+e339  86_selenium.10_product_test_password_change.master091

https://jenkins2022.knut.univention.de/job/UCS-5.0/job/UCS-5.0-2/job/AutotestJoin/SambaVersion=s4,Systemrolle=master-part-II/ws/test/management-console-web-server.log
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/notifier/threads.py", line 80, in _run
    result = self._function()
  File "/usr/lib/python3/dist-packages/notifier/__init__.py", line 105, in __call__
    return self._function(*tmp, **self._kwargs)
  File "/usr/lib/python3/dist-packages/univention/management/console/modules/udm/udm_ldap.py", line 102, in _decorated
    return method(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/univention/management/console/ldap.py", line 164, in _decorated
    result = func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/univention/management/console/modules/udm/__init__.py", line 1005, in _thread
    return read_syntax_choices(syntax, options, ldap_connection=ldap_connection, ldap_position=ldap_position)
  File "/usr/lib/python3/dist-packages/univention/management/console/modules/udm/udm_ldap.py", line 1359, in read_syntax_choices
    choices = syn.get_choices(ldap_connection, options)
  File "/usr/lib/python3/dist-packages/univention/admin/syntax.py", line 884, in get_choices
    keys = _search()
  File "/usr/lib/python3/dist-packages/univention/admin/syntax.py", line 870, in _search
    return lo.searchDn(filter=six.text_type(lookup_filter), **module_search_options)
  File "/usr/lib/python3/dist-packages/univention/admin/uldap.py", line 715, in searchDn
    return self.lo.searchDn(filter, base, scope, unique, required, timeout, sizelimit, serverctrls=serverctrls, response=response)
  File "/usr/lib/python3/dist-packages/univention/uldap.py", line 557, in searchDn
    return [x[0] for x in self.search(filter, base, scope, ['dn'], unique, required, timeout, sizelimit, serverctrls, response)]
  File "/usr/lib/python3/dist-packages/univention/uldap.py", line 211, in _decorated
    return func(self, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/univention/uldap.py", line 520, in search
    res = self.__search(base, ldap_scope, filter, attr, serverctrls=serverctrls, clientctrls=None, timeout=timeout, sizelimit=sizelimit, response=response)
  File "/usr/lib/python3/dist-packages/univention/uldap.py", line 535, in __search
    return self.lo.search_ext_s(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 1259, in search_ext_s
    return self._apply_method_s(SimpleLDAPObject.search_ext_s,*args,**kwargs)
  File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 1201, in _apply_method_s
    self.reconnect(self._uri,retry_max=self._retry_max,retry_delay=self._retry_delay)
  File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 1181, in reconnect
    SimpleLDAPObject.unbind_s(self)
  File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 905, in unbind_s
    return self.unbind_ext_s(None,None)
  File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 889, in unbind_ext_s
    msgid = self.unbind_ext(serverctrls,clientctrls)
  File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 881, in unbind_ext
    res = self._ldap_call(self._l.unbind_ext,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
  File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 352, in __getattr__
    self.__class__.__name__,repr(name)
AttributeError: ReconnectLDAPObject has no attribute '_l'

While the underlying LDAP C-library is thread-safe, ReconnectLDAPObject._apply_method is not: https://github.com/python-ldap/python-ldap/blob/master/Lib/ldap/ldapobject.py#L662
While reconnect() takes the lock `self._reconnect_lock` to guarantee mutual exclusion, multiple threads may execute `_apply_method()` in parallel, which calls `reconnect()` and `unbind_s()` WITHOUT locking, so one thready might interfere with another.

https://github.com/python-ldap/python-ldap/pull/507