您的位置:首页 > 编程语言 > Go语言

在jenkins里maven使用cargo部署失败

2015-09-20 10:20 686 查看
cargo确实是自动部署tomcat的利器,详细可见我之前的文章:

使用cargo实现jenkins自动部署远程tomcat

但是发现却不是那么稳定。主要体现在偶尔会使得jenkins构建失败。

错误主要有三种:

1

FAIL - The application [/zsale-web] is already being serviced

2

Connection refused -> [Help 1]

3

FAIL - Context /zsale-web is defined in server.xml and may not be undeployed -> [Help 1]

虽然是三种不同的错误信息,但现象相似,此时一般tomcat也访问不了,需要重启tomcat才修复。

这样对开发人员造成了极大的困扰,因为明明我提交的代码并没有问题,但是却通知我构建失败。

估计是因为cargo使用tomcat热部署,而热部署本身就不是很稳定,最终我还是使用传统的停tomcat,部署工程,启tomcat这一套解决(自己写shell脚本)。也就是说放弃使用cargo了(在jenkins中把cargo:redeploy去掉)。如有知道怎么更好解决的麻烦也告诉我一下,谢谢。



昨天完整的报错信息:

[INFO] BUILD FAILURE

[INFO] ————————————————————————

[INFO] Total time: 27.633 s

[INFO] Finished at: 2015-09-19T21:00:41+08:00

[INFO] Final Memory: 56M/875M

[INFO] ————————————————————————

[ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.4.15:redeploy (default-cli) on project zsale-web: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.4.15:redeploy failed: Failed to redeploy []http://30.1.23.250:8080/job/zsale/ws/target/zsale-web-0.0.1-SNAPSHOT.war]: Connection refused -> [Help 1]

[ERROR]

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR]

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/M***EN/PluginExecutionException

[JENKINS] Archiving http://30.1.23.250:8080/job/zsale/ws/pom.xml to com.asiainfo/zsale-web/0.0.1-SNAPSHOT/zsale-web-0.0.1-SNAPSHOT.pom

[JENKINS] Archiving http://30.1.23.250:8080/job/zsale/ws/target/zsale-web-0.0.1-SNAPSHOT.war to com.asiainfo/zsale-web/0.0.1-SNAPSHOT/zsale-web-0.0.1-SNAPSHOT.war

channel stopped




转载请标明出处:

本文出自:【ouyida3的博客

2015.9.20
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: