This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills and have John Sonmez on-line!
See this thread for details.
The moose likes Sockets and Internet Protocols and the fly likes Connection Reset By Peer Errors Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Connection Reset By Peer Errors" Watch "Connection Reset By Peer Errors" New topic
Author

Connection Reset By Peer Errors

chanzeb cecak
Greenhorn

Joined: Jun 04, 2013
Posts: 6
Hello All,
We are seeing errors on some of our QA testing scripts that intermittently throw Connection Reset By Peer errors.

The Test scripts submit requests via F5 which forwards requests to Apache (2.2.21) with a mod_jk load_balancer with the following setting for each worker in the worker.property

worker1 props
worker.worker1.type=ajp13
worker.worker1.port=8109
worker.worker1.lbfactor=1
worker.worker1.host=skunkhost1.com
worker.worker1.connection_pool_timeout=30

and here is what is in the JBoss domain.xml for the AJP port from JBoss 7.1.1

<unbounded-queue-thread-pool name="SKUNKY.APP.AJP">
<max-threads count="300"/>
<keepalive-time time="3" unit="minutes"/>
</unbounded-queue-thread-pool>

Here is httpd.conf
Timeout 300 (Amount of time in seconds the server will wait for certain events before failing a request)
KeepAlive On (Enables HTTP persistent connections)
KeepAliveTimeout 15 (Amount of time the server will wait for subsequent requests on a persistent connection seconds.)
MaxKeepAliveRequests 100 (Number of requests allowed on a persistent connection)
TraceEnable Off

My question is that is it posisble that apache times out and closes the connection while jboss is still ready and working on the request?
What might be causing the Connection Reset By Peer error?
what am i missing here?
Any help is majorly appreciated!!
Sincerely Chan
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 19060
    
  40


First, I can't answer your exact question... from the way you describe the problem, either we know it or we don't. Either we encountered the exact same thing, or we didn't.

You need to troubleshoot the problem. Take stack traces, and follow them. Add debugging messages and follow them. Etc. You need to do this to find the root cause of the problem, before you can attempt to fix it..

Unfortunately, you have a problem. A peer reset, is exactly that -- the peer did something unexpected. You are looking on the wrong side of the connection. I would recommend going to the other side of the connection. Is the other side your code too? If so, can you troubleshoot it?

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Connection Reset By Peer Errors