Hi,
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/pro.py ldapsync
imports the wanted users:
seafile@filer.prod seafile-server$ ./pro/pro.py 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 [user1@example.com] success.
[07/18/2019 14:11:40] [DEBUG] Add user [user2@example.com] 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@filer.prod seafile-server$ ./pro/pro.py 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/threading.py", line 812, in __bootstrap_inner
self.run()
File "/var/www/application/seafile-server/pro/python/seafevents/ldap_syncer/ldap_sync.py", line 14, in run
self.start_sync()
File "/var/www/application/seafile-server/pro/python/seafevents/ldap_syncer/ldap_sync.py", line 25, in start_sync
data_db = self.get_data_from_db()
File "/var/www/application/seafile-server/pro/python/seafevents/ldap_syncer/ldap_user_sync.py", 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/service.py", 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/client.py", 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/rpc.py", 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/pool.py", line 29, in get_client
client = self._create_client()
File "/var/www/application/seafile-server/seafile/lib64/python2.7/site-packages/ccnet/pool.py", line 21, in _create_client
client.connect_daemon()
File "/var/www/application/seafile-server/seafile/lib64/python2.7/site-packages/ccnet/client.py", line 131, in connect_daemon
return self.connect_daemon_with_pipe()
File "/var/www/application/seafile-server/seafile/lib64/python2.7/site-packages/ccnet/client.py", 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/pro.py 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/ccnet.pid
[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/pro.py 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!
Axel