[Solved] File operation not update in the Activities

My Seafile currently cannot track the file operation in the Activities Tab.
This phenomenon happened after a server reboot.

When I upload/create/delete/move a file using web-interface/desktop/mobile client, the operation won’t show up in the Activities Tab under Tools.
However, the operation does show up if I look at the history of the library.
Besides the Activities Tab, the Statistic Tab and File Update/Access Tab in the System Admin also won’t get updated for any file operation.

Other than that, Seafile seems to run fine. I don’t notice any other problems, i.e., the core functionalities of upload/download/sync/browse all work normally.
The Login Tab in the System Admin works normally, recording every login attemp.
I also don’t find anything abnormal in the logs: ccnet.log/controller.log/seafile.log/seahub.log/seafevents.log

Any idea how to debug this issue?
I am running Seafile Pro 6.3.13

I keep dig into the issue and get the problem solved.

Here is what I found.
I check the running processes, and found the seafevents and elasticsearch processes are not running.

Then I check the start up sequence in the controller.log:
Here is an abnormal one:

[05/07/19 01:59:13] seafile-controller.c(184): starting ccnet-server ...
[05/07/19 01:59:13] seafile-controller.c(88): spawn_process: ccnet-server -F /home/teng/haiwen/conf -c /home/teng/haiwen/ccnet -f /home/teng/haiwen/logs/ccnet.log -d -L /home/teng/haiwen -P /home/teng/haiwen/pids/ccnet.pid
[05/07/19 01:59:13] seafile-controller.c(103): spawned ccnet-server, pid 6851
[05/07/19 01:59:14] seafile-controller.c(779): ccnet daemon connected.
[05/07/19 01:59:14] seafile-controller.c(218): starting seaf-server ...
[05/07/19 01:59:14] seafile-controller.c(88): spawn_process: seaf-server -F /home/teng/haiwen/conf -c /home/teng/haiwen/ccnet -d /home/teng/haiwen/seafile-data -l /home/teng/haiwen/logs/seafile.log -P /home/teng/haiwen/pids/seaf-server.pid -f -L /home/teng/haiwen
[05/07/19 01:59:14] seafile-controller.c(103): spawned seaf-server, pid 6853
[05/07/19 01:59:14] seafile-controller.c(747): seafdav is not enabled

Here is an normal one:

[04/27/19 22:29:09] seafile-controller.c(184): starting ccnet-server ...
[04/27/19 22:29:09] seafile-controller.c(88): spawn_process: ccnet-server -F /home/teng/haiwen/conf -c /home/teng/haiwen/ccnet -f /home/teng/haiwen/logs/ccnet.log -d -L /home/teng/haiwen -P /home/teng/haiwen/pids/ccnet.pid
[04/27/19 22:29:09] seafile-controller.c(103): spawned ccnet-server, pid 1530
[04/27/19 22:29:10] seafile-controller.c(779): ccnet daemon connected.
[04/27/19 22:29:10] seafile-controller.c(218): starting seaf-server ...
[04/27/19 22:29:10] seafile-controller.c(88): spawn_process: seaf-server -F /home/teng/haiwen/conf -c /home/teng/haiwen/ccnet -d /home/teng/haiwen/seafile-data -l /home/teng/haiwen/logs/seafile.log -P /home/teng/haiwen/pids/seaf-server.pid -f -L /home/teng/haiwen
[04/27/19 22:29:10] seafile-controller.c(103): spawned seaf-server, pid 1698
[04/27/19 22:29:10] seafile-controller.c(592): pid file /home/teng/haiwen/pids/seafevents.pid does not exist
[04/27/19 22:29:10] seafile-controller.c(88): spawn_process: /usr/bin/python2.7 -m seafevents.main --config-file /home/teng/haiwen/conf/seafevents.conf --logfile /home/teng/haiwen/logs/seafevents.log -P /home/teng/haiwen/pids/seafevents.pid
[04/27/19 22:29:10] seafile-controller.c(103): spawned /usr/bin/python2.7, pid 1699
[04/27/19 22:29:10] seafile-controller.c(747): seafdav is not enabled
[04/27/19 22:29:10] seafile-controller.c(592): pid file /home/teng/haiwen/pids/elasticsearch.pid does not exist
[04/27/19 22:29:10] seafile-controller.c(88): spawn_process: /home/teng/haiwen/seafile-pro-server-6.3.13/pro/elasticsearch/bin/elasticsearch -Des.path.logs=/home/teng/haiwen/logs -Des.path.data=/home/teng/haiwen/pro-data/search/data -Des.network.host= -Des.insecure.allow.root=true -p /home/teng/haiwen/pids/elasticsearch.pid
[04/27/19 22:29:10] seafile-controller.c(103): spawned /home/teng/haiwen/seafile-pro-server-6.3.13/pro/elasticsearch/bin/elasticsearch, pid 1700

Apparently, the seafevents and elasticsearch process are not running.

Then I stop the seafile server, manually delete the pid files: elasticsearch.pid and seafevents.pid, in the pids folder, and restart the server again. Everything gets back to normal.

So, the root cause is: last time when I reboot the server, the seafile processes do not shutdown properly. As a result, elasticsearch.pid and seafevents.pid are not clean up. The next time when I try to start the seafile server, the seafile-controller thinks seafevents and elasticsearch are running, so skipping running them.

So here is the bug: seafile-controller should check whether the process storing in the pid file exists or not, rather than the pid file exists or not, to decide if seafevents and elasticsearch need to run or not. @daniel.pan


Nice preparation and structure, hope you get heard

I found the same or similar issue in 7.1.8. After a reboot the activities were frozen (old showing, no new were added). I restarted the seafile service and made sure /pids was empty (it was). Then it started working again

Thank you very much for the hints!

Just to let the Seafile team know, this is still a problem in 2024 – had to delete seafevents.pid to get activities updates again using the CE edition version 11.0.3.