JVM errors when trying to run Openfire in Ubuntu Feisty (7.04)

Hmm, that’'s intriguing: executing

/usr/lib/jvm/java-6-sun-1.6.0.00/jre/bin/java -server -jar /opt/openfire/lib/startup.jar

in the /opt/openfire/lib directory, as superuser jive works to get the server running, and I can log into the administration console at http://localhost:9090. Now, how would I go about setting it up so that it starts automatically on boot? The arrangement that I had before was a shell script in /etc/init.d with the /usr/lib/jvm/java-6-sun-1.6.0.00/jre/bin/java -server -jar /opt/openfire/lib/startup.jar command in it, but how would one (1) set it to run as jive on boot, and (2) take account of the fact that, for some odd reason, it will only start from the command line when it is already in a particular directory?

Hi,

place

cd /opt/openfire/logs

nohup /usr/lib/jvm/java-6-sun-1.6.0.00/jre/bin/java -jar …/lib/startup.jar >…/logs/STDOUT.log 2>…/logs/STDERR.log &

in /opt/openfire/startscript.sh and make sure that all files in /opt/openfire are owned by jive and not by root. Otherwise Openfire will not start.

In /etc/init.d you can use a short start script which does a

su - jive -c “/opt/openfire/startscript.sh”

LG

su jive -c ''/usr/lib/jvm/java-6-sun-1.6.0.00/jre/bin/java -DopenfireHome=/opt/openfire -Dopenfire.lib.dir=/opt/openfire/lib -jar /opt/openfire/lib/startup.jar''

Thank you very much, srt: that command worked for me - placing that in my /etc/init.d/openfire.sh script starts openfire automatically on boot

For some reason, the other command didn’‘t work. I don’'t know why. Perhaps somebody on the Openfire development team needs to look into making a startup script that works better in Ubuntu?

Anyway, thank you all very much for your help