Why are LDAP dependencies required?

As of v11 (non-pro), LDAP dependencies appear to be required. When starting services up, following is logged into controller.log:

2024-04-03 14:25:37 seafile-controller.c(427): pid file /seafile/pids/seafdav.pid does not exist
2024-04-03 14:25:37 seafile-controller.c(506): seafdav need restart...
2024-04-03 14:25:37 seafile-controller.c(82): spawn_process: /usr/bin/python3 -m wsgidav.server.server_cli --server gunicorn --root / --log-file /seafile/logs/seafdav.log --pid /seafile/pids/seafdav.pid --port 8080 --host
2024-04-03 14:25:37 seafile-controller.c(116): spawned /usr/bin/python3, pid 1082
2024-04-03 14:25:37 seafile-controller.c(124): Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/seafile/seafile-server-11.0.6/seahub/thirdpart/wsgidav/server/server_cli.py", line 52, in <module>
    from wsgidav.dc.domain_controller import SeafileDomainController
  File "/seafile/seafile-server-11.0.6/seahub/thirdpart/wsgidav/dc/domain_controller.py", line 5, in <module>
    from wsgidav.dc.seaf_utils import multi_tenancy_enabled
  File "/seafile/seafile-server-11.0.6/seahub/thirdpart/wsgidav/dc/seaf_utils.py", line 8, in <module>
    import ldap
ModuleNotFoundError: No module named 'ldap'

Additionally file_updates_sender.log has:

Traceback (most recent call last):
  File "/seafile/seafile-server-11.0.6/seahub/manage.py", line 10, in <module>
  File "/seafile/seafile-server-11.0.6/seahub/thirdpart/django/core/management/__init__.py", line 442, in execute_from_command_line
  File "/seafile/seafile-server-11.0.6/seahub/thirdpart/django/core/management/__init__.py", line 416, in execute
  File "/seafile/seafile-server-11.0.6/seahub/thirdpart/django/__init__.py", line 24, in setup
  File "/seafile/seafile-server-11.0.6/seahub/thirdpart/django/apps/registry.py", line 116, in populate
  File "/seafile/seafile-server-11.0.6/seahub/thirdpart/django/apps/config.py", line 269, in import_models
    self.models_module = import_module(models_module_name)
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/seafile/seafile-server-11.0.6/seahub/thirdpart/registration/models.py", line 13, in <module>
    from seahub.base.accounts import User
  File "/seafile/seafile-server-11.0.6/seahub/seahub/base/accounts.py", line 19, in <module>
    import ldap
ModuleNotFoundError: No module named 'ldap'

The error is understandable in that I do not have any ldap dependencies (apt nor py packages) installed, but I’ve been using seafile since v3 and never configured LDAP. So why are the dependencies now needed as of v11?

In version 11, LDAP login is re-implemented in the Python part. So the dependency is needed now. The C language part now no longer need to be compiled with LDAP libraries.

1 Like