Rectangle 27 11

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, thus maven couldn't upload new webapp on top of existing and running webapp.

java - Tomcat 7: Connection reset by peer or Software caused connectio...

java maven tomcat jenkins tomcat7
Rectangle 27 11

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, thus maven couldn't upload new webapp on top of existing and running webapp.

java - Tomcat 7: Connection reset by peer or Software caused connectio...

java maven tomcat jenkins tomcat7
Rectangle 27 6

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

java - Tomcat 7: Connection reset by peer or Software caused connectio...

java maven tomcat jenkins tomcat7
Rectangle 27 6

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

java - Tomcat 7: Connection reset by peer or Software caused connectio...

java maven tomcat jenkins tomcat7
Rectangle 27 3

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

java - Tomcat 7: Connection reset by peer or Software caused connectio...

java maven tomcat jenkins tomcat7
Rectangle 27 3

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

java - Tomcat 7: Connection reset by peer or Software caused connectio...

java maven tomcat jenkins tomcat7
Rectangle 27 2

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"

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.

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

java - Tomcat 7: Connection reset by peer or Software caused connectio...

java maven tomcat jenkins tomcat7
Rectangle 27 2

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"

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.

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

java - Tomcat 7: Connection reset by peer or Software caused connectio...

java maven tomcat jenkins tomcat7
Rectangle 27 0

Your log indicates ClientAbortException, which occurs when your HTTP client drops the connection with the server and this happened before server could close the server socket Connection.

tomcat - ClientAbortException: java.net.SocketException: Connection re...

java tomcat socketexception connection-reset
Rectangle 27 0

Windows Firewall would have prevented the connection completely if that was the problem.

"prevent" in a what way? It's an obvious that you will get exception (to my mind java.net.SocketException) when your program will try to open connection, the question is here what the message you will see... In fact I fixed the one with "Connection reset by peer: socket write error" by introducing new rule in a windows firewall.

tomcat - ClientAbortException: java.net.SocketException: Connection re...

java tomcat socketexception connection-reset
Rectangle 27 0

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"

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.

java - Tomcat 7: Connection reset by peer or Software caused connectio...

java maven tomcat jenkins tomcat7
Rectangle 27 0

This could have a couple of reasons:

  • Responding to the request took too long, the client gave up
  • You responded with something the client did not understand
  • The end-user actually cancelled the request

You can fairly easily emulate the behavior:

URL url = new URL("http://example.com/path/to/the/file");

int numberOfBytesToRead = 200;

byte[] buffer = new byte[numberOfBytesToRead];
int numberOfBytesRead = url.openStream().read(buffer);

IMO, the most likely item from your list is "The end-user actually cancelled the request". Bloody users, always causing trouble :-P

tomcat - ClientAbortException: java.net.SocketException: Connection re...

java tomcat socketexception connection-reset
Rectangle 27 0

The maven settings preferences were pointed to the wrong location (they can be changed in eclipse: window -> preferences -> maven -> User Settings). Mine defaulted to /.m2/settings.xml, which didn't exist. it was also helpful to use the redeploy goal, instead of deploy, to clarify that the upload was actually failing immediately.

Maven tomcat deployment fails (Connection reset by peer) - Stack Overf...

maven tomcat maven-tomcat-plugin
Rectangle 27 0

This error indicates that the HTTP connection was terminated by the client (the browser). It occurs when the user hits the "stop" button during a long running request. The CF Server prepares the output buffer but when it hands it back to Apache or IIS the web server informs it that client is no longer listening.

In the past this error would occur in the "server.log" file. Perhaps the behavior that has changed is that the error is now thrown as an exception to the regular stdout and trapped by the application logs.

This error could be occuring because users are getting impatient but it could also be occurring due to network issues or improperly configured IIS or Apache. It could and does occur under heavy load as well - anything that make HTTP/TCP connections drop could generate this error. Again... I'm not saying you should not worry about the error. It is a new previously unobserved behavior and as such it warrants attention. But there are legitimate reasons why this sort of error might be thrown.

Thanks Mark, that explains why I wasn't seeing the error before. I wonder if there is anything I can do in the Tomcat or Apache configuration to reduce the frequency of occurrence?

Well... shorter running requests will help. If these are legit then they are the result of people simply closing their browsers. They could also be bots if you have some public links to long running requests. Perhaps log your long running pages and start there?

Thanks, it seems that most are bots, that may have short timeouts. Some of the documents are large PDFs, so folks may be aborting their attempts before they finish. Again, I appreciate your help!

tomcat - Connection reset by peer: socket write error - cfcontent on C...

tomcat coldfusion coldfusion-10 connection-reset
Rectangle 27 0

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

java - Tomcat 7: Connection reset by peer or Software caused connectio...

java maven tomcat jenkins tomcat7
Rectangle 27 0

This error indicates that the HTTP connection was terminated by the client (the browser). It occurs when the user hits the "stop" button during a long running request. The CF Server prepares the output buffer but when it hands it back to Apache or IIS the web server informs it that client is no longer listening.

In the past this error would occur in the "server.log" file. Perhaps the behavior that has changed is that the error is now thrown as an exception to the regular stdout and trapped by the application logs.

This error could be occuring because users are getting impatient but it could also be occurring due to network issues or improperly configured IIS or Apache. It could and does occur under heavy load as well - anything that make HTTP/TCP connections drop could generate this error. Again... I'm not saying you should not worry about the error. It is a new previously unobserved behavior and as such it warrants attention. But there are legitimate reasons why this sort of error might be thrown.

Thanks Mark, that explains why I wasn't seeing the error before. I wonder if there is anything I can do in the Tomcat or Apache configuration to reduce the frequency of occurrence?

Well... shorter running requests will help. If these are legit then they are the result of people simply closing their browsers. They could also be bots if you have some public links to long running requests. Perhaps log your long running pages and start there?

Thanks, it seems that most are bots, that may have short timeouts. Some of the documents are large PDFs, so folks may be aborting their attempts before they finish. Again, I appreciate your help!

tomcat - Connection reset by peer: socket write error - cfcontent on C...

tomcat coldfusion coldfusion-10 connection-reset
Rectangle 27 0

This error indicates that the HTTP connection was terminated by the client (the browser). It occurs when the user hits the "stop" button during a long running request. The CF Server prepares the output buffer but when it hands it back to Apache or IIS the web server informs it that client is no longer listening.

In the past this error would occur in the "server.log" file. Perhaps the behavior that has changed is that the error is now thrown as an exception to the regular stdout and trapped by the application logs.

This error could be occuring because users are getting impatient but it could also be occurring due to network issues or improperly configured IIS or Apache. It could and does occur under heavy load as well - anything that make HTTP/TCP connections drop could generate this error. Again... I'm not saying you should not worry about the error. It is a new previously unobserved behavior and as such it warrants attention. But there are legitimate reasons why this sort of error might be thrown.

Thanks Mark, that explains why I wasn't seeing the error before. I wonder if there is anything I can do in the Tomcat or Apache configuration to reduce the frequency of occurrence?

Well... shorter running requests will help. If these are legit then they are the result of people simply closing their browsers. They could also be bots if you have some public links to long running requests. Perhaps log your long running pages and start there?

Thanks, it seems that most are bots, that may have short timeouts. Some of the documents are large PDFs, so folks may be aborting their attempts before they finish. Again, I appreciate your help!

tomcat - Connection reset by peer: socket write error - cfcontent on C...

tomcat coldfusion coldfusion-10 connection-reset
Rectangle 27 0

I have got this error on open page from Google Cache.

You can ignore this error log with try-catch on filter.

tomcat - ClientAbortException: java.net.SocketException: Connection re...

java tomcat socketexception connection-reset