Error: java.net.SocketException: Connection reset

Hi All,

We are getting the below error on the PROD environment, we are using REST API, and internally on the main service it calls the pub.client:http service Once this service executes get the below error, we are hitting the AWS Lambda URL

When we hit the AWS Lambda URL directly (POST Method) from Postman it works fine.

Can anyone help on this issue?

Error:
java.net.SocketException: Connection reset

Error Type:
com.wm.app.b2b.server.ServiceException

Error Dump:

com.wm.app.b2b.server.ServiceException: java.net.SocketException: Connection reset
at pub.clientimpl.http(clientimpl.java:1510)
at sun.reflect.GeneratedMethodAccessor309.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:411)
at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:744)
at com.wm.app.b2b.server.util.tspace.ReservationProcessor.process(ReservationProcessor.java:46)
at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java:61)
at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:250)
at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:56)
at com.wm.app.b2b.server.invoke.PipelineProcessor.process(PipelineProcessor.java:178)
at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:334)
at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:41)
at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:401)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:615)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:425)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:383)
at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:253)
at com.wm.app.b2b.server.BaseService.invoke(BaseService.java:236)
at com.wm.lang.flow.FlowInvoke.invoke(FlowInvoke.java:267)
at com.wm.lang.flow.FlowMapInvoke.invokeService(FlowMapInvoke.java:196)
at com.wm.lang.flow.FlowMap.invoke(FlowMap.java:286)
at com.wm.lang.flow.FlowMap.invoke(FlowMap.java:154)
at com.wm.lang.flow.FlowState.invokeNode(FlowState.java:668)
at com.wm.lang.flow.FlowState.stepIncremental(FlowState.java:582)
at com.wm.lang.flow.FlowState.invoke(FlowState.java:471)
at wm.server.flowdebugger.singleStepMap(flowdebugger.java:1299)
at wm.server.flowdebugger.execute(flowdebugger.java:515)
at sun.reflect.GeneratedMethodAccessor527.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:421)
at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:744)
at com.wm.app.b2b.server.util.tspace.ReservationProcessor.process(ReservationProcessor.java:46)
at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java:61)
at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:250)
at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:56)
at com.wm.app.b2b.server.invoke.PipelineProcessor.process(PipelineProcessor.java:178)
at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:334)
at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:41)
at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:401)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:615)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:425)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:383)
at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:253)
at com.wm.app.b2b.server.comm.DefaultServerRequestHandler.handleMessage(DefaultServerRequestHandler.java:127)
at com.wm.app.b2b.server.HTTPMessageHandler.process(HTTPMessageHandler.java:163)
at com.wm.app.b2b.server.HTTPDispatch.handleRequest(HTTPDispatch.java:223)
at com.wm.app.b2b.server.Dispatch.run(Dispatch.java:430)
at com.wm.util.pool.PooledThread.run(PooledThread.java:134)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:210)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at iaik.security.ssl.Utils.a(Unknown Source)
at iaik.security.ssl.a.k(Unknown Source)
at iaik.security.ssl.f.a(Unknown Source)
at iaik.security.ssl.g.f(Unknown Source)
at iaik.security.ssl.g.d(Unknown Source)
at iaik.security.ssl.f.c(Unknown Source)
at iaik.security.ssl.SSLTransport.startHandshake(Unknown Source)
at iaik.security.ssl.SSLSocket.startHandshake(Unknown Source)
at com.wm.ext.iaik.IaikSecureSocket.startHandshake(IaikSecureSocket.java:543)
at com.wm.ext.iaik.IaikSecureSocket.newSocket(IaikSecureSocket.java:495)
at com.wm.ext.iaik.IaikSecureSocket.createSocket(IaikSecureSocket.java:770)
at com.wm.net.socket.pool.SocketPool.getSocketWrapper(SocketPool.java:220)
at com.wm.net.socket.pool.SocketPoolManager._getSocketWrapper(SocketPoolManager.java:165)
at com.wm.net.socket.pool.SocketPoolManager.getSocketWrapper(SocketPoolManager.java:147)
at com.wm.net.NetURLConnection.getSocket(NetURLConnection.java:1018)
at com.wm.net.NetURLConnection.openDirectConnection(NetURLConnection.java:996)
at com.wm.net.NetURLConnection.connect(NetURLConnection.java:188)
at com.wm.net.HttpURLConnection.getOutputStream(HttpURLConnection.java:454)
at com.wm.net.HttpContext.getOutputStream(HttpContext.java:1020)
at com.wm.net.HttpContext.getOutputStream(HttpContext.java:996)
at com.wm.net.HttpContext.post(HttpContext.java:542)
at pub.clientimpl.http(clientimpl.java:1431)

Other Info:

wM version: 10.5
Java Version: 1.8.0_222 (52.0)

wM version: 10.3
Java Version: 1.8.0_181 (52.0)

Hi @Yogeshwar.Kabra

As a starting point kindly check if there is a Firewall in between either at your end or the Target AWS end. Might be that at the Network Level Traffic is being blocked or rejected, which can be resolved by getting the required Hostnames and IPs being Whitelisted at the required Firewall.

Hi Kailash,

Yes, I have already informed the network team to check on the same.

Except network changes, is there anything to be checked on this issue?

Hi @Yogeshwar.Kabra ,

In my previous experience usually this error was encountered due to Network/Firewall related Blocking. In the interim maybe you can attempt to run the Main Service or pub.client:http service to the AWS Lambda URL from different webMethods IS instances or environments/regions and see if the behaviour is same or different.

Additionally you make have a look on this thread