cancel
Showing results for 
Search instead for 
Did you mean: 

Configuring preview with LibreOffice

apx25_
Champ on-the-rise
Champ on-the-rise

I'm having some trouble setting up the document preview and annotations tool with LibreOffice.

  • First, the LibreOffice daemon never starts with nuxeo (Nuxeo documentation says : "If OpenOffice/LibreOffice is already installed on your server, Nuxeo applications come with a daemon that should automatically start it.") I can't find any documentation on how to configure the ooo-manager-config.xml file.

  • Second, after starting the daemon "by hand", the preview function still does not work.

Thanks for your help,

Patrice

_

Here are more details :

Nuxeo starting :

$ service nuxeo restart
Redémarrage du serveur : Nuxeo version 5.6
Mot de passe :
Nuxeo home:          /home/nuxeo/nuxeo-cap-5.6-tomcat
Nuxeo configuration: /home/nuxeo/nuxeo_conf/nuxeo.conf
Include template: /home/nuxeo/nuxeo-cap-5.6-tomcat/templates/common-base
Include template: /home/nuxeo/nuxeo-cap-5.6-tomcat/templates/common
Include template: /home/nuxeo/nuxeo-cap-5.6-tomcat/templates/postgresql
Include template: /home/nuxeo/nuxeo-cap-5.6-tomcat/templates/dam
Include template: /home/nuxeo/nuxeo-cap-5.6-tomcat/templates/collaboration
Stopping server.....Server stopped.
Detected Tomcat server.
Configuration files generation (nuxeo.force.generation=true)...
Configuration files generated.
Server started with process ID 5579.
= Component Loading Status: Pending: 0 / Unstarted: 0 / Total: 654
Started in 1min19s
0

No Libreoffice daemon running :

$ ps -edf |grep office |grep -v grep
$ netstat -taupe |grep office
$

Not working preview after hand running office daemon :

$  /usr/lib64/libreoffice/program/soffice --headless --nologo --nofirststartwizard --accept="socket,host=localhost,port=2222;urp;StarOffice.Service"&
$ ps -edf |grep office |grep -v grep
nuxeo     5800  5359  0 10:48 pts/1    00:00:00 /usr/lib64/libreoffice/program/oosplash.bin --headless --nologo --nofirststartwizard --accept=socket,host=localhost,port=2222;urp;StarOffice.Service
nuxeo     5807  5800  4 10:48 pts/1    00:00:00 /usr/lib64/libreoffice/program/soffice.bin --headless --nologo --nofirststartwizard --accept=socket,host=localhost,port=2222;urp;StarOffice.Service
$

$ netstat -taupe |grep office
tcp      0     0 localhost:EtherNet/IP-1     *:*               LISTEN      nuxeo      75615      5807/soffice.bin
$

Error message when clicking on the preview icon :

Preview can not be generated for this document.
``Blob path: default.
org.nuxeo.ecm.platform.preview.api.PreviewException: Converter office2html is not available

Our Nuxeo config for Office :

jod.connection.protocol      SOCKET
jod.jpipe.lib.path	            <no value>
jod.max.tasks.per.process    200
jod.office.home	         /usr/lib64/libreoffice/program
jod.task.execution.timeout   120000
jod.task.queue.timeout       30000
jod.template.profile.dir        <no value>
9 REPLIES 9

adam_bo_
Star Contributor
Star Contributor

Nuxeo uses a JOD based converter, which uses the following code:

    try {
        officeManager = configuration.buildOfficeManager();
        officeManager.start();
        started = true;
        log.debug("Starting ooo manager.");
    } catch (Exception e) {
        Throwable t = unwrapException(e);
        log.warn("OpenOffice was not found, JOD Converter "
                + "won't be available: " + t.getMessage());
    }

It sets the started property to true, when there is no exception. The property is used later to check if OO is running. It means that the code above have to be done properly.

So, you should check:

  1. if you have nuxeo-platform-convert-5.6.jar bundle in nxserver/bundles subdirectory,
  2. if you have jodconverter-core-3.0-NX3.2.jar library in nxserver/lib subdirectory,
  3. logs in the server.log file. The JOD records a lot informations.

You can also set the DEBUG logging level in log4j.xml file (the change requires restart).

hello,

here is the error in the log

try to change WARN to DEBUG in log4j.xml

Here is what I get

Unusual is that there have been two starts of nuxeo

yes, exactly... any idea of where it could come from ?

ok, I solved it... reinstalling Nuxeo from scratch 😉

TNelson_
Champ on-the-rise
Champ on-the-rise

try to change jod.office.home /usr/lib64/libreoffice/program

to jod.office.home /usr/lib64/libreoffice