升级到seafile 7 后遇到的问题


#1

之前一直在用的是6.1版本,后来在看7.0的升级指南后,把运行用户由root用户变成了非root的seafile账户,但这么一来就出现了一些问题,其他的问题都已经解决得差不多了,目前主要问题有:

1、markdown文本无法在流览器端显示,更不要说预览或编辑了;使用chrome的inspect后显示“Failed to load resource: the server responded with a status of 500 (Internal Server Error)”;
2、office文档无法预览。有seafevents.log附下:

[2019-09-12 02:44:22,584] [WARNING] failed to convert <type: docx, id: 253cac1a8180bc6ca345fdbe2a83f6e6c8ed3854> to pdf
[2019-09-12 02:46:06,492] [INFO] starts to index files
[2019-09-12 02:47:29,452] [WARNING] error when invoking libreoffice: Verbosity set to level 3
DEBUG: Connection type: socket,host=127.0.0.1,port=2002;urp;StarOffice.ComponentContext
DEBUG: Existing listener not found.
DEBUG: Launching our own listener using /usr/lib64/libreoffice/program/soffice.bin.
DEBUG: Process /usr/lib64/libreoffice/program/soffice.bin (pid=7245) exited with 77.
Error: Unable to connect or start own listener. Aborting.
Using office base path: /usr/lib64/libreoffice
Using office binary path: /usr/lib64/libreoffice/program
LibreOffice listener successfully started. (pid=7245)

[2019-09-12 02:47:29,453] [WARNING] failed to convert <type: docx, id: 253cac1a8180bc6ca345fdbe2a83f6e6c8ed3854> to pdf
[2019-09-12 02:47:57,191] [WARNING] error when invoking libreoffice: Verbosity set to level 3
DEBUG: Connection type: socket,host=127.0.0.1,port=2002;urp;StarOffice.ComponentContext
DEBUG: Existing listener not found.
DEBUG: Launching our own listener using /usr/lib64/libreoffice/program/soffice.bin.
DEBUG: Process /usr/lib64/libreoffice/program/soffice.bin (pid=7780) exited with 77.
Error: Unable to connect or start own listener. Aborting.
Using office base path: /usr/lib64/libreoffice
Using office binary path: /usr/lib64/libreoffice/program
LibreOffice listener successfully started. (pid=7780)

[2019-09-12 02:47:57,191] [WARNING] failed to convert <type: docx, id: 0b3b9c49b2de065782aad7fba81c1be13d919e81> to pdf
[2019-09-12 02:52:09,577] [WARNING] error when invoking libreoffice: Verbosity set to level 3
DEBUG: Connection type: socket,host=127.0.0.1,port=2002;urp;StarOffice.ComponentContext
DEBUG: Existing listener not found.
DEBUG: Launching our own listener using /usr/lib64/libreoffice/program/soffice.bin.
DEBUG: Process /usr/lib64/libreoffice/program/soffice.bin (pid=12423) exited with 77.
Error: Unable to connect or start own listener. Aborting.
Using office base path: /usr/lib64/libreoffice
Using office binary path: /usr/lib64/libreoffice/program
LibreOffice listener successfully started. (pid=12423)

[2019-09-12 02:52:09,577] [WARNING] failed to convert <type: docx, id: 0b3b9c49b2de065782aad7fba81c1be13d919e81> to pdf
[2019-09-12 02:56:06,557] [INFO] starts to index files
[2019-09-12 03:06:06,370] [INFO] starts to send email
[2019-09-12 03:06:06,587] [INFO] starts to index files
[2019-09-12 03:15:32,623] [INFO] [seafevents] database: mysql, name: seahub_db
[2019-09-12 03:15:32,807] [INFO] audit is enabled
[2019-09-12 03:15:32,812] [INFO] [seafevents] database: mysql, name: seahub_db
[2019-09-12 03:15:32,820] [INFO] [seafevents] database: mysql, name: seafile_db
[2019-09-12 03:15:33,256] [INFO] The file with the following suffix will be recorded into the file history: md,txt,doc,docx,xls,xlsx,ppt,pptx
[2019-09-12 03:15:33,259] [INFO] [seafevents] database: mysql, name: seahub_db
[2019-09-12 03:15:33,260] [INFO] Events publish to redis is disabled.
[2019-09-12 03:15:33,262] [INFO] LDAP section is not set, disable ldap sync.
[2019-09-12 03:15:33,263] [INFO] [virus_scan] scan_command option is not found in /opt/seafile/conf/seafile.conf, disable virus scan.
[2019-09-12 03:15:33,266] [INFO] try to connect to ccnet-server…
[2019-09-12 03:15:33,266] [INFO] connected to ccnet server
[2019-09-12 03:15:33,268] [INFO] listen to mq: set([‘seahub.audit’, ‘seaf_server.event’, ‘seaf_server.stats’, ‘seahub.stats’, ‘seahub.draft’])
[2019-09-12 03:15:33,269] [INFO] Starting background tasks.
[2019-09-12 03:15:33,269] [INFO] Start file updates sender, interval = 60 sec
[2019-09-12 03:15:33,269] [INFO] work weixin notice sender is disabled
[2019-09-12 03:15:33,270] [INFO] search indexer is started, interval = 600 sec
[2019-09-12 03:15:33,270] [INFO] seahub email sender is started, interval = 1800 sec
[2019-09-12 03:15:33,270] [INFO] ldap sync is disabled
[2019-09-12 03:15:33,270] [INFO] virus scan is disabled
[2019-09-12 03:15:33,270] [INFO] data statistics is disabled
[2019-09-12 03:15:33,270] [INFO] content scan is disabled
[2019-09-12 03:15:36,772] [WARNING] Failed to running unoconv process.
[2019-09-12 03:15:36,774] [INFO] office converter started
[2019-09-12 03:15:36,775] [INFO] User login statistics is disabled.
[2019-09-12 03:15:36,775] [INFO] Traffic statistics is disabled.
[2019-09-12 03:16:16,303] [WARNING] error when invoking libreoffice: Verbosity set to level 3
DEBUG: Connection type: socket,host=127.0.0.1,port=2002;urp;StarOffice.ComponentContext
DEBUG: Existing listener not found.
DEBUG: Launching our own listener using /usr/lib64/libreoffice/program/soffice.bin.
DEBUG: Process /usr/lib64/libreoffice/program/soffice.bin (pid=6602) exited with 77.
Error: Unable to connect or start own listener. Aborting.
Using office base path: /usr/lib64/libreoffice
Using office binary path: /usr/lib64/libreoffice/program
LibreOffice listener successfully started. (pid=6602)

[2019-09-12 03:16:16,304] [WARNING] failed to convert <type: docx, id: 0b3b9c49b2de065782aad7fba81c1be13d919e81> to pdf
[2019-09-12 03:25:33,290] [INFO] starts to index files

我初步觉得是seafile的权限问题,可是我已经修改sudoers将seafile变为root权限了。现在不知道怎么解决,请高手帮忙解决,谢谢!!


#2

爬了半天的贴子,初步判断是通信端口错误,于是我以root用户将libreoffice运行的端口设定为2002,结果,office的预览成功解决!!

命令为: /usr/lib64/libreoffice/program/soffice --headless --accept=“socket,host=127.0.0.1,port=2002;urp;” --nofirststartwizard &

但是markdown却仍无法显示。请高手给予解决!


#3

照着这个解决了。


#4

感谢!!
执行soffice --headless --accept="socket,host=127.0.0.1,port=2002;urp;" --nofirststartwizard &amp;后成功解决转换失败的问题!!
P.S. 原来代码中双引号为中文字符,执行会报错,大家注意下