使用 CARGO 在 tomcat 上进行远程部署失败并出现超时
我在使用 Cargo-maven2-plugin (1.0.6) 进行远程部署时遇到了问题。我正在部署的战争相当大,默认的 20 秒不足以完成完整部署。 实际的异常是(20秒后):
Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.0.6:deploy (default-cli) on project myproject: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.0.6:deploy failed: Failed to deploy [path/myproject.war]: Connection timed out: connect -> [Help 1]
我的货物配置如下:
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.0.6</version>
<configuration>
<wait>true</wait>
<container>
<containerId>tomcat7x</containerId>
<type>remote</type>
<timeout>600000</timeout>
</container>
<configuration>
<type>runtime</type> <!-- or remote -->
<properties>
<cargo.tomcat.manager.url>http://...:8080/manager/text</cargo.tomcat.manager.url>
<cargo.remote.username>...</cargo.remote.username>
<cargo.remote.password>...</cargo.remote.password>
<cargo.hostname>...</cargo.hostname>
<cargo.servlet.port>8080</cargo.servlet.port>
</properties>
</configuration>
<deployer>
<type>remote</type> <!-- or installed -->
<deployables>
<deployable>
<groupId>...</groupId>
<artifactId>...</artifactId>
<type>war</type>
<properties>
<context>...</context>
</properties>
<pingURL>http://www.myProject.com:8080/</pingURL>
<pingTimeout>25000</pingTimeout>
</deployable>
</deployables>
</deployer>
</configuration>
<executions></executions>
</plugin>
I'm running into a problem when doing a remote deploy with cargo-maven2-plugin (1.0.6). The war I'm deploying is rather large and the default 20 seconds are not enough to do the full deploy.
The actual exception is (after 20 seconds):
Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.0.6:deploy (default-cli) on project myproject: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.0.6:deploy failed: Failed to deploy [path/myproject.war]: Connection timed out: connect -> [Help 1]
I have cargo configured as follows:
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.0.6</version>
<configuration>
<wait>true</wait>
<container>
<containerId>tomcat7x</containerId>
<type>remote</type>
<timeout>600000</timeout>
</container>
<configuration>
<type>runtime</type> <!-- or remote -->
<properties>
<cargo.tomcat.manager.url>http://...:8080/manager/text</cargo.tomcat.manager.url>
<cargo.remote.username>...</cargo.remote.username>
<cargo.remote.password>...</cargo.remote.password>
<cargo.hostname>...</cargo.hostname>
<cargo.servlet.port>8080</cargo.servlet.port>
</properties>
</configuration>
<deployer>
<type>remote</type> <!-- or installed -->
<deployables>
<deployable>
<groupId>...</groupId>
<artifactId>...</artifactId>
<type>war</type>
<properties>
<context>...</context>
</properties>
<pingURL>http://www.myProject.com:8080/</pingURL>
<pingTimeout>25000</pingTimeout>
</deployable>
</deployables>
</deployer>
</configuration>
<executions></executions>
</plugin>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这似乎不是容器超时的情况。最有可能的是,它无法连接到指定主机和端口上的 tomcat。
It does not seem to be a case of container timeout. Most likely, it is unable to connect to tomcat at the specified host and port.