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.27k stars 1.54k forks source link

ldap sync for ad domain group and organizationalUnit #2738

Closed uranus829 closed 7 months ago

uranus829 commented 8 months ago

Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib64/python2.7/threading.py", line 812, in __bootstrap_inner self.run() File "/opt/seafile/seafile-pro-server/pro/python/seafevents/ldap_syncer/ldap_sync.py", line 14, in run self.start_sync() File "/opt/seafile/seafile-pro-server/pro/python/seafevents/ldap_syncer/ldap_sync.py", line 21, in start_sync data_ldap = self.get_data_from_ldap() File "/opt/seafile/seafile-pro-server/pro/python/seafevents/ldap_syncer/ldap_sync.py", line 38, in get_data_from_ldap cur_ret = self.get_data_from_ldap_by_server(config) File "/opt/seafile/seafile-pro-server/pro/python/seafevents/ldap_syncer/ldap_group_sync.py", line 83, in get_data_from_ldap_by_server group_data_ldap = self.get_common_group_data(ldap_conn, config) File "/opt/seafile/seafile-pro-server/pro/python/seafevents/ldap_syncer/ldap_group_sync.py", line 126, in get_common_group_data grp_data_ldap[group_dn] = LdapGroup(attrs['cn'][0], None, []) KeyError: 'cn'

[02/06/2024 23:42:35] [DEBUG] using config file /opt/seafile/conf/ccnet.conf [02/06/2024 23:42:35] [INFO] LDAP user sync result: add [0]user, update [0]user, deactive [0]user, add [0]role, update [0]role [02/06/2024 23:42:35] [INFO] LDAP profile sync result: add [0]profile, update [0]profile, delete [0]profile [02/06/2024 23:42:35] [INFO] LDAP dept sync result: add [0]dept, update [0]dept, delete [0]dept

freeplant commented 8 months ago

I see you still use python2.7. Which Seafile version do you use?