Java, what else, cannot start

Hey,

I allready searched this forum, but ther is no good anwer for me. Everytime i get an error when i will start wildfire:

Heare some sys-errors:

vs245085:~/wildfire/bin# ./wildfire start

./wildfire: line 6: -Xms24m: command not found

No suitable Java Virtual Machine could be found on your system.

The version of the JVM must be at least 1.5.

Please define INSTALL4J_JAVA_HOME to point to a suitable JVM.

You can also try to delete the JVM cache file /root/.install4j

or

vs245085:~/wildfire/bin# java -version

Error occurred during initialization of VM

Could not reserve enough space for object heap

Could not create the Java virtual machine.

whats wrong with me?

Hi,

you did edit your start script and made a small error, didn’'t you?.

Line 6 seems to start with “-Xms24m …”

It should start with “INSTALL4J_ADD_VM_PARAMS=’’-Xms24m …”

LG

Thanks for reply,

But wildfire doesn’'t start anyway.

vs245085:~/wildfire/bin# ./wildfire -start

No suitable Java Virtual Machine could be found on your system.

The version of the JVM must be at least 1.5.

Please define INSTALL4J_JAVA_HOME to point to a suitable JVM.

You can also try to delete the JVM cache file /root/.install4j

vs245085:~/wildfire/bin#

Edit:

With ‘’-Xms8m’’:

vs245085:~/wildfire/bin# ./wildfire -start

testing JVM in /usr …

testing JVM in /usr/java/jdk1.5.0_07 …

No suitable Java Virtual Machine could be found on your system.

The version of the JVM must be at least 1.5.

Please define INSTALL4J_JAVA_HOME to point to a suitable JVM.

You can also try to delete the JVM cache file /root/.install4j

vs245085:~/wildfire/bin#

//PS: Sorry cause my english

Message was edited by: Leonce

Hi,

What is the outcome of vs245085:java -version?

It should be something like java version “1.5.x_x”

Your configuration is not pointing to the correct (if any) JVM.

Conor.

Well, i have reinstalld Java Sun.

vs245085:/home/jabber# java -version

Error occurred during initialization of VM

Could not reserve enough space for object heap

Could not create the Java virtual machine.

vs245085:/home/jabber#

Message was edited by: Leonce

Hi,

do you own a v-server without memory? You may try

java -Xms4m -Xmx8m -version

and I’'m sure it will display something like 1.5.0_06-b05 but 8 MB are not enough to run Wildfire.

LG

vs245085:~# java -Xms48m -Xmx48m -version

java version “1.5.0_07”

Java™ 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)

Java HotSpot™ Server VM (build 1.5.0_07-b03, mixed mode)

vs245085:~#

Well, is 48 enough? I will have only 2 User.

with ‘’-Xms48m -Xmx48m’’:

vs245085:~/wildfire/bin# ./wildfire -start

testing JVM in /usr …

testing JVM in /usr/lib/j2re1.5-sun …

No suitable Java Virtual Machine could be found on your system.

The version of the JVM must be at least 1.5.

Please define INSTALL4J_JAVA_HOME to point to a suitable JVM.

You can also try to delete the JVM cache file /root/.install4j

vs245085:~/wildfire/bin#

Hi,

I have no idea how the very complicated start script try to detect the java version, you could remove “exit 83” below “echo You can also try to delete the JVM cache file $HOME/.install4j” somewhere in the file and define “INSTALL4J_JAVA_HOME_OVERRIDE=’’/usr/lib/j2re1.5-sun’’” within the first lines.

It may exit with another error, so you may want to comment some more “exit” lines.

Then it should start someway, but I’'m not sure that it will really run.

LG

Very crazy:

vs245085:~/wildfire/bin# ./wildfire start

No suitable Java Virtual Machine could be found on your system.

The version of the JVM must be at least 1.5.

Please define INSTALL4J_JAVA_HOME to point to a suitable JVM.

You can also try to delete the JVM cache file /root/.install4j

Starting wildfire

vs245085:~/wildfire/bin# nohup: appending output to `nohup.out’’

nohup: cannot run command `/bin/java’’: No such file or directory

But I think “/usr/lib/j2re1.5-sun” is right.

Some informations:

vs245085:~/wildfire/bin# find / -name java

/etc/alternatives/java

/usr/share/java

/usr/bin/java

/usr/lib/j2re1.5-sun/bin/java

/usr/local/java

/var/lib/dpkg/alternatives/java

my cfg: http://nopaste.php-q.net/218487

Hi,

please try to run

vs245085:~/wildfire/bin# sh -x ./wildfire start

so you’'ll see what is happening within the script.

LG

Can someone post some Java Heap memory recommendations based on the amount of concurrent users?

I’‘m running into the same problem. I’‘m installing Wildfire 3 on Gentoo Linux. I installed the sun jdk and it’'s the one that is setup. I made no changes to the config file

  1. java-config -L

“Sun JDK 1.4.2.10” (/etc/env.d/java/20sun-jdk-1.4.2.10) *

“Blackdown JRE 1.4.2.03” (/etc/env.d/java/20blackdown-jre-1.4.2.03)

“Sun JRE 1.5.0.06” (/etc/env.d/java/20sun-jre-bin-1.5.0.06)

“Blackdown JDK 1.4.2.03” (/etc/env.d/java/20blackdown-jdk-1.4.2.03)

  1. cat /root/.install4j

JRE_VERSION /opt/sun-jdk-1.4.2.10 1 4 2 10

I tried deleting the above file and running wildfire. It recreated the file, with the same contents.

Also I tried editing line 6 as recommended above to

INSTALL4J_ADD_VM_PARAMS=’’-Xms24m’’

Any further suggestions?

I had the same issue… It happens in linux and its some odd linking error that makes the default JRE the wrong one. I dont know why this happens nor how to fix it sorry, but I will ask my co worker who did fix it, and I will come back. stay tuned tomarrow i think this is the same exact thing that happened to me. o and btw you will run into some other errors on the path to getting this to work

Hi,

you may want to add

INSTALL4J_JAVA_HOME_OVERRIDE=/etc/env.d/java/20sun-jre-bin-1.5.0.06

/code

as the 2nd line so Wildfire will use it.

LG

I changed line 2 as recommended above and reran the program with the same results.

  1. ./wildfire start

No suitable Java Virtual Machine could be found on your system.

The version of the JVM must be at least 1.5.

Please define INSTALL4J_JAVA_HOME to point to a suitable JVM.

You can also try to delete the JVM cache file /root/.install4j

I also tried setting the variable as mentioned to the jre install, but this didn’'t do anything.

  1. INSTALL4J_JAVA_HOME=/etc/env.d/java/20sun-jre-bin-1.5.0.06 ./wildfire start

No suitable Java Virtual Machine could be found on your system.

The version of the JVM must be at least 1.5.

Please define INSTALL4J_JAVA_HOME to point to a suitable JVM.

You can also try to delete the JVM cache file /root/.install4j

Hi,

would you please run “sh -x ./wildfire start” and look at the output of the script and where it is exiting. Then remove or comment the exit statement(s).

Somewhere at the end of the script you’'ll find

echo “Starting wildfire”

nohup “$app_java_home/bin/java” -server -Dins…

/code

Between these lines you could insert:

app_java_home=/etc/env.d/java/20sun-jre-bin-1.5.0.06

/code

and start Wildfire again, it should now use the right java version.

LG

Here’‘s the output. I’'m not sure where to comment things out

. . .

  • test_jvm

  • tested_jvm=na

  • test_dir=

  • bin_dir=/bin

  • java_exc=/bin/java

  • ‘’[’’ -z ‘’’’ ‘’]’’

  • return

  • ‘’[’’ -z ‘’’’ ‘’]’’

  • ‘’[’’ -f /opt/wildfire/.install4j/inst_jre.cfg ‘’]’’

  • ‘’[’’ -z ‘’’’ ‘’]’’

  • echo No suitable Java Virtual Machine could be found . . .

I did try adding that extra line right before it started, but this didn’'t seem to affect anything either. I get the same response, even with that debug output.

Hi,

you should find something like

if [ -z “$app_java_home” ]; then

echo No suitable Java Virtual Machine could be found on your system.

echo The version of the JVM must be at least 1.5.

echo Please define INSTALL4J_JAVA_HOME to point to a suitable JVM.

echo You can also try to delete the JVM cache file $HOME/.install4j

exit 83

fi

in your wildfire file. Change exit 83 to #exit 83 and it shoud run much better. You may hit another exit some line later which you also want to comment. This section should look like:

if [ -z “$app_java_home” ]; then

echo No suitable Java Virtual Machine could be found on your system.

echo The version of the JVM must be at least 1.5.

echo Please define INSTALL4J_JAVA_HOME to point to a suitable JVM.

echo You can also try to delete the JVM cache file $HOME/.install4j

#exit 83

fi

LG

That gave me this issue:

  • nohup /bin/java -server -Dinstall4j.jvmDir= -Dinstall4j.appDir=/opt/wildfire -Dexe4j.moduleName=/opt/wildfire/bin/wildfire -classpath /opt/wildfire/.install4j/i4jruntime.jar:/opt/wildfire/lib/activation.jar:/opt/w ildfire/lib/bouncycastle.jar:/opt/wildfire/lib/jdic.jar:/opt/wildfire/lib/mail.j ar:/opt/wildfire/lib/startup.jar com.install4j.runtime.Launcher start org.jivesoftware.wildfire.starter.ServerStarter false false /opt/wildfire/bin/…/logs/stderror.log /opt/wildfire/bin/…/logs/stdoutt.log true true false ‘’’’ true true 0 0 ‘’’’ 20 20 Arial 0,0,0 8 500 ‘‘version 3.0.0’’ 20 40 Arial 0,0,0 8 500 -1 -DwildfireHome=/opt/wildfire -Dwildfire.lib.dir=/opt/wildfire/lib start

so, I concluded that $app_java_home wasn’'t being set correctly. I saw that it was set in line 92 to $test_dir

I checked ‘‘which java’’ to find the location of java and changed line 92 to

  1. app_java_home=$test_dir

app_java_home=/opt/sun-jdk-1.4.2.10

That didn’‘t seem to help so I assumed it was reset elsewhere so I undid the above change on line 92, couldn’'t find the variable set anywhere elso so I added this to blank line 243. (right after ‘‘echo “Starting wildfire”’’)

app_java_home=/opt/sun-jdk-1.4.2.10

now, if I run it using the command ‘‘sh -x ./wildfire start’’

It returns “nohup: appending output to `nohup.out’’”

cat nohup.out shows the file is empty, but exists.

If I run it directly, it reports the same error, but doesn’'t exit and then shows the same thing with an empty nohup.out file.

after any of these commands, ps aux|grep wild shows no instances of wildfire running.

Any idea what’'s going on?

Hi,

well, I thought that you did enter

app_java_home=/etc/env.d/java/20sun-jre-bin-1.5.0.06

/code before “nohup “$app_java_home/bin/java” …” so it should have a valid value. So it seems that it is starting and terminating very fast.

Did you check the log files in /opt/wildfire/logs/ ?

LG