I've got things working, up to a point.

My openoffice daemon (/opt/openoffice3/program/soffice) running as headless, starts fine with the script from here

All of the associated converters, which are called for openoffice via jodconverter, show as installed and active in the settings.

I upload a MSword file and it is converted to various file formats.

Great!

But, the next time I try I only get the original file format. Checking things, it appears that openoffice is dying after the first conversion. I can't seem to see why and I don't know if there is a log that would tell me (or where it would be located).

Can anyone help?

Comments

justin.hopkins’s picture

gmak,

Have you tried running it by hand?

java -jar /opt/jodconverter/lib/jodconverter-cli-2.2.1.jar -f pdf yourdocfile.doc 

As far as I know OO doesn't write a log anywhere, but the above command run from a terminal will give you some output - Success looks like this:

Dec 31, 2008 4:44:23 PM com.artofsolving.jodconverter.openoffice.connection.AbstractOpenOfficeConnection connect
INFO: connected
Dec 31, 2008 4:44:24 PM com.artofsolving.jodconverter.openoffice.connection.AbstractOpenOfficeConnection disposing
INFO: disconnected
gmak’s picture

calling it from the command line (as user www-data), as you have suggested above, responds exactly as expected:

Jan 1, 2009 7:28:03 PM com.artofsolving.jodconverter.openoffice.connection.AbstractOpenOfficeConnection connect
INFO: connected
Jan 1, 2009 7:28:10 PM com.artofsolving.jodconverter.openoffice.connection.AbstractOpenOfficeConnection disposing
INFO: disconnected

And, after this the daemon is still running.

This makes me think that there is something happening with the call from fileframework which is not working correctly. My init script looks like this:

#!/bin/bash
#
# description: Open Office Service
#

export WEBUSER=www-data
export PATH=$PATH
export LANG=en_US.UTF-8

start() {
echo -n "Starting OpenOffice service: "
sudo -u $WEBUSER /opt/openoffice.org3/program/soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp" -nofirststartwizard &
echo "OpenOffice Started"
}

stop() {
echo -n "Stopping soffice: "
pkill soffice
echo "OpenOffice Stopped"
}

case "$1" in
start)
start
;;
stop)
stop
;;
status)
status soffice
;;
restart|reload|condrestart)
stop
start
;;
*)
echo $"Usage: $0 {start|stop|restart|reload|status}"
exit 1
esac

exit 0

Which looks OK to me.

Any ideas?

Arto’s picture

Issue tags: +JODConverter
miglius’s picture

Status: Active » Postponed (maintainer needs more info)

If you want to mimic exactly what's going when the file conversion is spawn from the web by using a command line, you should su to the user running webserver and set the environment to be the same as the web server runs in. Look at the web server's start scripts to see which environment variables are set.

johanneshahn’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

feel free to reopen issue