LDAP sync crash 8.0.4

Hello,

I’m running Seafile Pro 8.0.4 (Docker version).
LDAP user sync seems to work fine (I can log-in with LDAP user and password) but the LDAP syn process seems to crash before or during the group sync.
Below the log, and here is the ccnet.conf setting

Is something not well configured ?

[LDAP]
HOST = ldap://myip:389/
BASE = OU=Utilisateurs,DC=eurohm2,DC=dom
USER_DN = CN=seafile-admin,OU=SEAFILE,OU=APPLICATIONS,OU=Utilisateurs,DC=mydomain,DC=dom
PASSWORD = MYPASSWORD
LOGIN_ATTR = mail

[LDAP_SYNC]
ENABLE_USER_SYNC = true
DEACTIVE_USER_IF_NOTFOUND = true
SYNC_INTERVAL = 5
USER_OBJECT_CLASS = person
ENABLE_EXTRA_USER_INFO_SYNC = true
FIRST_NAME_ATTR = givenName
LAST_NAME_ATTR = sn
UID_ATTR = sAMAccountName
ACTIVATE_USER_WHEN_IMPORT = false
ENABLE_GROUP_SYNC = true

Logs:

root@9ceac3a4dffc:/opt/seafile/seafile-server-latest# ./pro/pro.py ldapsync

[06/25/2021 13:10:08] [INFO] LDAP user sync result: add [0]user, update [0]user, deactive [0]user, add [0]role, update [0]role
[06/25/2021 13:10:08] [INFO] LDAP profile sync result: add [0]profile, update [0]profile, delete [0]profile
[06/25/2021 13:10:08] [INFO] LDAP dept sync result: add [0]dept, update [0]dept, delete [0]dept
Exception in thread Thread-1:
Traceback (most recent call last):
File “/opt/seafile/seafile-pro-server-8.0.4/pro/python/seafevents/ldap_syncer/utils.py”, line 20, in bytes2str
return data.decode()
UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xa7 in position 0: invalid start byte

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/lib/python3.6/threading.py”, line 916, in _bootstrap_inner
self.run()
File “/opt/seafile/seafile-pro-server-8.0.4/pro/python/seafevents/ldap_syncer/ldap_sync.py”, line 57, in run
self.start_sync()
File “/opt/seafile/seafile-pro-server-8.0.4/pro/python/seafevents/ldap_syncer/ldap_sync.py”, line 64, in start_sync
data_ldap = self.get_data_from_ldap()
File “/opt/seafile/seafile-pro-server-8.0.4/pro/python/seafevents/ldap_syncer/ldap_sync.py”, line 81, in get_data_from_ldap
cur_ret = self.get_data_from_ldap_by_server(config)
File “/opt/seafile/seafile-pro-server-8.0.4/pro/python/seafevents/ldap_syncer/ldap_group_sync.py”, line 98, in get_data_from_ldap_by_server
group_data_ldap = self.get_common_group_data(ldap_conn, config)
File “/opt/seafile/seafile-pro-server-8.0.4/pro/python/seafevents/ldap_syncer/ldap_group_sync.py”, line 140, in get_common_group_data
self.get_group_member_from_ldap(config, ldap_conn, group_dn, grp_data_ldap, sort_list, parent_uuid=None)
File “/opt/seafile/seafile-pro-server-8.0.4/pro/python/seafevents/ldap_syncer/ldap_group_sync.py”, line 213, in get_group_member_from_ldap
mails = self.get_group_member_from_ldap(config, ldap_conn, member, grp_data, sort_list, group_uuid)
File “/opt/seafile/seafile-pro-server-8.0.4/pro/python/seafevents/ldap_syncer/ldap_group_sync.py”, line 213, in get_group_member_from_ldap
mails = self.get_group_member_from_ldap(config, ldap_conn, member, grp_data, sort_list, group_uuid)
File “/opt/seafile/seafile-pro-server-8.0.4/pro/python/seafevents/ldap_syncer/ldap_group_sync.py”, line 213, in get_group_member_from_ldap
mails = self.get_group_member_from_ldap(config, ldap_conn, member, grp_data, sort_list, group_uuid)
[Previous line repeated 967 more times]
File “/opt/seafile/seafile-pro-server-8.0.4/pro/python/seafevents/ldap_syncer/ldap_group_sync.py”, line 159, in get_group_member_from_ldap
result = bytes2str(result)
File “/opt/seafile/seafile-pro-server-8.0.4/pro/python/seafevents/ldap_syncer/utils.py”, line 25, in bytes2str
elif isinstance(data, list): return list(map(bytes2str, data))
File “/opt/seafile/seafile-pro-server-8.0.4/pro/python/seafevents/ldap_syncer/utils.py”, line 24, in bytes2str
elif isinstance(data, tuple): return tuple(map(bytes2str, data))
File “/opt/seafile/seafile-pro-server-8.0.4/pro/python/seafevents/ldap_syncer/utils.py”, line 23, in bytes2str
elif isinstance(data, dict): return dict(map(bytes2str, data.items()))
File “/opt/seafile/seafile-pro-server-8.0.4/pro/python/seafevents/ldap_syncer/utils.py”, line 24, in bytes2str
elif isinstance(data, tuple): return tuple(map(bytes2str, data))
File “/opt/seafile/seafile-pro-server-8.0.4/pro/python/seafevents/ldap_syncer/utils.py”, line 25, in bytes2str
elif isinstance(data, list): return list(map(bytes2str, data))
File “/opt/seafile/seafile-pro-server-8.0.4/pro/python/seafevents/ldap_syncer/utils.py”, line 22, in bytes2str
return str(uuid.UUID(bytes=data))
File “/usr/lib/python3.6/uuid.py”, line 133, in init
if [hex, bytes, bytes_le, fields, int].count(None) != 4:
RecursionError: maximum recursion depth exceeded in comparison

I have found the problem which was of an infinite loop over a few levels of recursions: group A was in group B which was in group C which was in group A.

Glad to hear. Could you mark the topic as solved?