Openfire is not running

Hey,

I try to install Openfire on my VPS with CentOS release 5.6 (Final) but for some reason it doesnt start.

uname -a

Linux server1.xxxxx.xx 2.6.18-028stab091.2 #1 SMP Fri Jun 3 00:02:40 MSD 2011 i686 i686 i386 GNU/Linux

#java -version

java version “1.6.0_16”

Java™ SE Runtime Environment (build 1.6.0_16-b01)

Java HotSpot™ Client VM (build 14.2-b01, mixed mode)

/etc/init.d/openfire start

Starting openfire:

/etc/init.d/openfire status

openfire is not running

/etc/init.d/openfire start

Openfire is already running. Remove /var/run/openfire.pid if you know this to be untrue.

netstat -an | grep 9090

P.S. I have no firewall installed e.g. iptables.

/opt/openfire/logs/nohup.out:

Exception in thread “main” java.lang.OutOfMemoryError

I changed this line in /etc/sysconfig/openfire

#OPENFIRE_OPTS="-Xmx1024m"

OPENFIRE_OPTS="-Xms512m -Xmx1024m"

/opt/openfire/logs/nohup.out:

Error occurred during initialization of VM

Could not reserve enough space for object heap

Could not create the Java virtual machine.

Help appreciated!

Regards,

David van der Tuijn

This seems to solve it:

export _JAVA_OPTIONS="-Xms20m -Xmx64m -XX:MinHeapFreeRatio=20 -XX:MaxHeapFreeRatio=40 -XX:NewSize=10m -XX:MaxNewSize=10m -XX:SurvivorRatio=6 -XX:TargetSurvivorRatio=80 -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled"

Message was edited by: David van der Tuijn

How much physical memory do you have in the host system?

Dave

ls

-bash: fork: Cannot allocate memory

i think 512MB is not enough is it?

If you’ve got 512MB in the host and you’re allocating a maximum JVM heap size of 1024MB, I’m pretty sure the error condition you’re getting is to be expected - try a setting of 256MB?

Cheers,

Dave

When there is 512MB physical memmory, don’t set -Xmx512m. It seems Openfire reserve all that memmory and fails to start when its not available.

I upgraded to 1024MB for other reasons, and OPENFIRE_OPTS="-Xms128m -Xmx512m" works fine.

Thanks davenz.