问题描述
我正在构建一个Maven项目,因为过去1.5年的构建工作正常,但是现在我遇到了PermGen空间错误.
[ERROR] Internal error: java.lang.RuntimeException: org.jfrog.build.extractor.maven.BuildInfoRecorder.sessionEnded() listener has failed: java.io.IOException: Remote call on channel failed: PermGen space -> [Help 1]
[ERROR] org.jfrog.build.extractor.maven.BuildInfoRecorder.sessionEnded() listener has failed:
java.lang.OutOfMemoryError: PermGen space
为了解决这个问题,我尝试了以下选项:-
1)在 管理詹金斯 下,然后 配置系统 .在 全局属性 部分中,添加了名为MAVEN_OPTS的 环境变量 ,其值设置为-Xmx200m -XX:MaxPermSize=512m
2)在 作业配置 下,然后在 MAVEN_OPTS ,添加了以下属性:-
-DXms512m
-DXmx1024m
-DXX:PermSize=512m
-DXX:MaxPermSize=1024m
-DXX:+CMSClassUnloadingEnabled
-DXX:+UseConcMarkSweepGC
仍然发生错误.
注意:-错误不是永久性的,在经过几次构建后便消失了,但再次开始出现,然后在重试几次后又消失了.
谢谢.
也许我错了,但是当Jenkins尝试将构建信息发送到Artifactory时(使用后期操作),您的内存错误似乎发生了. /p>
您最近是否升级了Jenkins Artifactory插件?
您可以尝试禁用捕获并发布构建信息"选项吗?
最后一个选择是,您可以尝试更新JENKINS_JAVA_OPTIONS(在jenkins服务配置文件中)以增加MaxPermSize吗?
## Type: string
## Default: "-Djava.awt.headless=true"
## ServiceRestart: jenkins
#
# Options to pass to java when running Jenkins.
#
JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Xms2G -Xmx4G -XX:MaxPermSize=256m"
I am building a maven project, since last 1.5 yrs build was working fine but now I am getting the PermGen space error.
[ERROR] Internal error: java.lang.RuntimeException: org.jfrog.build.extractor.maven.BuildInfoRecorder.sessionEnded() listener has failed: java.io.IOException: Remote call on channel failed: PermGen space -> [Help 1]
[ERROR] org.jfrog.build.extractor.maven.BuildInfoRecorder.sessionEnded() listener has failed:
java.lang.OutOfMemoryError: PermGen space
I have tried below options in order to resolve it:-
1) Under Manage Jenkins, then Configure System. In the Global properties section, added Environment Variables called MAVEN_OPTS with the value set as -Xmx200m -XX:MaxPermSize=512m
2) Under job configuration, then Build, in the MAVEN_OPTS, added below properties:-
-DXms512m
-DXmx1024m
-DXX:PermSize=512m
-DXX:MaxPermSize=1024m
-DXX:+CMSClassUnloadingEnabled
-DXX:+UseConcMarkSweepGC
Still the error is occurring.
Note:- Error is not permanent, it goes away after few builds but again start appearing and then again goes away after several retries.
Thanks.
Maybe I'm wrong, but it seems that your memory error happens when Jenkins try to send the build information to Artifactory (with a post step action).
Did you upgrade the Jenkins Artifactory plugin recently?
Can you try do disable the "Capture and publish build info" option?
And last option, can you try update the JENKINS_JAVA_OPTIONS (in the jenkins service config file) to increase the MaxPermSize?
## Type: string
## Default: "-Djava.awt.headless=true"
## ServiceRestart: jenkins
#
# Options to pass to java when running Jenkins.
#
JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Xms2G -Xmx4G -XX:MaxPermSize=256m"
这篇关于Jenkins中的PermGen空间问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!