欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

jenkins打包成功,部署失败

程序员文章站 2022-05-11 15:25:51
...
环境一直正常,更新了tomcat版本后自动部署报错
ERROR: Publisher hudson.plugins.deploy.DeployPublisher aborted due to exception
org.codehaus.cargo.container.ContainerException: Failed to deploy [/var/lib/jenkins/jobs/devel_auto_build_deploy/workspace/build/libs/reis.war]
    ...
Caused by: org.codehaus.cargo.container.tomcat.internal.TomcatManagerException: FAIL - Encountered exception javax.management.RuntimeErrorException: Error invoking method check
...
org.codehaus.cargo.container.tomcat.internal.TomcatManagerException: FAIL - Encountered exception javax.management.RuntimeErrorException: Error invoking method check
...


查看tomcat日志
java.lang.OutOfMemoryError: PermGen space
好吧,非堆内存都太小了,需要调整如下JVM内存配置参数:(16G物理内存)
JAVA_OPTS="-Djava.awt.headless=true -Xmx5120m -Xms5120m -Xmn1024m -XX:PermSize=1024m -XX:MaxPermSize=1024m -XX:+Us


改了之后报了另外一个异常:
org.codehaus.cargo.container.ContainerException: Failed to undeploy 


再改回来,居然好了~~~

只能保证你项目的tomcat 只有一个活跃进程,把其他的全部删除了
ps -ef|grep  tomcatname
问题就应该是这里了~~~
相关标签: tomcat jenkins