Rectangle 27 0

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


This was the cause of my "connection being reset" probelm. The admin user was assigned the incorrect role of manager-gui. I added a new manager-script role and a new user and my problem was solved.

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

Why not? Why shouldn't they have both manager-gui and manager-script?

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

Note
Rectangle 27 0

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


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

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

I think your problem was the server config in your tomcat maven configuration. It conflicted with the username/password settings. In the pom.xml file you should either remove the <server>tomcat7</server> part, and keep the username and password, or remove the username and password and keep <server>tomcat7</server>.

location of setings.xml may differ, e.g. could also be: D:\apache-maven-3.3.9\conf\settings.xml

thank you, this is perfect! the server id of maven's settings.xml is corresponding to the server id in pom.xml's tomcat7-maven-plugin server id, or other way round :-) so you can define many servers and keep credentials in one place but refer from many pom.xml's to this.

Note
Rectangle 27 0

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


<update>true</update>

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

in tomcat plugin in pom.xml, thus maven couldn't upload new webapp on top of existing and running webapp.

Note
Rectangle 27 0

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


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

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 )

Note
Rectangle 27 0

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


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

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

I think your problem was the server config in your tomcat maven configuration. It conflicted with the username/password settings. In the pom.xml file you should either remove the <server>tomcat7</server> part, and keep the username and password, or remove the username and password and keep <server>tomcat7</server>.

location of setings.xml may differ, e.g. could also be: D:\apache-maven-3.3.9\conf\settings.xml

thank you, this is perfect! the server id of maven's settings.xml is corresponding to the server id in pom.xml's tomcat7-maven-plugin server id, or other way round :-) so you can define many servers and keep credentials in one place but refer from many pom.xml's to this.

Note
Rectangle 27 0

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


<update>true</update>

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

in tomcat plugin in pom.xml, thus maven couldn't upload new webapp on top of existing and running webapp.

Note
Rectangle 27 0

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


This was the cause of my "connection being reset" probelm. The admin user was assigned the incorrect role of manager-gui. I added a new manager-script role and a new user and my problem was solved.

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

Why not? Why shouldn't they have both manager-gui and manager-script?

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

Note
Rectangle 27 0

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


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

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 )

Note
Rectangle 27 0

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


mvn tomcat7:redeploy
Note
Rectangle 27 0

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


mvn tomcat7:redeploy
Note