环境一直正常,更新了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
问题就应该是这里了~~~