Solved: Office preview not working (Internal Error) + Controller.log crashes

I’m not sure if these two problems tie together.
I’m running Seafile-pro-server-6.2.7_x86-64 using nginx on CentOS 7.
(Used this guide: How to Install Seafile with Nginx on CentOS 7)

Everything else works fine. Installed Libreoffice with headless and all the dependencies in the manual. Libreoffice works (tried to convert a doc to pdf in command line and works), but in the web browser, when clicking on office documents, it shows internal error.

I’m new to Seafile and CentOS. I’ve searched all over and changed all the permissions to my files & directories, none of them solved the problems. (I used nginx as my seafile user as the guide link used, so I set permissions with nginx on the whole seafile directory, and so is the seafile.conf under /etc/nginx, and seafile-data under /home/shana601 user, /tmp/seafile-office-output, and also libreoffice(not sure if this is correct))

Problems:
Controller.log shows the same things every 10 seconds like this:

events.conf --logfile /var/www/seafile/logs/seafevents.log -P /var/www/seafile/pids/seafevents.pid
[02/06/18 00:46:25] seafile-controller.c(102): spawned /usr/bin/python2.7, pid 8169
[02/06/18 00:46:35] seafile-controller.c(575): pid file /var/www/seafile/pids/seafevents.pid does not exist
[02/06/18 00:46:35] seafile-controller.c(600): seafevents need restart…
[02/06/18 00:46:35] seafile-controller.c(87): spawn_process: /usr/bin/python2.7 -m seafevents.main --config-file /var/www/seafile/conf/seafevents.conf --logfile /var/www/seafile/logs/seafevents.log -P /var/www/seafile/pids/seafevents.pid
[02/06/18 00:46:35] seafile-controller.c(102): spawned /usr/bin/python2.7, pid 8190
[02/06/18 00:46:45] seafile-controller.c(575): pid file /var/www/seafile/pids/seafevents.pid does not exist
[02/06/18 00:46:45] seafile-controller.c(600): seafevents need restart…
[02/06/18 00:46:45] seafile-controller.c(87): spawn_process: /usr/bin/python2.7 -m seafevents.main --config-file /var/www/seafile/conf/seafevents.conf --logfile /var/www/seafile/logs/seafevents.log -P /var/www/seafile/pids/seafevents.pid
[02/06/18 00:46:45] seafile-controller.c(102): spawned /usr/bin/python2.7, pid 8217
[02/06/18 00:46:55] seafile-controller.c(575): pid file /var/www/seafile/pids/seafevents.pid does not exist
[02/06/18 00:46:55] seafile-controller.c(600): seafevents need restart…
[02/06/18 00:46:55] seafile-controller.c(87): spawn_process: /usr/bin/python2.7 -m seafevents.main --config-file /var/www/seafile/conf/seafevents.conf --logfile /var/www/seafile/logs/seafevents.log -P /var/www/seafile/pids/seafevents.pid
[02/06/18 00:46:55] seafile-controller.c(102): spawned /usr/bin/python2.7, pid 8239
[02/06/18 00:47:05] seafile-controller.c(575): pid file /var/www/seafile/pids/seafevents.pid does not exist
[02/06/18 00:47:05] seafile-controller.c(600): seafevents need restart…
[02/06/18 00:47:05] seafile-controller.c(87): spawn_process: /usr/bin/python2.7 -m seafevents.main --config-file /var/www/seafile/conf/seafevents.conf --logfile /var/www/seafile/logs/seafevents.log -P /var/www/seafile/pids/seafevents.pid
[02/06/18 00:47:05] seafile-controller.c(102): spawned /usr/bin/python2.7, pid 8289

Seafevents.log:

[2018-02-06 00:58:16,571] [DEBUG] seafes dir: /var/www/seafile/seafile-server/pro/python/seafes
[2018-02-06 00:58:16,571] [DEBUG] seafes logfile: /var/www/seafile/logs/index.log
[2018-02-06 00:58:16,571] [DEBUG] seafes index interval: 1800 sec
[2018-02-06 00:58:16,571] [DEBUG] seafes index office/pdf: false
[2018-02-06 00:58:16,571] [DEBUG] seahub email enabled: True
[2018-02-06 00:58:16,571] [DEBUG] seahub dir: /var/www/seafile/seafile-server/seahub
[2018-02-06 00:58:16,673] [INFO] remove pidfile /var/www/seafile/pids/seafevents.pid
[2018-02-06 00:58:26,546] [INFO] audit is not enabled
[2018-02-06 00:58:26,547] [INFO] [seafevents] database: mysql, name: seahub_db
[2018-02-06 00:58:26,589] [INFO] [seafevents] database: mysql, name: seahub_db
[2018-02-06 00:58:26,603] [INFO] Events publish to redis is disabled.
[2018-02-06 00:58:26,604] [DEBUG] seafes enabled: True
[2018-02-06 00:58:26,604] [DEBUG] seafes dir: /var/www/seafile/seafile-server/pro/python/seafes
[2018-02-06 00:58:26,604] [DEBUG] seafes logfile: /var/www/seafile/logs/index.log
[2018-02-06 00:58:26,604] [DEBUG] seafes index interval: 1800 sec
[2018-02-06 00:58:26,604] [DEBUG] seafes index office/pdf: false
[2018-02-06 00:58:26,604] [DEBUG] seahub email enabled: True
[2018-02-06 00:58:26,604] [DEBUG] seahub dir: /var/www/seafile/seafile-server/seahub
[2018-02-06 00:58:26,793] [INFO] remove pidfile /var/www/seafile/pids/seafevents.pid
[2018-02-06 00:58:36,519] [INFO] audit is not enabled
[2018-02-06 00:58:36,521] [INFO] [seafevents] database: mysql, name: seahub_db
[2018-02-06 00:58:36,564] [INFO] [seafevents] database: mysql, name: seahub_db
[2018-02-06 00:58:36,578] [INFO] Events publish to redis is disabled.
[2018-02-06 00:58:36,578] [DEBUG] seafes enabled: True
[2018-02-06 00:58:36,579] [DEBUG] seafes dir: /var/www/seafile/seafile-server/pro/python/seafes
[2018-02-06 00:58:36,579] [DEBUG] seafes logfile: /var/www/seafile/logs/index.log
[2018-02-06 00:58:36,579] [DEBUG] seafes index interval: 1800 sec
[2018-02-06 00:58:36,579] [DEBUG] seafes index office/pdf: false
[2018-02-06 00:58:36,579] [DEBUG] seahub email enabled: True
[2018-02-06 00:58:36,579] [DEBUG] seahub dir: /var/www/seafile/seafile-server/seahub
[2018-02-06 00:58:36,682] [INFO] remove pidfile /var/www/seafile/pids/seafevents.pid

Not sure how to stop this other than stopping seafile, not sure what triggered this either. Tried ps command, no seafevent process found.

Here is the Seafevents.conf file:

I have no more idea on where to look for the cause, that’s why I’m here to ask for help. The only thing that I can think of is the path to java, but since I’m new to all these, I’m not clear on this. So if anyone who sees this could please help a little would be very appreciated!

Shana

One thing I didn’t mention is that I moved the seafile-data to a different directory under a different user shana601 by moving “/var/www/seafile/seafile-data” to “/home/shana601/seafile-data” because of short of space.
Then I modify the seafile.ini path to the new path.

I’m not sure if this would cause any problem. If so, is there any other easy way to change the seafile-data directory after deployment? Please guide me with any further actions. Thanks so much!

Here is a mind map for my seafile deployment:

I found the problem today. It was about the directory of seafile-data that I moved (I simply moved the old one to a new location with seafile.ini modified). This is causing the soft link(not sure which one) point to nothing I guess, and then it causes seafevents not being able to find it and then spawning process and crashes the log.

What I did to solve it was to add a seafile-data directory again to where it was when I first set up the seafile, with the nginx user(my seafile user) ownership and then change the seafile.ini path to it, restart seafile. Then kill the old libreoffice process with:

pkill -f soffice.bin

Then I tested it’s working with libreoffice preview online.
Then I delete what’s just created on the browser for testing. And simply modify the seafile.ini with my new/desired directory path back. I can now use the new/desired directory with libreoffice too.

This is a diffierent thing, but just in case someone is interested in relocating the seafile-data directory(my first set up has not enough space, so I moved it), you can simply copy it to the new location(rem to modify the ownership and permission of the new location and the mother directories to the seafile user so that the seafile user can access and modify your data). Then modify the seafile,ini under ccnet.

Remember to leave the old seafile-data where it was. If you have uploaded too much already, you can probably delete/move what’s stored in the storage in the old seafile-data. Then just restart seafile. It should just work.