Configuring preview with LibreOffice

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>
1 votes

2 answers

9812 views

ANSWER



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

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

0 votes



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).

0 votes



hello,

I have exactly the same issue as Patrice. I checked if I had nuxeo-platform-convert-5.6.jar and jodconverter-core-3.0-NX3.2.jar : everything is ok

There is something strange in my logfile, here is what appear :

2013-01-29 15:57:31,327 WARN [org.artofsolving.jodconverter.office.OfficeProcess] Restarting OOo after code 81 …

[…]

2013-01-29 15:58:08,844 WARN [org.nuxeo.ecm.platform.convert.ooomanager.OOoManagerComponent] OpenOffice was not found, JOD Converter won't be available: a process with acceptString 'socket,host=127.0.0.1,port=2003' is already running; pid 18935

==> it seems to restart openoffice process, and then it says that a process is already running. Indeed:

[root@zed337d6 bin]# netstat -nap | grep 2003 tcp 0 0 127.0.0.1:2003 0.0.0.0:* LISTEN 18935/soffice.bin tcp 0 0 127.0.0.1:2003 127.0.0.1:12579 ESTABLISHED 18935/soffice.bin tcp 0 0 127.0.0.1:12579 127.0.0.1:2003 ESTABLISHED 18780/java

Do you have any idea ? Patrice, did you manage to solve your issue ?

Thank you

01/29/2013

here is the error in the log :

2013-01-29 15:59:26,379 ERROR [org.nuxeo.ecm.diff.content.restlet.ContentDiffRestlet] Could not build content diff for missing blob at file:content

org.nuxeo.ecm.core.convert.api.ConverterNotAvailable: Converter office2html is not available

01/29/2013

try to change WARN to DEBUG in log4j.xml:

&lt;category name=&quot;org.artofsolving.jodconverter&quot; additivity=&quot;true&quot;&gt;
    &lt;priority value=&quot;DEBUG&quot; /&gt;
&lt;/category&gt;

and add also:

&lt;category name=&quot;org.nuxeo.ecm.platform.convert&quot; additivity=&quot;true&quot;&gt;
    &lt;priority value=&quot;DEBUG&quot; /&gt;
&lt;/category&gt;

then stop nuxeo, kill OOo and start again nuxeo server.

01/29/2013

Here is what I get : http://www.2shared.com/file/FKW0xuqf/server.html

  1. It starts properly LibreOffice :

2013-01-30 11:24:29,542 INFO [org.artofsolving.jodconverter.office.OfficeVersionDescriptor] soffice info: Product: LibreOffice - Version: 3.6 - useGnuStyleLongOptions: true

2013-01-30 11:24:29,589 INFO [org.artofsolving.jodconverter.office.OfficeProcess] starting process with acceptString 'socket,host=127.0.0.1,port=2004,tcpNoDelay=1' and profileDir '/appli/projects/sge-ged/nuxeo-cap-5.6-tomcat/tmp/.jodconverter_socket_host-127.0.0.1_port-2004_38'

2013-01-30 11:24:30,544 WARN [org.artofsolving.jodconverter.office.OfficeProcess] Restarting OOo after code 81 …

2013-01-30 11:24:32,257 INFO [org.artofsolving.jodconverter.office.OfficeProcess] started process : pid = 21273

2013-01-30 11:24:33,883 INFO [org.artofsolving.jodconverter.office.OfficeConnection] connected: 'socket,host=127.0.0.1,port=2004,tcpNoDelay=1'

but 2. it says

2013-01-30 11:25:10,934 INFO [org.artofsolving.jodconverter.office.OfficeVersionDescriptor] soffice info: Product: LibreOffice - Version: 3.6 - useGnuStyleLongOptions: true

2013-01-30 11:25:11,030 WARN [org.nuxeo.ecm.platform.convert.ooomanager.OOoManagerComponent] OpenOffice was not found, JOD Converter won't be available: a process with acceptString 'socket,host=127.0.0.1,port=2004' is already running; pid 21273

That the process that it launched… is already running ! Strange, isn't it ?

01/30/2013

Unusual is that there have been two starts of nuxeo:

1. 2013-01-30 11:24:29,622
2. 2013-01-30 11:25:12,075

and the first one started LibreOffice service. Then the second one couldn't.

01/30/2013

yes, exactly… any idea of where it could come from ?
01/30/2013

ok, I solved it… reinstalling Nuxeo from scratch ;) Thanks for your help, have a nice day
01/30/2013