haiwen / seafile

High performance file syncing and sharing, with also Markdown WYSIWYG editing, Wiki, file label and other knowledge management features.
http://seafile.com/
Other
12.39k stars 1.55k forks source link

ldapsync IndexError: list index out of range #2789

Closed plabanowski closed 4 months ago

plabanowski commented 4 months ago

After migrate to seafile 11.0.8 Ldapsync is broken all group is empty and i have this error

./pro/pro.py ldapsync
[06/24/2024 14:20:36] [INFO] [seafevents] database: mysql, name: seahub-db
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib64/python3.9/threading.py", line 980, in _bootstrap_inner
    self.run()
  File "/opt/seafile/seafile-pro-server-11.0.8/pro/python/seafevents/ldap_syncer/ldap_sync.py", line 165, in run
    self.start_sync()
  File "/opt/seafile/seafile-pro-server-11.0.8/pro/python/seafevents/ldap_syncer/ldap_sync.py", line 172, in start_sync
    data_ldap = self.get_data_from_ldap()
  File "/opt/seafile/seafile-pro-server-11.0.8/pro/python/seafevents/ldap_syncer/ldap_sync.py", line 189, in get_data_from_ldap
    cur_ret = self.get_data_from_ldap_by_server(config)
  File "/opt/seafile/seafile-pro-server-11.0.8/pro/python/seafevents/ldap_syncer/ldap_group_sync.py", line 110, in get_data_from_ldap_by_server
    department_data_ldap = self.get_ou_data(ldap_conn, config)
  File "/opt/seafile/seafile-pro-server-11.0.8/pro/python/seafevents/ldap_syncer/ldap_group_sync.py", line 361, in get_ou_data
    dn, attrs = result[0]
IndexError: list index out of range