Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

Cannot invoke Tomcat manager: Connection reset by peer: socket write error

or

Cannot invoke Tomcat manager: Software caused connection abort: socket write error

In pom.xml I have this:

<plugin>
    <groupId>org.apache.tomcat.maven</groupId>
    <artifactId>tomcat7-maven-plugin</artifactId>
    <version>2.2</version>
    <configuration>
        <url>http://localhost:8085/manager/html</url>
        <server>tomcat7</server>
        <path>/java_web</path>
        <username>admin</username>
        <password>admin</password>
    </configuration>
</plugin>

In tomcat-users.xml I have this:

 <tomcat-users>
     <role rolename="admin"/>
     <role rolename="manager-script"/>
     <role rolename="manager-gui"/>
     <role rolename="manager-jmx"/>
     <user username="admin" password="admin" roles="manager-gui,admin,manager-jmx,manager-script" />
 </tomcat-users>

Also in Maven/conf/settings.xml I have:

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

When I'm trying to go to

http://localhost:8085/manager/html/deploy?path=%2Fjava_web&update=true

and input username and password (admin admin) I have error:

403 Access Denied
You are not authorized to view this page.

But I typed in tomcat-users.xml that user admin has manager-gui role. I'm using Tomcat 7.0.56 and Jenkins. Also use commands: clean and tomcat7-redeploy. Need help to understand what is wrong:C

like image 815
bin-bin Avatar asked Oct 14 '14 08:10

bin-bin


People also ask

Is Tomcat 7 still supported?

The Apache Tomcat team announces that support for Apache Tomcat 7.0. x will end on 31 March 2021.

What is Tomcat7 service?

Tomcat7 is a service application for running Tomcat 7 as a Windows service. Tomcat monitor application. Tomcat7w is a GUI application for monitoring and configuring Tomcat services. The available command line options are: //ES//

What is Tomcat7 Maven plugin?

The Tomcat7 Maven Plugin provides goals to manipulate WAR projects within the Tomcat servlet container version 7.x.


1 Answers

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

like image 176
A. L. Avatar answered Sep 30 '22 01:09

A. L.