Seafile pro 7.0.5 - ./pro/ ldapsync works just once

I make a fresh installation of seafile server pro 7.0.5 on a newly created Centos 7 vm (the same error occurs on Debain 8 too).
I have an ldaps connection to openldap

The execution ./pro/ ldapsync imports the wanted users: seafile-server$ ./pro/ ldapsync
[07/18/2019 14:11:40] [DEBUG] using config file /var/www/application/conf/ccnet.conf
[07/18/2019 14:11:40] [DEBUG] Add user [] success.
[07/18/2019 14:11:40] [DEBUG] Add user [] success.
[07/18/2019 14:11:40] [INFO] LDAP user sync result: add [2]user, update [0]user, deactive [0]user, add [0]role, update [0]role

If I repeat the same command a few seconds later then it fails: seafile-server$ ./pro/ ldapsync
[07/18/2019 14:11:42] [DEBUG] using config file /var/www/application/conf/ccnet.conf
[07/18/2019 14:11:42] [DEBUG] using config file /var/www/application/conf/ccnet.conf
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/", line 812, in __bootstrap_inner
  File "/var/www/application/seafile-server/pro/python/seafevents/ldap_syncer/", line 14, in run
  File "/var/www/application/seafile-server/pro/python/seafevents/ldap_syncer/", line 25, in start_sync
    data_db = self.get_data_from_db()
  File "/var/www/application/seafile-server/pro/python/seafevents/ldap_syncer/", line 258, in get_data_from_db
    users = get_ldap_users(-1, -1)
  File "/var/www/application/seafile-server/seafile/lib64/python2.7/site-packages/seaserv/", line 136, in get_ldap_users
    ret = ccnet_threaded_rpc.get_ldap_users(start, offset)
  File "/var/www/application/seafile-server/seafile/lib64/python2.7/site-packages/pysearpc/", line 125, in newfunc
    ret_str = self.call_remote_func_sync(fcall_str)
  File "/var/www/application/seafile-server/seafile/lib64/python2.7/site-packages/ccnet/", line 71, in call_remote_func_sync
    client = self.pool.get_client()
  File "/var/www/application/seafile-server/seafile/lib64/python2.7/site-packages/ccnet/", line 29, in get_client
    client = self._create_client()
  File "/var/www/application/seafile-server/seafile/lib64/python2.7/site-packages/ccnet/", line 21, in _create_client
  File "/var/www/application/seafile-server/seafile/lib64/python2.7/site-packages/ccnet/", line 131, in connect_daemon
    return self.connect_daemon_with_pipe()
  File "/var/www/application/seafile-server/seafile/lib64/python2.7/site-packages/ccnet/", line 113, in connect_daemon_with_pipe
    raise NetworkError("Can't connect to daemon")
NetworkError: Can't connect to daemon

The message NetworkError: Can’t connect to daemon is confusing, because the import a few seconds ago was successful. The logs show that the ccnet-server seems to die on each execution of ./pro/ ldapsync :

==> logs/ccnet.log <==
[07/18/19 14:24:28] ../common/session.c(409): Accepted a local client

==> logs/controller.log <==
[07/18/19 14:24:28] Disconnected from daemon
[07/18/19 14:24:28] seafile-controller.c(688): restarting ccnet server ...
[07/18/19 14:24:28] seafile-controller.c(190): starting ccnet-server ...
[07/18/19 14:24:28] seafile-controller.c(94): spawn_process: ccnet-server -F /var/www/application/conf -c /var/www/application/ccnet -f /var/www/application/logs/ccnet.log -d -L /var/www/application -P /var/www/application/pids/
[07/18/19 14:24:28] seafile-controller.c(109): spawned ccnet-server, pid 21442

==> logs/seafile.log <==
[07/18/2019 02:24:28 PM] Disconnected from daemon

./pro/ ldapsync does not run anymore as long there is a user in “ldap (imported)” list. Only if I delete all users (in the browser: /sys/useradmin/ldap/imported) then the it runs … but only once (to import the users) and then fails again.

I think that behaviour on the command line is the reason that the ldap sync functionality does not work.

Any ideas how to find out what the problem with the restarting restarting ccnet server is?

Thanks a lot for your hints!


same error in 7.0.5 …

This is a known bug. It will be fixed in 7.0.6 in the next week.