Win a copy of Microservices in Action this week in the Web Services forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

Problems deploying to remote Tomcat with CARGO  RSS feed

 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm not sure if this is a networking/tomcat problem or a configuration problem with CARGO and my maven2 pom file.

When I try to deploy to a remote Tomcat instance (currently running) I get an IOException stating

Error writing request body to server
at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.che
ckError(HttpURLConnection.java:2524)
at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.wri
te(HttpURLConnection.java:2507)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65
)
at java.io.BufferedOutputStream.write(BufferedOutputStream.java:109)
at org.codehaus.cargo.container.tomcat.internal.TomcatManager.pipe(Tomca
tManager.java:601)


The war file I'm deploying is about 17MB. Deploying using the Tomcat manager is working fine. Can someone point me in the right direction whether it's a problems with the CARGO config or if the problem might be somewhere else. I'm using maven 2.09, JDK-1.6.0_06 and Tomcat 5.5

<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<!-- <version>1.0-alpha-6</version> -->

<configuration>
<container>
<containerId>tomcat5x</containerId>
<type>remote</type>
</container>
<configuration>
<type>runtime</type>
<properties>
<cargo.tomcat.manager.url>
http://server1:8080/manager
</cargo.tomcat.manager.url>
<cargo.remote.username>admin</cargo.remote.username>
<cargo.remote.password>admin</cargo.remote.password>
</properties>
</configuration>

<deployer>
<type>remote</type>
<deployables>
<deployable>
<groupId>net.xzy</groupId>
<artifactId>myapp</artifactId>
<type>war</type>
</deployable>
</deployables>
</deployer>
</configuration>
</plugin>
 
Sven Anderson
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Just to let you know that I managed to do a mvn cargo eploy from a different machine. This machine is running maven 2.0.8, jdk1.5.0_13 and this computer sits on the same subnet as the tomcat server. It would be interesting to know if other people have experienced similar problems and how you solved them. According to our sys admins we don't have any firewalls etc between these machines so networking shouldn't be an issue.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had a proxy configured on one machine that prevented Cargo from redeploying. Strangely enough, undeploying was successful. After that, I got the IOException described above. Turning off the proxy did solve the problem for both, Maven 2.09 and Maven 2.20 with Java 1.6.0_15 on Mac OS X 10.5.8.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!