[英]Jenkins does not start with -Xrs -Xmx2048m -XX:MaxPermSize=512m (windows)
My Jenkins does not want to start with parameters -Xrs -Xmx2048m -XX:MaxPermSize=512m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar "%BASE%\\jenkins.war" --httpPort=8080
in jenkins.xml file. 我的Jenkins不想以-Xrs -Xmx2048m -XX:MaxPermSize=512m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar "%BASE%\\jenkins.war" --httpPort=8080
in jenkins.xml文件开头。 I also added JENKINS_HOME variable to windows variables and set path to my jenkins folder c:\\Program Files (x86)\\Jenkins
. 我还向Windows变量添加了JENKINS_HOME变量,并设置了我的jenkins文件夹c:\\Program Files (x86)\\Jenkins
路径。 But it does not help. 但这无济于事。 I see in the log file error 我在日志文件中看到错误
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Can somebody help me? 有人可以帮我吗?
Most likely you are using 32-bit JVM on Windows. 您很可能在Windows上使用32位JVM。 This has a heap limit of about 1.2 - 1.5 GB depending on what you have run before. 根据您之前运行的内容,堆限制约为1.2-1.5 GB。
I suggest either limiting yourself to -Xmx1200m
or use a 64-bit JVM. 我建议将自己限制为-Xmx1200m
或使用64位JVM。
If you increase the PermGen, you need to decrease the heap size as the amount of virtual memory you can have in 32-bit windows is limited. 如果增加PermGen,则需要减小堆大小,因为在32位窗口中可以拥有的虚拟内存量受到限制。
I found solution. 我找到了解决方案。 Need to update JRE version of Jenkins in its folder. 需要在其文件夹中更新Jenkins的JRE版本。 I just copied new files to its folder and replaced the same files) Now I can start Jenkins with option 我只是将新文件复制到其文件夹并替换了相同的文件)现在,我可以使用选项启动Jenkins
<arguments>-Xrs -Xmx2048m - Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar "%BASE%\jenkins.war" --httpPort=8080</arguments>
Also I use soap ui api for running tests in Jenkins. 我也使用soap ui api在Jenkins中运行测试。 I changed option 我改变了选择
set JAVA_OPTS=-Xms512m -Xmx2048m -Dsoapui.properties=soapui.properties "-Dsoapui.home=%SOAPUI_HOME%\"
in testrunner.bat And now my tests are run correctly and there are no errors Perm Gen! 在testrunner.bat中,现在我的测试已正确运行,Perm Gen没有错误!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.