• Preview with LibreOffice 3.4.4 and Ubuntu 12.04

  • Problems with installing OpenKM? No problemo, the solution is closer than you think.
Problems with installing OpenKM? No problemo, the solution is closer than you think.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #16906  by sdhengsoft
 
Hi All ... first post for me.

Just wanted to let you all know that I managed to get OpemKM 5.1.9 working on Unubtu 12.04 using LibreOffice 3.4.4 as the previewer. However, it did not work straight out of the box for me. I set the properties:
system.openoffice.path=/usr/lib/libreoffice
system.openoffice.port=8100
But the previewer did not seem to work. Just got the message to see your OpenKM administrator. The logs were saying the OfficeManager service had stopped. While restarting the OpenKM server I monitored the system to see if the soffice.bin program was being launched ... and yes it was, but it soon terminated. OpenKM was launching soffice.bin in the following way:
/usr/lib/libreoffice/program/soffice.bin \
-accept="socket,host=127.0.0.1,port=8100;urp; -env:UserInstallation=file:///tmp/.jodconverter_socket_host-127.0.0.1_port-8100" \
-headless -nocrashreport -nodefault -nofirststartwizard -nolockcheck -nologo -norestore
Note that with LibreOffice the command switches now need "--". That is "-accept" is now "--accept". I ran this by hand and used jodconverter-2.2.2 to see if it was working ... all seemed okay. I then restarted OpenKM and it seemed to identify that the soffice.bin server was running and started using it. However, the preview document never appears. The screen is just grey with not document. I then reverted the command back to an earlier form posted on this forum and used:
/usr/lib/libreoffice/program/soffice.bin --nologo --headless --nofirststartwizard \
--accept="socket,host=localhost,port=8100;urp;StarOffice.Service"
This seems to work for me. Document previews are working correctly. I'm not sure if I'm missing any new features by not using the newer command, but for the moment all seems good. I know start OpenKM using this init script:
Code: Select all
#!/bin/sh
#
### BEGIN INIT INFO
# Provides:       OpenKM
# Required-Start: 
# Should-Start:   
# Required-Stop:
# Default-Start:  2 3 4 5
# Default-Stop:   0 1 6
# Description:    OpenKM (Document Management System)
### END INIT INFO

ECHO=/bin/echo
TEST=/usr/bin/test
SOFFICE=/usr/lib/libreoffice/program/soffice.bin
JBOSS_PATH=/usr/local/OpenKM
JBOSS_START_SCRIPT=${JBOSS_PATH}/bin/run.sh
JBOSS_STOP_SCRIPT=${JBOSS_PATH}/bin/shutdown.sh
OKM_USER=www-data

$TEST -x $JBOSS_START_SCRIPT || exit 0
$TEST -x $JBOSS_STOP_SCRIPT || exit 0

start() (
   $ECHO "Starting JBoss OpenKM."
   rm -rf ${JBOSS_PATH}/server/default/tmp
   rm -rf ${JBOSS_PATH}/server/default/work
   rm -rf ${JBOSS_PATH}/server/default/log
   su -c "${SOFFICE} --nologo --headless --nofirststartwizard \
      --accept=\"socket,host=localhost,port=8100;urp;StarOffice.Service\" &" $OKM_USER
   su -l -c "$JBOSS_START_SCRIPT -b 0.0.0.0 > /dev/null 2> /dev/null &" $OKM_USER
   $ECHO "Done."
   )

stop () (
   $ECHO "Stopping JBoss OpenKM. "
   su -l -c "$JBOSS_STOP_SCRIPT -S > /dev/null &" $OKM_USER
   sleep 10
   $ECHO "Done."
   )

case "$1" in
      start )
            start
            ;;
      stop )
            stop
            ;;
      restart )
            stop
            sleep 30
            start
            ;;
      * )
            $ECHO "Usage: jbossokm {start|stop|restart}"
            exit 1
esac

exit 0
 #16929  by jllort
 
If you get soffice running has no importance if it's by OpenKM starting process or by hand. For what you said there're some parameters changed depending openoffice version ( we take note about it). I do not know if libreoffice will present the same problem or not, you can try with it too.
 #16945  by sdhengsoft
 
If you get soffice running has no importance if it's by OpenKM starting process or by hand. For what you said there're some parameters changed depending openoffice version ( we take note about it). I do not know if libreoffice will present the same problem or not, you can try with it too.
Did you mean try with OpenOffice too? I'm currently using LibreOffice. I can install OpenOffice as well and try that too.
 #16970  by jllort
 
Basically should be the same. If OpenKM do not start automatically the service should investigate what's error is in server.log at starting OpenKM.
 #18498  by waltz
 
Hello,
i have similar problem; OpenKM starts Libreoffice but proces died after couple seconds. Preview not working. In logs;
Code: Select all
2012-09-21 12:03:11,374 INFO  [org.artofsolving.jodconverter.office.ProcessPoolOfficeManager] ProcessManager implementation is UnixProcessManager
2012-09-21 12:03:11,439 INFO  [org.artofsolving.jodconverter.office.OfficeProcess] starting process with acceptString 'socket,host=127.0.0.1,port=8100,tcpNoDelay=1' and profileDir '/tmp/.jodconverter_socket_host-127.0.0.1_port-8100'
2012-09-21 12:03:11,509 INFO  [org.artofsolving.jodconverter.office.OfficeProcess] started process; pid = 4675
org.artofsolving.jodconverter.office.OfficeException: failed to start and connect
        at org.artofsolving.jodconverter.office.ManagedOfficeProcess.startAndWait(ManagedOfficeProcess.java:61)
        at org.artofsolving.jodconverter.office.PooledOfficeManager.start(PooledOfficeManager.java:102)
        at org.artofsolving.jodconverter.office.ProcessPoolOfficeManager.start(ProcessPoolOfficeManager.java:59)
Caused by: java.util.concurrent.ExecutionException: org.artofsolving.jodconverter.office.OfficeException: could not establish connection
        at org.artofsolving.jodconverter.office.ManagedOfficeProcess.startAndWait(ManagedOfficeProcess.java:59)
Caused by: org.artofsolving.jodconverter.office.OfficeException: could not establish connection
        at org.artofsolving.jodconverter.office.ManagedOfficeProcess.doStartProcessAndConnect(ManagedOfficeProcess.java:123)
        at org.artofsolving.jodconverter.office.ManagedOfficeProcess.access$000(ManagedOfficeProcess.java:31)
        at org.artofsolving.jodconverter.office.ManagedOfficeProcess$1.run(ManagedOfficeProcess.java:55)
Caused by: org.artofsolving.jodconverter.office.RetryTimeoutException: java.net.ConnectException: connection failed: 'socket,host=127.0.0.1,port=8100,tcpNoDelay=1'; java.net.ConnectException: Connection refused
        at org.artofsolving.jodconverter.office.Retryable.execute(Retryable.java:48)
        at org.artofsolving.jodconverter.office.Retryable.execute(Retryable.java:31)
        at org.artofsolving.jodconverter.office.ManagedOfficeProcess.doStartProcessAndConnect(ManagedOfficeProcess.java:113)
        at org.artofsolving.jodconverter.office.OfficeConnection.connect(OfficeConnection.java:101)
        at org.artofsolving.jodconverter.office.ManagedOfficeProcess$6.attempt(ManagedOfficeProcess.java:116)
        at org.artofsolving.jodconverter.office.Retryable.execute(Retryable.java:41)
I supouse that problem could be similar that sdhengsoft have - change made in LibreOffice switches (now need "--" before) - but I can't find where they are in OpenKM files. Can you show me where I can change it ?

When I start LibreOfiice by hand OpenKM can't connect to it also.
 #18511  by jllort
 
Is not the same problem, the error really indicates is not starting 2012-09-21 12:03:11,509 INFO [org.artofsolving.jodconverter.office.OfficeProcess] started process; pid = 4675
org.artofsolving.jodconverter.office.OfficeException: failed to start and connect

Have you take a look here http://wiki.openkm.com/index.php/Previsualization ?
 #18514  by waltz
 
Offcourse. Check config shows that configuration (path to LibreOffice) is ok. But either preview and downloading document as pdf don't work.

Process was started but disapear - so I think it could be problem with switches ("--" is needed by LibreOffice).
 #18517  by jllort
 
Starting libreoffice is hardcoded can not be changed by hand. Download latest openkm version from our repository integration.openkm.com ( night build )

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.