office 预览不停转


#1

升级到了7.0.8,office的预览总是不停转!!以下是seafevents.log的记录:

[2019-09-24 14:30:01,883] [WARNING] failed to convert <type: docx, id: b5d347f27e16bb62a49be769d81c301dc9448e40> to pdf

[2019-09-24 14:30:01,885] [WARNING] failed to fetch document of task <type: docx, id: 1cb9b9bd4535c43add03b6ff4cd1c9ef8092620d> (http://127.0.0.1:8082/files/3e79d6ac-73b8-4a47-affa-f7b59c63f12d/陈东涛、孙少芳民间借贷纠纷二审民事判决书.docx): HTTP Error 400: Bad Request

[2019-09-24 14:30:01,892] [WARNING] failed to fetch document of task <type: docx, id: 7cac544a792a2469776d3f9505f47da9dcf9ebd0> (http://127.0.0.1:8082/files/1bb342fe-626f-46f3-9d0a-b89e24b563a1/701-民事起诉状-201909233901.docx): HTTP Error 400: Bad Request

[2019-09-24 14:34:51,686] [INFO] starts to index files

[2019-09-24 14:44:51,764] [INFO] starts to index files

[2019-09-24 14:54:48,564] [INFO] starts to send email

[2019-09-24 14:54:51,797] [INFO] starts to index files

[2019-09-24 14:55:15,705] [INFO] exit with code 0

[2019-09-24 14:57:28,099] [INFO] [seafevents] database: mysql, name: seahub_db

[2019-09-24 14:57:30,150] [INFO] audit is enabled

[2019-09-24 14:57:30,153] [INFO] [seafevents] database: mysql, name: seahub_db

[2019-09-24 14:57:30,162] [INFO] [seafevents] database: mysql, name: seafile_db

[2019-09-24 14:57:36,188] [INFO] The file with the following suffix will be recorded into the file history: md,txt,doc,docx,xls,xlsx,ppt,pptx

[2019-09-24 14:57:36,190] [INFO] [seafevents] database: mysql, name: seahub_db

[2019-09-24 14:57:36,191] [INFO] Events publish to redis is disabled.

[2019-09-24 14:57:36,207] [INFO] LDAP section is not set, disable ldap sync.

[2019-09-24 14:57:36,208] [INFO] [virus_scan] scan_command option is not found in /opt/seafile/conf/seafile.conf, disable virus scan.

[2019-09-24 14:57:36,212] [INFO] try to connect to ccnet-server…

[2019-09-24 14:57:36,212] [INFO] connected to ccnet server

[2019-09-24 14:57:36,217] [INFO] listen to mq: set([‘seahub.audit’, ‘seaf_server.event’, ‘seaf_server.stats’, ‘seahub.stats’, ‘seahub.draft’])

[2019-09-24 14:57:36,218] [INFO] Starting background tasks.

[2019-09-24 14:57:36,218] [INFO] Start file updates sender, interval = 60 sec

[2019-09-24 14:57:36,218] [INFO] work weixin notice sender is disabled

[2019-09-24 14:57:36,218] [INFO] search indexer is started, interval = 600 sec

[2019-09-24 14:57:36,219] [INFO] seahub email sender is started, interval = 1800 sec

[2019-09-24 14:57:36,219] [INFO] ldap sync is disabled

[2019-09-24 14:57:36,219] [INFO] virus scan is disabled

[2019-09-24 14:57:36,219] [INFO] data statistics is disabled

[2019-09-24 14:57:36,219] [INFO] content scan is disabled

[2019-09-24 14:57:40,450] [INFO] unoconv process already start.

[2019-09-24 14:57:40,454] [INFO] office converter started

[2019-09-24 14:57:40,454] [INFO] User login statistics is disabled.

[2019-09-24 14:57:40,455] [INFO] Traffic statistics is disabled.

[2019-09-24 14:58:46,554] [WARNING] libevent error: what = 17

[2019-09-24 14:58:46,555] [WARNING] connection to ccnet-server is lost

[2019-09-24 14:58:46,555] [INFO] exit with code 0

[2019-09-24 14:58:55,408] [INFO] [seafevents] database: mysql, name: seahub_db

[2019-09-24 14:58:55,517] [INFO] audit is enabled

[2019-09-24 14:58:55,520] [INFO] [seafevents] database: mysql, name: seahub_db

[2019-09-24 14:58:55,522] [INFO] [seafevents] database: mysql, name: seafile_db

[2019-09-24 14:58:56,087] [INFO] The file with the following suffix will be recorded into the file history: md,txt,doc,docx,xls,xlsx,ppt,pptx

[2019-09-24 14:58:56,094] [INFO] [seafevents] database: mysql, name: seahub_db

[2019-09-24 14:58:56,095] [INFO] Events publish to redis is disabled.

[2019-09-24 14:58:56,098] [INFO] LDAP section is not set, disable ldap sync.

[2019-09-24 14:58:56,105] [INFO] [virus_scan] scan_command option is not found in /opt/seafile/conf/seafile.conf, disable virus scan.

[2019-09-24 14:58:56,108] [INFO] try to connect to ccnet-server…

[2019-09-24 14:58:56,109] [INFO] connected to ccnet server

[2019-09-24 14:58:56,118] [INFO] listen to mq: set([‘seahub.audit’, ‘seaf_server.event’, ‘seaf_server.stats’, ‘seahub.stats’, ‘seahub.draft’])

[2019-09-24 14:58:56,119] [INFO] Starting background tasks.

[2019-09-24 14:58:56,120] [INFO] Start file updates sender, interval = 60 sec

[2019-09-24 14:58:56,120] [INFO] work weixin notice sender is disabled

[2019-09-24 14:58:56,120] [INFO] search indexer is started, interval = 600 sec

[2019-09-24 14:58:56,120] [INFO] seahub email sender is started, interval = 1800 sec

[2019-09-24 14:58:56,120] [INFO] ldap sync is disabled

[2019-09-24 14:58:56,120] [INFO] virus scan is disabled

[2019-09-24 14:58:56,121] [INFO] data statistics is disabled

[2019-09-24 14:58:56,121] [INFO] content scan is disabled

[2019-09-24 14:58:59,761] [INFO] unoconv process already start.

[2019-09-24 14:58:59,764] [INFO] office converter started

[2019-09-24 14:58:59,765] [INFO] User login statistics is disabled.

[2019-09-24 14:58:59,765] [INFO] Traffic statistics is disabled.

[2019-09-24 15:08:56,121] [INFO] starts to index files

[2019-09-24 15:18:56,148] [INFO] starts to index files

[2019-09-24 15:28:56,189] [INFO] starts to send email

[2019-09-24 15:28:56,214] [INFO] starts to index files


#2

另外,我把libreoffice的守service设置如下,我怀疑是不是参数有错,请高手指点,感激不尽!!
/usr/lib/systemd/system/libreoffice.service

[Unit]

Description=LibreOffice service

After=syslog.target

[Service]

ExecStart=/opt/libreoffice6.3/program/soffice --headless --nofirststartwizard --nologo --norestore --nodefault --invisible “–accept=socket,host=0,port=2002;urp;StarOffice.ComponentContext” &

Restart=always

KillSignal=SIGQUIT

Type=simple

StandardError=syslog

NotifyAccess=all

User=root

[Install]

WantedBy=multi-user.target

~


#3

最新情况,现在是:
image

seafevents.log:

[2019-09-24 17:33:29,458] [WARNING] failed to convert <type: docx, id: 89ef738f095def7503f3c370ec84bd4d92df3430> to pdf

[2019-09-24 17:36:28,031] [INFO] [seafevents] database: mysql, name: seahub_db

[2019-09-24 17:36:28,235] [INFO] audit is enabled

[2019-09-24 17:36:28,246] [INFO] [seafevents] database: mysql, name: seahub_db

[2019-09-24 17:36:28,248] [INFO] [seafevents] database: mysql, name: seafile_db

[2019-09-24 17:36:28,651] [INFO] The file with the following suffix will be recorded into the file history: md,txt,doc,docx,xls,xlsx,ppt,pptx

[2019-09-24 17:36:28,652] [INFO] [seafevents] database: mysql, name: seahub_db

[2019-09-24 17:36:28,654] [INFO] Events publish to redis is disabled.

[2019-09-24 17:36:28,656] [INFO] LDAP section is not set, disable ldap sync.

[2019-09-24 17:36:28,657] [INFO] [virus_scan] scan_command option is not found in /opt/seafile/conf/seafile.conf, disable virus scan.

[2019-09-24 17:36:28,660] [INFO] try to connect to ccnet-server…

[2019-09-24 17:36:28,660] [INFO] connected to ccnet server

[2019-09-24 17:36:28,663] [INFO] listen to mq: set([‘seahub.audit’, ‘seaf_server.event’, ‘seaf_server.stats’, ‘seahub.stats’, ‘seahub.draft’])

[2019-09-24 17:36:28,663] [INFO] Starting background tasks.

[2019-09-24 17:36:28,664] [INFO] Start file updates sender, interval = 60 sec

[2019-09-24 17:36:28,664] [INFO] work weixin notice sender is disabled

[2019-09-24 17:36:28,664] [INFO] search indexer is started, interval = 600 sec

[2019-09-24 17:36:28,664] [INFO] seahub email sender is started, interval = 1800 sec

[2019-09-24 17:36:28,664] [INFO] ldap sync is disabled

[2019-09-24 17:36:28,664] [INFO] virus scan is disabled

[2019-09-24 17:36:28,665] [INFO] data statistics is disabled

[2019-09-24 17:36:28,665] [INFO] content scan is disabled

[2019-09-24 17:36:32,193] [WARNING] Failed to running unoconv process.

[2019-09-24 17:36:32,194] [INFO] office converter started

[2019-09-24 17:36:32,194] [INFO] User login statistics is disabled.

[2019-09-24 17:36:32,195] [INFO] Traffic statistics is disabled.

[2019-09-24 17:37:08,628] [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=18069) 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=18069)

[2019-09-24 17:37:08,628] [WARNING] failed to convert <type: docx, id: 89ef738f095def7503f3c370ec84bd4d92df3430> to pdf

[2019-09-24 17:39:05,433] [WARNING] error when invoking libreoffice: Verbosity set to level 3

DEBUG: Connection type: socket,host=127.0.0.1,port=2002;urp;StarOffice.ComponentContext

Input file: /tmp/tmpaPfBul.docx

unoconv: RuntimeException during import phase:

Office probably died. Binary URP bridge disposed during call

Using office base path: /usr/lib64/libreoffice

Using office binary path: /usr/lib64/libreoffice/program

[2019-09-24 17:39:05,434] [WARNING] failed to convert <type: docx, id: 89ef738f095def7503f3c370ec84bd4d92df3430> to pdf


#4

我尝试着在seafile这个非root账户下运行libreoffice,但提示

-bash-4.2$ javaldx failed!

Warning: failed to read path from javaldx

LibreOffice 6.3 - Fatal Error: The application cannot be started.

User installation could not be completed.

除非使用sudo命令,这是什么意思?


#5

-bash-4.2$ libreoffice

Failed to open display

[Java framework] Error in function createSettingsDocument (elements.cxx).

javaldx failed!

Warning: failed to read path from javaldx


#6

你这里的请求地址明显有错吧,不应该是127的地址吧,设置下正确的 server url


#7

在哪里设置Server url呢?


#8

[2019-09-24 18:48:56,240] [WARNING] failed to convert <type: docx, id: b5d347f27e16bb62a49be769d81c301dc9448e40> to pdf

[2019-09-24 18:54:11,451] [WARNING] error when invoking libreoffice: Verbosity set to level 3

DEBUG: Connection type: socket,host=127.0.0.1,port=2002;urp;StarOffice.ComponentContext

Input file: /tmp/tmpbMgoXQ.docx

unoconv: RuntimeException during import phase:

Office probably died. Binary URP bridge disposed during call

Using office base path: /usr/lib64/libreoffice

Using office binary path: /usr/lib64/libreoffice/program

[2019-09-24 18:54:11,451] [WARNING] failed to convert <type: docx, id: b5d347f27e16bb62a49be769d81c301dc9448e40> to pdf

[2019-09-24 18:55:16,325] [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.

Input file: /tmp/tmpEsffbf.docx

unoconv: RuntimeException during import phase:

Office probably died. Unsupported URL <file:///tmp/tmpEsffbf.docx>: “type detection failed”

DEBUG: Terminating LibreOffice instance.

DEBUG: Waiting for LibreOffice instance to exit.

Using office base path: /usr/lib64/libreoffice

Using office binary path: /usr/lib64/libreoffice/program

LibreOffice listener successfully started. (pid=7916)

[2019-09-24 18:55:16,326] [WARNING] failed to convert <type: docx, id: b5d347f27e16bb62a49be769d81c301dc9448e40> to pdf

[2019-09-24 18:55:54,335] [WARNING] error when invoking libreoffice: Verbosity set to level 3

DEBUG: Connection type: socket,host=127.0.0.1,port=2002;urp;StarOffice.ComponentContext

Input file: /tmp/tmpXrp53y.docx

unoconv: RuntimeException during import phase:

Office probably died. Binary URP bridge disposed during call

Using office base path: /usr/lib64/libreoffice

Using office binary path: /usr/lib64/libreoffice/program

[2019-09-24 18:55:54,335] [WARNING] failed to convert <type: docx, id: b5d347f27e16bb62a49be769d81c301dc9448e40> to pdf


#9

这个unoconv需要单独安装吗?我觉得看这个log,libreoffice能够正常使用,但是无法转化是因为调用unoconv不成功吗?


#10

进入到系统管理设置界面,把两个 url设置成你访问seafile服务时用到的地址和端口