2011-04-04 103 views
1

在使用cargo-maven2-plugin(1.0.6)進行遠程部署時,我遇到了一個問題。我正在部署的戰爭相當大,默認20秒不足以完成全面部署。 實際的例外是(20秒後):在tomcat上用CARGO遠程部署失敗,出現TIMEOUT

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> 
+1

你發現了這個問題嗎?即使我得到了同樣的錯誤。 – Sahil 2011-04-15 23:39:51

+0

您已將[容器超時](http://cargo.codehaus.org/Container+Timeout)設置爲600秒,但我認爲只適用於本地容器。您的ping超時設置爲25秒 - 您確定部署在20秒後停止嗎?你嘗試提高這個參數嗎? – Kariem 2012-04-26 15:45:08

回答

0

它似乎沒有成爲container timeout的情況。很可能,它無法連接到指定的主機和端口上的tomcat。