Tomcat 7: Connection reset by peer or Software caused connection abort

前端 未结 5 1839
梦如初夏
梦如初夏 2020-12-10 12:30

I have a problem when I\'m trying to deploy Java-application.

Cannot invoke Tomcat manager: Connection reset by peer: socket write error
<
相关标签:
5条回答
  • 2020-12-10 13:09

    In my case settings looked ok, but I already had the same webapp uploaded to tomcat and hadn't specified

    <update>true</update>
    

    in tomcat plugin in pom.xml

    0 讨论(0)
  • 2020-12-10 13:11

    Users with the manager-gui role should not be granted either the manager-script or manager-jmx roles.

    so,user admin should remove the role "manager-gui"

    0 讨论(0)
  • 2020-12-10 13:14
    mvn tomcat7:redeploy
    

    try this as documentation suggests:

    (Alias for the deploy goal with its update parameter set to true.)

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

    I added

    <server>
        <id>tomcat7</id>
        <username>admin</username>
        <password>admin</password>
    </server> 
    

    in user/.m2/settings.xml

    Also I didn't change pom.xml, tomcat-users.xml and Maven/conf/settings.xml and now all works fine.

    0 讨论(0)
  • 2020-12-10 13:20
            <plugin>
                <!-- tomcat deploy plugin -->
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>tomcat-maven-plugin</artifactId>
                <configuration>
                    <url>http://localhost:8080/manager/text</url>
                    <server>TomcatServer</server>
                    <username>XXXX</username>
                    <password>XXXX</password>
                    <path>/XXXX</path>
                </configuration>
            </plugin>
    

    This works for me :)

    Environment -> Windowd 8.1 + Maven 3 + Tomcat 8.1.15 + JDK 1.8 Also, I had to use tomcat:redeploy

    ALso, update your maven settings via -> Preferences->Maven->User Settings to point to your maven settings.xml file. Add the values of the server in the maven settings.xml ( servers section and add the tomcat server details there). Use that here( for me the id is TomcatServer )

    Some of the steps were taken from here:- http://kosalads.blogspot.de/2014/03/maven-deploy-war-in-tomcat-7.html

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