I am trying deploy a web application to tomcat7 via eclipse luna, but I am getting this error:
Uploading: http://localhost:8080/manager/text/deploy?path=%2Fl
In my case on my AWS amazon instance the reason was:
The Disk Space Was FULL note 99% on my EC2 spot instance
Am using jenkins using this command normally
mvn clean tomcat7:redeploy -Ddeploy.password=xxxAG1
-Ddeploy.username=admin -Ddeploy.context=/v1 -Ddeploy.url=http://localhost:8080/manager/text
Just Free that space and it worked with me.
The Error i had is
[INFO] I/O exception (java.net.SocketException) caught when processing request: Connection reset
[INFO] Retrying request
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 53.914 s
[INFO] Finished at: 2018-01-10T08:38:28+00:00
[INFO] Final Memory: 47M/371M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:redeploy (default-cli) on project XXXX-app: Cannot invoke Tomcat manager: Connection reset -> [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.
Hint use this command to track down what is eating your space from ( command is from stackoverflow ) sudo du -x -d1 -h /
Ok, I had the same issue with tomcat7.
[INFO] I/O exception (java.net.SocketException) caught when processing request: Connection reset
[INFO] Retrying request
Uploading: http://localhost:8080/manager/text/deploy?path=%2iplover
[INFO] I/O exception (java.net.SocketException) caught when processing request: Connection reset
[INFO] Retrying request
Uploading: http://localhost:8080/manager/text/deploy?path=%2iplover
[INFO] I/O exception (java.net.SocketException) caught when processing request: Connection reset
[INFO] Retrying request
Uploading: http://localhost:8080/manager/text/deploy?path=%2iplover
I could not get it to work with
mvn tomcat7:redeploy
as mentioned here.
My WAR wasn't very large, just 4MB.
It is important that your tomcat-users.xml
has the correct roles setup. I ONLY had the role manager
setup. Adding manager-script
seems important and completely solved my problem.
<role rolename="manager"/>
<role rolename="manager-script"/>
<role rolename="manager-gui"/>
<user username="admin" password="admin" roles="manager,manager-gui,manager-script"/>
I don't know if anybody solved this issue. I have found a workaround in my case: use of redeploy instead of deploy works fine.
The issue may perhaps be related to memory issue or read/write access isn't it ?
Check ~/.m2/settings.xml
<settings>
<servers>
<server>
<id>tomcat-manager</id>
<username>user001</username>
<password>123</password>
</server>
</servers>
</settings>
(Re-)deploy with the Maven tomcat plugin failed for me too with a connection reset on the client and 403 status code in the localhost_access.log
on Tomcat 8.5.30.
This Tomcat version's manager app has a RemoteAddrValve
configured by default, restricting access to the /manager/* path to localhost. See $TOMCAT_HOME/webapps/manager/META-INF/context.xml
.
It helped to turn on the logging to find the solution to this.
I was having the same issue and solved it by running the maven goal
tomcat7:redeploy
instead of
tomcat7:deploy
It worked for both tomcat7 and tomcat8, and my war file was always below 50mb.