powered by Jive Software

Debian packaging fix for Openfire 3.8.0

Openfire 3.8.0 finally allows the package to depend on OpenJDK however the init.d script has not been updated to reflect this change.

The following resolves the issue and the server starts successfully.

+++ /etc/init.d/openfire 2013-02-11 15:57:57.051887681 +1100

@@ -25,6 +25,8 @@

then

t=/usr/lib/jvm/java-1.5.0-sun && test -d $t && JAVA_HOME=$t

t=/usr/lib/jvm/java-6-sun && test -d $t && JAVA_HOME=$t

  • t=/usr/lib/jvm/default-java && test -d $t && JAVA_HOME=$t

fi

PATH=/sbin:/bin:/usr/sbin:/usr/bin:${JAVA_HOME}/bin

Thank you for taking the time to make this suggestion. It has now been added to our issue tracker as OF-614.

In my case this line doesn’t work for me

  • t=/usr/lib/jvm/default-java && test -d $t && JAVA_HOME=$t

I have to specify the full name of the java version installed:

  • t=/usr/lib/jvm/java-7-openjdk-amd64 && test -d $t && JAVA_HOME=$t

Then it starts without problems.

Thank you very much for the info.

A fix will be included in the next release. If you do not wish to wait for a release, then you could resort to any nightly build, starting with the one that was generated on February 17th, 2013.

I can confirm this is fixed with the 3.8.1 release.

1 Like

Well, once again, it seems that is not working with Openfire 3.8.1 release too.

The problem is when you use openjdk 64 bits architecture.

After the instalation of openfire, I check the /etc/init.d/openfire script and it includes only this entries:

t=/usr/lib/jvm/java-1.5.0-sun && test -d $t && JAVA_HOME=$t

t=/usr/lib/jvm/java-6-sun && test -d $t && JAVA_HOME=$t

I guess that the install process doesn’t detect my current java installation (in this case openjdk-amd64)

So I have to edit the script, and include the line:

t=/usr/lib/jvm/java-7-openjdk-amd64 && test -d $t && JAVA_HOME=$t

And finally openfire starts without problems

hahahaha! forget it, it’s fixed in the latest version, i don’w know what happened, but now I made a clean installation, and it works, this is the script that appears (what I expected):

Attempt to locate JAVA_HOME

if [ -z $JAVA_HOME ]; then
JAVA_HOMES="/usr/lib/jvm/default-java
/usr/lib/jvm/java-7-sun
/usr/lib/jvm/java-6-sun
/usr/lib/jvm/java-1.5.0-sun
/usr/lib/jvm/java-7-openjdk-amd64
/usr/lib/jvm/java-7-openjdk
/usr/lib/jvm/java-6-openjdk-amd64
/usr/lib/jvm/java-6-openjdk"
for t in $JAVA_HOMES ; do
if [ -d $t ] ; then
JAVA_HOME=$t
break;
fi
done
fi

The problem was that I’am recycling an old server and updating a previous version of openfire.

Now is working fine.

Apologies for the misunderstanding

The problem was that I’am recycling an old server and updating a previous version of openfire.
Hmm it may be a good idea if the debian installer/update script would replace and update the old init.d file.