Hi, I’m still working on seafile, I installed version 12 in docker. But I also have an LDAP error. The configuration is the same (I tried changing different values)
You can also try to log in to the Seafile Docker container and use the ldapsearch command to verify if you can connect to LDAP manually. The command is like follows:
#-H LDAP_SERVER_URL#-b LDAP_BASE_DN
#-D LDAP_ADMIN_DN
#'(objectClass=person)' LDAP Filter
#-W After executing this command, enter the password manually.
ldapsearch -x -H ldap://192.168.4.3/ -b 'cn=users,dc=hacn,dc=local' '(objectClass=person)' -D 'administrator@hacn.local' -W -LLL
Hi, I spent a lot of time solving this problem. I tested the script and it works. I compared the entries and saw differences only in the “/” at the end of the line, with the value
Hi,
Thank you for your feedback! After analyzing your logs, we’ve identified two types of errors you’re encountering:
“Resource temporarily unavailable” – this occurs when connecting to the LDAP server.
“Bad search filter” – this is caused by an invalid LDAP filter (LDAP_FILTER).
You suspect the issue might be related to whether the LDAP_SERVER_URL ends with a trailing slash “/”. However, we haven’t been able to reproduce this problem in our internal tests. We recommend testing with the following steps:
First, omit the LDAP_FILTER configuration. This will default to searching all AD users. With LDAP_FILTER unset, test by adding or removing the trailing “/” in the SERVER_URL to see if the LDAP connection works properly.
Seafile’s LDAP user access relies on the python-ldap package. According to the documentation, the LDAP URI does not require a trailing “/” at the end.
On the other hand, you also can test it by a python scripts to see which one will raise an error:
Docker compose 12 version startup error when restarting.
Error:Seahub failed to start.
Please try to run "./seahub.sh start" again
Traceback (most recent call last):
File "/scripts/start.py", line 94, in <module>
main()
File "/scripts/start.py", line 80, in main
call('{} start'.format(get_script('seahub.sh')))
File "/scripts/utils.py", line 70, in call
return subprocess.check_call(*a, **kw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '/opt/seafile/seafile-server-12.0.14/seahub.sh start' returned non-zero exit status 1.
If I disable #LDAP_FILTER = ‘memberOf=CN=Seafile,OU=domail,dc=tsgk,dc=lcl’
it works, but the logs are in seahub.log:
[2025-11-12 16:22:16] [ERROR] seahub.utils.timeutils:65 timestamp_to_isoformat_timestr ‘<=’ not supported between instances of ‘int’ and ‘NoneType’
In version 13, the logs show this error:
[2025-11-12 16:44:56] [ERROR] seahub_settings.py load: SyntaxError: unterminated string literal (detected at line 32) (seahub_settings.py, line 32)
Traceback (most recent call last):
File "/opt/seafile/seafile-server-13.0.12/seahub/seahub/settings.py", line 1167, in <module>
import seahub_settings
File "/opt/seafile/conf/seahub_settings.py", line 32
LDAP_FILTER = 'memberOf=CN=Seafile,OU=TSK,DC=dimain,DC=lcl’
^
SyntaxError: unterminated string literal (detected at line 32)
[2025-11-12 11:45:04] [WARNING] django.security.SuspiciousSession:138 decode Session data corrupted