Error when I try deploy application to tomcat7 server

后端 未结 11 1629
轻奢々
轻奢々 2020-12-15 05:59

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         


        
相关标签:
11条回答
  • 2020-12-15 06:05

    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 /

    0 讨论(0)
  • 2020-12-15 06:10

    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.

    Here was the root problem and solution

    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"/>
    
    0 讨论(0)
  • 2020-12-15 06:11

    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 ?

    0 讨论(0)
  • 2020-12-15 06:12

    Check ~/.m2/settings.xml

    <settings>
      <servers>
        <server>
          <id>tomcat-manager</id>
          <username>user001</username>
          <password>123</password>
        </server>
      </servers>
    </settings>
    
    0 讨论(0)
  • 2020-12-15 06:13

    (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.

    0 讨论(0)
  • 2020-12-15 06:17

    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.

    0 讨论(0)
提交回复
热议问题