cancel
Showing results for 
Search instead for 
Did you mean: 

libreoffice extension not working

mkpelletier
Champ in-the-making
Champ in-the-making
I have scoured the forums and the internet looking for a solution to this, but have found none.  I am running the latest Alfresco 5.0b, on Debian Wheezy.  Interestingly, out of the "box" the script to start libreoffice is specified incorrectly in alfresco.sh: LIBREOFFICE_SCRIPT=$INSTALLDIR/libreoffice/scripts/ctl.sh

As was noted in this thread: https://forums.alfresco.com/forum/installation-upgrades-configuration-integration/configuration/docu..., the script is actually called libreoffice_ctl.sh.  The user needs to rename the script for things to function properly.  It is a bit troubling that this problem is still present in 5.0.  Anyway, now I can verify that Libreoffice actually starts with alfresco.

However, the misnamed script is only half the problem.  Now I am getting the following:

12:39:45,019 ERROR [org.springframework.extensions.webscripts.AbstractRuntime] [http-bio-8443-exec-2] Exception from executeScript - redirecting to status template error: connection failed: socket,host=localhost,port=8100,tcpNoDelay=1; com.sun.star.lang.IllegalArgumentException
net.sf.jooreports.openoffice.connection.OpenOfficeException: connection failed: socket,host=localhost,port=8100,tcpNoDelay=1; com.sun.star.lang.IllegalArgumentException
   at net.sf.jooreports.openoffice.connection.AbstractOpenOfficeConnection.connect(AbstractOpenOfficeConnection.java:77)
   at org.alfresco.util.OpenOfficeConnectionTester.testAndConnect(OpenOfficeConnectionTester.java:183)
   at org.alfresco.util.OpenOfficeConnectionTester.checkConnection(OpenOfficeConnectionTester.java:129)
   at org.alfresco.util.OpenOfficeConnectionTester.onBootstrap(OpenOfficeConnectionTester.java:101)
   at org.springframework.extensions.surf.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:56)
   at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:96)
   at org.alfresco.repo.management.subsystems.ChildApplicationContextFactory$ChildApplicationContext.publishEvent(ChildApplicationContextFactory.java:554)
   at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:948)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
   at org.alfresco.repo.management.subsystems.ChildApplicationContextFactory$ApplicationContextState.start(ChildApplicationContextFactory.java:809)
   at org.alfresco.repo.management.subsystems.AbstractPropertyBackedBean.start(AbstractPropertyBackedBean.java:991)
   at org.alfresco.repo.management.subsystems.AbstractPropertyBackedBean.onApplicationEvent(AbstractPropertyBackedBean.java:530)
   at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEventInternal(SafeApplicationEventMulticaster.java:209)
   at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:180)
   at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)
   at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:948)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
   at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
   at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:63)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)
   at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)
   at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
   at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1073)
   at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857)
   at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
   at java.util.concurrent.FutureTask.run(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)


Does anyone have a clue on how to fix this?  I have even tried looking into the possibility of disabling ipv6, but that does not seem to fix the issue.

Thanks in advance for the help!

EDIT: It looks as though this happens with MySQL, but not the default postgresql. Any ideas?
6 REPLIES 6

go4alfresco
Champ in-the-making
Champ in-the-making
I'm having the same problem on debian with alfresco 5.0.b and standard installation with postgresql.

Checked that libreoffice is up an running
/opt/alfresco-5.0.b$ sudo ./libreoffice/scripts/libreoffice_ctl.sh status
libreoffice already running

but when trying to get preview or upload new document alfreco logs
Caused by: net.sf.jooreports.openoffice.connection.OpenOfficeException: connection failed: socket,host=localhost,port=8100,tcpNoDelay=1; com.sun.star.lang.IllegalArgumentException
        at net.sf.jooreports.openoffice.connection.AbstractOpenOfficeConnection.connect(AbstractOpenOfficeConnection.java:77)

I checked required libraries already but everything seems to be OK on libreoffice side.

Does anybody have an idea?

/M

mkpelletier
Champ in-the-making
Champ in-the-making
I figured this one out, but forgot to repost the solution.  There is a problem in the way the script specifies the parameters passed to the binary.  This portion of the command needs to be passed WITH the double quotes: "–accept=socket,host=127.0.0.1,port=8100,tcpNoDelay=1;urp;".   The result should look like this:

{alfresco home}/libreoffice/program/soffice.bin –headless –nologo –nofirststartwizard –nodefault –norestore "–accept=socket,host=127.0.0.1,port=8100,tcpNoDelay=1;urp;"


You can confirm the above by killing the libreoffice process: {alrescohome}/libreoffice/scripts/ctl.sh –stop
Then restart the process using the above.

I hope that helps!

Hi,
I've got the same problem in my alfresco install.
Can you paste the line from libreoffice\cripts\ctl.sh ?

in the original script there are 2 backslashes <cite>SOFFICE="$SOFFICEWRAPPER –nofirststartwizard –nologo –headless –accept=socket,host=localhost,port=$SOFFICE_PORT\;urp\;StarOffice.ServiceManager"</cite>, are they removed ?

Thanks

The escape character is not needed when the command includes the quotes.  I believe this problem is fixed in 5.0c.  In any case, I had trouble getting the command options specified in the variable to pass to the command, due to the way /bin/sh parses single and double quotes.  There is probably a better way to do this, but I finally just put the command options in line 58 of /$ALFRESCO_HOME/libreoffice/scripts/ctl.sh directly rather than using the variable:

$SOFFICEWRAPPER –headless –nologo –nofirststartwizard –nodefault –norestore "–accept=socket,host=127.0.0.1,port=8100,tcpNoDelay=1;urp;"& >/dev/null 2>&1

I hope that helps!

gasp72
Champ in-the-making
Champ in-the-making
Hi,
This configuration file works for my setup.
I have created a symoblic link with
ln -s /array/alfresco/libreoffice/scripts/libreoffice_ctl.sh /array/alfresco/libreoffice/scripts/ctl.sh

And modified the configuration file with

# Libre Office
SOFFICE_PATH="/array/alfresco/libreoffice/program"
SOFFICE_PORT="8100"
SOFFICEBIN=/array/alfresco/libreoffice/program/.soffice.bin
SOFFICEWRAPPER=/array/alfresco/libreoffice/program/soffice.bin
SOFFICE="$SOFFICEWRAPPER –nofirststartwizard –nologo –headless "–accept=socket,host=localhost,port=$SOFFICE_PORT\;urp\;StarOffice.ServiceManager""
SOFFICE_STATUS=""

me678
Champ in-the-making
Champ in-the-making
Thanks for the reply! THis worked perfectly for me with your method. I am running Alfresco Community 5.0.d.