Problem: IndexError: list index out of range

Problem:

You find this Traceback

Traceback (most recent call last):
  File "/usr/share/univention-directory-manager-tools/univention-cli-server", line 219, in doit
    output = univention.admincli.admin.doit(arglist)
  File "/usr/lib/python2.7/dist-packages/univention/admincli/admin.py", line 409, in doit
    out = _doit(arglist)
  File "/usr/lib/python2.7/dist-packages/univention/admincli/admin.py", line 620, in _doit
    univention.admin.modules.init(lo, position, module)
  File "/usr/lib/python2.7/dist-packages/univention/admin/modules.py", line 201, in init
    update_extended_attributes(lo, module, position)
  File "/usr/lib/python2.7/dist-packages/univention/admin/modules.py", line 363, in update_extended_attributes
    object_class = attrs.get('univentionUDMPropertyObjectClass', [])[0]
IndexError: list index out of range

Investigation:

This can happen when listing in udm
udm container/cn list
but you can also find this during join

In this case univentionUDMPropertyObjectClass is empty or not present. In most cases the custom attributes are corrupt or incorrect.
You can approach the root cause with ldapsearch:

univention-ldapsearch '(&(!(univentionUDMPropertyObjectClass=*))(univentionObjectType=settings/extended_attribute))' -b "cn=custom attributes,cn=univention,$(ucr get ldap/base)"

These Objects should be checked, the may cause the traceback.

Solution

Remove or repair the found objects.

This topic was automatically closed after 24 hours. New replies are no longer allowed.

Mastodon