AnsweredAssumed Answered

OpenOffice connection lost periodically

Question asked by nadaoneal on Apr 1, 2011
Latest reply on Apr 20, 2011 by ekimnosneb
Does anyone else find that periodically, the OpenOffice connection is lost?

16:39:00,009 ERROR [org.alfresco.util.OpenOfficeConnectionTester] The OpenOffice connection has been lost.

I have changed tomcat/shared/classes/alfresco-global.properties to include ooo.enabled=true, and the ooo.exe path there is correct, but still I find that randomly, OpenOffice will just stop running, and while Alfresco notices this, it doesn't do anything about it. And then everyone's document uploads fail to produce thumbnails.

As a kludgy fix, I'm using a once-every-five-minutes cron job (*/5 * * * * /path/to/cronjob), which I'll share below in case it's useful to anyone, but does anyone have a more elegant solution?

I'm running 3.4.d on CentOS 5.5, x64, with the bundled OpenOffice.

#!/bin/sh

running=`ps aux | grep "/opt/alfresco-3.4.d/openoffice/program/soffice.bi[n]" | wc -l`

if [ $running != 0 ];
then
/usr/bin/logger  "OpenOffice running at $(date +'%F %H:%M')"
else
/usr/bin/logger  "OpenOffice restarted at $(date +'%F %H:%M')"
/opt/alfresco-3.4.d/openoffice/scripts/openoffice_ctl.sh
fi

(Obviously, change /opt/alfresco-3.4.d to the correct path for your system. The [n] prevents the grep statement from matching itself. )

Thanks!

Outcomes