cancel
Showing results for 
Search instead for 
Did you mean: 

[Solved] Erratic crashes of soffice-process

mfischer
Champ in-the-making
Champ in-the-making
On our Ubuntu installation the OpenOffice.org-process "soffice" crashes uneven, i can't see any errors in the logs and crashreports are disabled by parameter.

Does anyone have an idea how to find the cause of these crashes, it doesn't seem to depend on any specific documents. After a crash there is no more preview available until a restart of Tomcat or a manual start of soffice.

As a first help i've written a bash script which checks the existance of a active process of this soffice-executable and starts it if there no process can be found. For now, this works, but i think this could not be a final solution  :?

The system runs an Ubuntu Server 8.04 i386 with Alfresco CE 3.2r and OpenOffice.org 2.4 (package version 2.4.0-3ubuntu6), installed by the Jaunty Partner Package.

Any help would be appreciated…

Regards,
Mario
2 REPLIES 2

mfischer
Champ in-the-making
Champ in-the-making
Update:

Now i know, which files causing the OOo process crashing - there are some Excel files which containing macros, they are created with Excel 2007. Alfresco can't create thumbnails nor showing a preview.

And the error still persists in CE 3.2r2.

Regards,
Mario

Update2:

After downloading and resaving it with a Excel 2003 as "MS Excel 97-2003 & 5.0/95 Worksheet" i got an error from Excel:

          "This file format can't be saved while the VBA-project is protected…"

It seems the developer which created this file (and all the other problematic files  :roll: ) protected the VBA parts separately, and OpenOffice can't handle this. When i open the file locally with OpenOffice 3.1, there is no error message, but the macros aren't available. So at the moment it seems OpenOffice 3 ignores the protected macros, but OOo 2.4 can't handle this, it crashes.

Now i'm going to try to upgrade the server to OOo 3.1, hopefully it won't crash anymore in the future…

mfischer
Champ in-the-making
Champ in-the-making
Changing to OOo 3.1 solves this issue. The partially pretected files are read completely, thumbnail and preview are created as they should be.

To update on Ubuntu 8.04 download from openoffice.org the newest DEB version (atm it is 3.1), unpack it and install the packages with "dpkg -i -R <path to unpacked deb's>/*"

For those who are running into the same problem but can't/won't update, this little bashscript may help. Start it in background with "./check_soffice.sh -a &" for running constantly. It will check if the process is still running and restart it if necessary. Log entries are thrown to /var/log/messages.

Don't forget to change soffice- and alfresco-path (and maybe the tomcat-user for "su") to your needs.


#!/bin/bash
if [ "$1" = "-h" ] ; then
  echo "syntax: $0 [-a]"
  echo "  script checks if OpenOffice.org process is still running and throws a"
  echo "  message when OOo has been terminated, then it exits."
  echo "  -a      : script will run in background and restart OOo process if it"
  echo "            has been terminated. script has to be killed manually."
  echo "  -h      : shows this little help."
  exit 1
fi

function CHECK(){
  COUNT=0
  while [ $COUNT = 0 ] ; do
    if [ ! "`ps aux | grep soffice | grep -v grep | grep -v $0`" = "" ] ; then
#      echo " soffice-process alive…"
      sleep 5
    else
      if [ "$1" = "-a" ] ; then
        echo "`date +%b` `date +%d` `date +%X` `uname -n` – soffice-process died, restarting it…" >> /var/log/messages
        # the following has to be on one line! Change pathes and user to your needs.
        su -m 'tomcat6' -c '/usr/lib/openoffice/program/soffice.bin -accept="socket,host=localhost,port=8100;urp;StarOffice.ServiceManager" -env:UserInstallation="file:///var/lib/alfresco/oouser" -nologo -headless -nofirststartwizard -nocrashrep -norestore -splash-pipe=5'
        # next line *g*
        sleep 5
      else
        echo " soffice-process died."
        echo " `date +%X`"
        COUNT=1
        exit 1
      fi
    fi
  done
}
CHECK $1