powered by Jive Software

Openfire 3.9.1_all.deb fails to install on fresh Ubuntu 12.04

A client install of openfire failed recently, so I was going to simply update to the new version on a fresh ubuntu 12.04 VM.

I’ve installed openjdk-6-jre (I thought openjdk-7-jre was supossed to be supported, but the installer fails out saying that I don’t have the proper version of java if 7 is installed):

hrcadmin@hrc-chat:~$ java -version

java version “1.6.0_30”

OpenJDK Runtime Environment (IcedTea6 1.13.1) (6b30-1.13.1-1ubuntu2~0.12.04.1)

OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode)

Here’s what I get from dpkg -i :

hrcadmin@hrc-chat:~$ sudo dpkg -i openfire_3.9.1_all.deb

Selecting previously unselected package openfire.

(Reading database … 108285 files and directories currently installed.)

Unpacking openfire (from openfire_3.9.1_all.deb) …

Setting up openfire (3.9.1) …

adduser: Warning: The home directory `/var/lib/openfire’ does not belong to the user you are currently creating.

invoke-rc.d: initscript openfire, action “start” failed.

dpkg: error processing openfire (–install):

subprocess installed post-installation script returned error exit status 1

Processing triggers for ureadahead …

Errors were encountered while processing:

openfire

If I chown -R openfire:openfire /var/lib/openfire then rerun dpkg I get:

hrcadmin@hrc-chat:~$ sudo dpkg -i openfire_3.9.1_all.deb

(Reading database … 108664 files and directories currently installed.)

Preparing to replace openfire 3.9.1 (using openfire_3.9.1_all.deb) …

invoke-rc.d: initscript openfire, action “stop” failed.

dpkg: warning: subprocess old pre-removal script returned error exit status 1

dpkg - trying script from the new package instead …

invoke-rc.d: initscript openfire, action “stop” failed.

dpkg: error processing openfire_3.9.1_all.deb (–install):

subprocess new pre-removal script returned error exit status 1

invoke-rc.d: initscript openfire, action “start” failed.

dpkg: error while cleaning up:

subprocess installed post-installation script returned error exit status 1

Errors were encountered while processing:

openfire_3.9.1_all.deb

I’m at a loss here. I really love this project, but I’m completely stuck here.

Thanks.Peet

1 Like

Having the same problem on a newly installed Ubuntu 12.04.4 host

You could try to first complete uninstall with "apt-get purge " and then start from scratch. Has worked for me…

Regards

Andi

1 Like

Yes I tried that, however I got the following error:

root@test1111:~# sudo apt-get purge openfire

Reading package lists… Done

Building dependency tree

Reading state information… Done

The following packages will be REMOVED:

openfire*

0 upgraded, 0 newly installed, 1 to remove and 2 not upgraded.

1 not fully installed or removed.

After this operation, 18.0 MB disk space will be freed.

Do you want to continue [Y/n]? y

(Reading database … 53775 files and directories currently installed.)

Removing openfire …

invoke-rc.d: initscript openfire, action “stop” failed.

dpkg: error processing openfire (–purge):

subprocess installed pre-removal script returned error exit status 1

invoke-rc.d: initscript openfire, action “start” failed.

dpkg: error while cleaning up:

subprocess installed post-installation script returned error exit status 1

Errors were encountered while processing:

openfire

E: Sub-process /usr/bin/dpkg returned an error code (1)

Also, for context, the original error I got when trying to install was:

root@test1111:~# dpkg -i downloadServlet?filename=openfire%2Fopenfire_3.9.1_all.deb

(Reading database … 53396 files and directories currently installed.)

Unpacking openfire (from downloadServlet?filename=openfire%2Fopenfire_3.9.1_all.deb) …

Setting up openfire (3.9.1) …

adduser: Warning: The home directory `/var/lib/openfire’ does not belong to the user you are currently creating.

invoke-rc.d: initscript openfire, action “start” failed.

dpkg: error processing openfire (–install):

subprocess installed post-installation script returned error exit status 1

Processing triggers for ureadahead …

Errors were encountered while processing:

openfire

Use brute-force:

apt-get remove

delete openfire user and group

delete /var/lib/openfire

delete /usr/share/openfire

delete /etc/openfire if you don’t need the previous config anymore

Do at your own risk :wink:

Yes I was able to get it removed, I was just pointing it out to show the state the package gets in once it is removed. Does anyone know if there is a bug open for this?

The problem is located @ startup script of Openfire. Just after you get a

invoke-rc.d: initscript openfire, action “start” failed.

or

invoke-rc.d: initscript openfire, action “stop” failed.

go to /etc/init.d/openfire and remove the following line

/usr/lib/jvm/java-7-openjdk-amd64 \

Then run the installation again or just start using Openfire by typing /etc/init.d/openfire start

Norby,

So you believe we should remove openjdk as a JRE option to try when launching openfire?

daryl

Daryl,

I am not sure what’s the correct solution for this.

My Debian v7 has just OpenJDK v6 installed and I have no idea why but there is a directory which you are using for your init.d checks and it is referring to v7 of JDK… and it’s almost empty…

root@xmpp:/usr/lib/jvm/java-7-openjdk-amd64# tree .

.

├── bin

│ └── javaws -> …/jre/bin/javaws

├── jre

│ ├── bin

│ │ ├── itweb-settings

│ │ └── javaws

│ └── man

│ └── man1

│ ├── itweb-settings.1.gz

│ └── javaws.1.gz

└── man

└── man1

├── itweb-settings.gz -> …/…/jre/man/man1/itweb-settings.1.gz

└── javaws.1.gz -> …/…/jre/man/man1/javaws.1.gz

7 directories, 7 files

root@xmpp:~# dpkg --list | grep java

ii ca-certificates-java 20121112+nmu2 all Common CA certificates (JKS keystore)

ii java-common 0.47 all Base of all Java packages

ii libatk-wrapper-java 0.30.4-3 all ATK implementation for Java using JNI

ii libatk-wrapper-java-jni:amd64 0.30.4-3 amd64 ATK implementation for Java using JNI (JNI bindings)

ii tzdata-java 2014a-0wheezy1 all time zone and daylight-saving time data for use by java runtimes

root@xmpp:~# dpkg --list | grep jdk

ii openjdk-6-jre:amd64 6b27-1.12.6-1~deb7u1 amd64 OpenJDK Java runtime, using Hotspot JIT

ii openjdk-6-jre-headless:amd64 6b27-1.12.6-1~deb7u1 amd64 OpenJDK Java runtime, using Hotspot JIT (headless)

ii openjdk-6-jre-lib 6b27-1.12.6-1~deb7u1 all OpenJDK Java runtime (architecture independent libraries)

root@xmpp:~# dpkg --list | grep jre

ii icedtea-6-jre-cacao:amd64 6b27-1.12.6-1~deb7u1 amd64 Alternative JVM for OpenJDK, using Cacao

ii icedtea-6-jre-jamvm:amd64 6b27-1.12.6-1~deb7u1 amd64 Alternative JVM for OpenJDK, using JamVM

ii openjdk-6-jre:amd64 6b27-1.12.6-1~deb7u1 amd64 OpenJDK Java runtime, using Hotspot JIT

ii openjdk-6-jre-headless:amd64 6b27-1.12.6-1~deb7u1 amd64 OpenJDK Java runtime, using Hotspot JIT (headless)

ii openjdk-6-jre-lib 6b27-1.12.6-1~deb7u1 all OpenJDK Java runtime (architecture independent libraries)

Maybe it’s a good idea to look for bin/java executable during those checks?

Norby

Following the tips of Norby, I just commented all lines that makes reference to JAVA, including ‘JAVA_HOME’ variables.

After that, I installed openfire 3.9.3, and it worked perfectly!