Solved

Connect RESTful call: SSLException: Connection reset

  • 29 April 2021
  • 4 replies
  • 12534 views

Userlevel 2
Badge +4

I have a routing address setup to make a call to another system using REST in an IFS cloud managed environment.  It works most of the time, but after multiple successful calls to the end point I start getting an error:  Exception while sending data Caused by: javax.net.ssl.SSLException: Connection reset Caused by: java.net.SocketException: Connection reset.

 

Does IFS utilize a security appliance in the cloud hosted environments that sends a RST packet to the Connect server automatically after a certain volume of transactions are processed?  

 

I have Connect configured to retry 60 times after 1 minute.  This results in the message going from a waiting status to released after about a minute and then Connect picks it up and resends within a minute from there.  As such a new RESTful connection for the same API call, but it continues to receive this error from anywhere from 10 minutes to multiple hours.  If it is able to successfully make the connection which it does about 40% of the time, it succeeds, if it does not then the application message fails.

 

It is an automated routine that runs every night and will make one request at a time to the REST endpoint.  When the callback occurs successfully then it makes the next request.  The API call is requesting records from a third party service and will load anywhere from 500 to 6,000 records in IFS in batches of 100 each.  After about 10 successful requests I start getting the connection reset error.  Sometimes it clears on its own, and sometimes I have to restart the process in the morning.  If it runs correctly the requests are going out about 1 every minute or so, if it fails then the retry takes about 2 minutes, so this isn’t creating a huge volume of transactions.  Also, the error always occurs on the outbound RESTful call not the call back step.

icon

Best answer by Minoshini Fonseka 14 May 2021, 07:21

View original

This topic has been closed for comments

4 replies

Userlevel 7
Badge +19

Hi @DrJeffreyWhite ,

Do you aware whether that environmental have any azure load balancer?

Userlevel 2
Badge +4

There are load balancers, but no azure load balancers.  I have a suspicion that there is possibly a 30 sec timeout or something like that in the load balancer that is closing the connection before the response is received.

Userlevel 7
Badge +19

Hi @DrJeffreyWhite , 

‘ java.net.SocketException: Connection reset’ happens while reading from a clientSocket Socket object which is closed its connection because of some reason. (Network lost, firewall or application crash or intended close). If there are any load balancers, it’s better to have a look at their timeouts as well and see whether they have any relatable behaviour.

Badge +1

This SocketException occurs on the server side when the client closed the socket connection before the response could be returned over the socket. For example, by quitting the browser before the reponse was retrieved.  Connection reset simply means that a TCP RST was received. This happens when your peer receives data that it can't process, and there can be various reasons for that. The simplest is when you close the socket, and then write more data on the output stream. By closing the socket, you told your peer that you are done talking, and it can forget about your connection. When you send more data on that stream anyway, the peer rejects it with an RST to let you know it isn't listening.