VM Could not reserve enough space for object heap
Asked Answered
P

1

1

I have just upgraded to Jenkins 1.500 on a windows machine. I also have a windows slave with 8GB RAM. I have made a remote connection to this slave and started it from the Jenkins webinterface (using the JNLP launch button).

It shows up just fine on Jenkins and I have assigned some jobs to it. One of the jobs calls a java application with the following vm args:

-XX:MaxPermSize=512m -Xmx1024m

but the job fails with this error:

Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine.

If I run the job locally on the slave it works fine. Any ideas why the build fails on the windows slave when triggered through jenkins?

The job ran fine on the slave BEFORE the upgrade.

The slave is running: java version "1.6.0_34" Java(TM) SE Runtime Environment (build 1.6.0_34-b04) Java HotSpot(TM) 64-Bit Server VM (build 20.9-b04, mixed mode)

Photoconductivity answered 1/2, 2013 at 20:20 Comment(6)
that's way too much for 32bit windows. you need 1.5GB heap only +extra stack/native continuous address space. reduces perm gen or make sure you have 64bit java. i.e. show java -versionJegger
I am running 64 windows and java. As I wrote the java application runs fine locally on the slave with the above settings. Its only when I start the job from the Jenkins master that I get an error.Photoconductivity
make sure java being run is the same, i.e. not other java installed, the error very strongly suggest 32bit java, also it could be some other parameter wrongly set, if the error disappears by reducing the values of permgen/maxheap it's most likely 32bit javaJegger
did you read my comment - it runs fine with the above vm args locally on the machine.Photoconductivity
i read it -> other java installed that is actually running the One of the jobs calls a java. Check the location that java is being run from.Jegger
I uninstalled all java installation and reinstalled a single 64 bit version. It now works so you are right.Photoconductivity
E
-1

The solution to this is: In your maven installation modify the mvn file and add the below :

export MAVEN_OPTS=-Xmx1024m

Eluviation answered 31/1, 2014 at 9:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.