Question
incessant technologies
IN
Last activity: 8 Jun 2020 7:48 EDT
java.net.socketexception:connection set
Hi
We are getting the below error when using Connect-Rest
Caught unhandled exception: java.lang.RuntimeException: java.net.SocketException: Connection reset
Can anyone help to know the root cause of issue
***Moderator Edit-Vidyaranjan: Updated Platform Capability***
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
US
Hi, Just check whether the below link helps you
https://community.pega.com/support/support-articles/unable-connect-service-connect-rest-over-https
incessant technologies
IN
Hi
But this issue is not constant.It is intermediate,so no use of changing domain name or anything,as it is successful sometimes and fails sometimes
Pegasystems Inc.
IN
Please provide the full stack trace of the exception?
Also check the below link it might be helpful to you:
https://collaborate.pega.com/question/getting-exception-compegapegarulespubservicesconnectorexception-caught-unhandled-exception
incessant technologies
IN
Here is the full stack trace attached
Alreday refered the link provided and updated this issue is not constant.It is intermediate,so no use of changing domain name or anything,as it is successful sometimes and fails sometimes
Pegasystems Inc.
IN
Hi Asma,
Is the Rest service up & running when you face this error.How's the network connectivity.Are you getting any other error before connection reset exception.
Whenever you face this error please consume the same rest webservice using postman & verify if you are getting result.
Thanks,
Abhinav
incessant technologies
IN
Hi Abhinav,
The service is up and running,as it is successfully for some records and fails for some other at same time
Pegasystems Inc.
IN
Hi Asma,
Can you check whether all the nodes can communicate with each other or not. You can take help of your server team , They will ping another node from one node.
Is the same node getting failed every time. Start analyzing logs of the failed node.Please let me know what all errors are present in pega rules log.
Thanks,
Abhinav
Anthem INC
US
Hi Abhinav, We are also facing similar issue with REST Connector. REST connector is failing intermittently with following error.
com.pega.pegarules.pub.services.ConnectorException: Caught unhandled exception: java.net.SocketException: Connection reset.
Do you have any resolution ?
Pegasystems Inc.
IN
Hi Venkat,
Can you please try to hit the REST url from postman & let me know the result,time taken to get the result.
Thanks,
Abhinav
Anthem
US
Hello Abhinav,
I have a similar issue where the REST connector is failing intermittently and I did try with POSTMAN and it was getting successful and time taken is 108ms. However, with SOAP UI, I am getting the "SocketException" / "The API Key for this resource is missing or invalid" but never successful(Please refer Screenshots). I also verified Pega Logs and this error is not limited to one specific node,all the nodes are getting this error. How to debug/resolve this issue?
Thanks,
Sarthwik
Thanks,
Sarthwik
Pegasystems Inc.
IN
Hi Sarthwik,
You said that pega - rest call fails intermittently.Did you verify network connection during that time.Can you replicate the scenario and share logs with me.
Thanks,
Abhinav
Anthem
US
Hi Abhinav,
9 out of 10 times,the rest connector is working as expected and Network connection seems to be good.Please find the logs below.Please let me know if you need anything else.
2020-01-06 09:56:39,342 [ PegaRULES-Batch-25] [NDARD] [D:02.08.01] ( Invoke.Rule_Connect_REST.Action) ERROR - com.pega.pegarules.pub.services.ConnectorException: Caught unhandled exception: java.net.SocketException: Connection reset
2020-01-06 09:56:39,343 [ PegaRULES-Batch-25] [NDARD] [D:02.08.01] ( internal.mgmt.Executable) ERROR - Exception
com.pega.pegarules.pub.services.ConnectorException: Caught unhandled exception: java.net.SocketException: Connection reset
at com.pegarules.generated.activity.ra_action_pyinvokerestconnector_eb7dafe6dac00116b03b951c8add1e9a.step12_circum0(ra_action_pyinvokerestconnector_eb7dafe6dac00116b03b951c8add1e9a.java:2913)
at com.pegarules.generated.activity.ra_action_pyinvokerestconnector_eb7dafe6dac00116b03b951c8add1e9a.perform(ra_action_pyinvokerestconnector_eb7dafe6dac00116b03b951c8add1e9a.java:260)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3500)
Hi Abhinav,
9 out of 10 times,the rest connector is working as expected and Network connection seems to be good.Please find the logs below.Please let me know if you need anything else.
2020-01-06 09:56:39,342 [ PegaRULES-Batch-25] [NDARD] [D:02.08.01] ( Invoke.Rule_Connect_REST.Action) ERROR - com.pega.pegarules.pub.services.ConnectorException: Caught unhandled exception: java.net.SocketException: Connection reset
2020-01-06 09:56:39,343 [ PegaRULES-Batch-25] [NDARD] [D:02.08.01] ( internal.mgmt.Executable) ERROR - Exception
com.pega.pegarules.pub.services.ConnectorException: Caught unhandled exception: java.net.SocketException: Connection reset
at com.pegarules.generated.activity.ra_action_pyinvokerestconnector_eb7dafe6dac00116b03b951c8add1e9a.step12_circum0(ra_action_pyinvokerestconnector_eb7dafe6dac00116b03b951c8add1e9a.java:2913)
at com.pegarules.generated.activity.ra_action_pyinvokerestconnector_eb7dafe6dac00116b03b951c8add1e9a.perform(ra_action_pyinvokerestconnector_eb7dafe6dac00116b03b951c8add1e9a.java:260)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3500)
at com.pegarules.generated.activity.ra_action_invoke_6a91441c4f6e5048b63360383ae1b952.step7_circum0(ra_action_invoke_6a91441c4f6e5048b63360383ae1b952.java:1002)
at com.pegarules.generated.activity.ra_action_invoke_6a91441c4f6e5048b63360383ae1b952.perform(ra_action_invoke_6a91441c4f6e5048b63360383ae1b952.java:172)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3500)
at com.pegarules.generated.activity.ra_action_getclmdetails_787507d3f22771e6b427af82da79892f.step7_circum0(ra_action_getclmdetails_787507d3f22771e6b427af82da79892f.java:718)
at com.pegarules.generated.activity.ra_action_getclmdetails_787507d3f22771e6b427af82da79892f.perform(ra_action_getclmdetails_787507d3f22771e6b427af82da79892f.java:178)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3500)
at com.pega.pegarules.session.internal.mgmt.Executable.invokeActivity(Executable.java:10519)
at com.pegarules.generated.activity.ra_action_getclmstatus_46ddd31ff25e0af1f7fce16f39111ee7.step2_circum0(ra_action_getclmstatus_46ddd31ff25e0af1f7fce16f39111ee7.java:280)
at com.pegarules.generated.activity.ra_action_getclmstatus_46ddd31ff25e0af1f7fce16f39111ee7.perform(ra_action_getclmstatus_46ddd31ff25e0af1f7fce16f39111ee7.java:89)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3500)
at com.pegarules.generated.flow.ra_action_submitgbdwgsauditresults_db4d13dff3d24e507f399ad25aab43e7.RunTaskActivity(ra_action_submitgbdwgsauditresults_db4d13dff3d24e507f399ad25aab43e7.java:5663)
at com.pegarules.generated.flow.ra_action_submitgbdwgsauditresults_db4d13dff3d24e507f399ad25aab43e7.Task_Utility1_circum0(ra_action_submitgbdwgsauditresults_db4d13dff3d24e507f399ad25aab43e7.java:1227)
at com.pegarules.generated.flow.ra_action_submitgbdwgsauditresults_db4d13dff3d24e507f399ad25aab43e7.perform(ra_action_submitgbdwgsauditresults_db4d13dff3d24e507f399ad25aab43e7.java:614)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3500)
at com.pegarules.generated.StartFlow_071017_Y4eQmw0Y6OuVgKxzwKWCmA.StartFlow07_10_17(StartFlow_071017_Y4eQmw0Y6OuVgKxzwKWCmA.java:167)
at com.pegarules.generated.StartFlow_071017_Y4eQmw0Y6OuVgKxzwKWCmA.invoke(StartFlow_071017_Y4eQmw0Y6OuVgKxzwKWCmA.java:76)
at com.pega.pegarules.generation.internal.library.LibraryRuntime.resolveAndinvokeFunctionViaReflection(LibraryRuntime.java:133)
at com.pega.pegarules.generation.internal.library.LibraryRuntime.invokeLibraryRuntime(LibraryRuntime.java:110)
at com.pega.pegarules.session.internal.mgmt.Executable.invokeLibraryRuntime(Executable.java:8955)
at com.pega.pegarules.priv.generator.LibrarySupport.resolveAndInvokeFunctionViaReflection(LibrarySupport.java:181)
at com.pegarules.generated.pega_procom_flow.StartFlow(pega_procom_flow.java:688)
at com.pegarules.generated.activity.ra_action_completeassignment_8fd843cab8c8d0313a5515ca79f06e62.step24_circum0(ra_action_completeassignment_8fd843cab8c8d0313a5515ca79f06e62.java:2411)
at com.pegarules.generated.activity.ra_action_completeassignment_8fd843cab8c8d0313a5515ca79f06e62.perform(ra_action_completeassignment_8fd843cab8c8d0313a5515ca79f06e62.java:517)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3500)
at com.pegarules.generated.callActivity_071017_xvj4o_pyNDBZ4Gy293rekg.callActivity07_10_17(callActivity_071017_xvj4o_pyNDBZ4Gy293rekg.java:122)
at com.pegarules.generated.callActivity_071017_xvj4o_pyNDBZ4Gy293rekg.invoke(callActivity_071017_xvj4o_pyNDBZ4Gy293rekg.java:82)
at com.pega.pegarules.generation.internal.library.LibraryRuntime.resolveAndinvokeFunctionViaReflection(LibraryRuntime.java:133)
at com.pega.pegarules.generation.internal.library.LibraryRuntime.invokeLibraryRuntime(LibraryRuntime.java:110)
at com.pega.pegarules.session.internal.mgmt.Executable.invokeLibraryRuntime(Executable.java:8955)
at com.pega.pegarules.priv.generator.LibrarySupport.resolveAndInvokeFunctionViaReflection(LibrarySupport.java:181)
at com.pegarules.generated.pega_rules_utilities.callActivity(pega_rules_utilities.java:1744)
at com.pegarules.generated.activity.ra_action_performflowaction_dcc0518232737c778d7b712de85b2ed5.step18_circum0(ra_action_performflowaction_dcc0518232737c778d7b712de85b2ed5.java:1706)
at com.pegarules.generated.activity.ra_action_performflowaction_dcc0518232737c778d7b712de85b2ed5.perform(ra_action_performflowaction_dcc0518232737c778d7b712de85b2ed5.java:365)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3500)
at com.pega.pegarules.session.internal.mgmt.Executable.invokeActivity(Executable.java:10519)
at com.pegarules.generated.activity.ra_action_resumeflow_791448c90bc318018f58d1da9f2aca95.step3_circum0(ra_action_resumeflow_791448c90bc318018f58d1da9f2aca95.java:439)
at com.pegarules.generated.activity.ra_action_resumeflow_791448c90bc318018f58d1da9f2aca95.perform(ra_action_resumeflow_791448c90bc318018f58d1da9f2aca95.java:103)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3500)
at com.pegarules.generated.callActivity_071017_xvj4o_pyNDBZ4Gy293rekg.callActivity07_10_17(callActivity_071017_xvj4o_pyNDBZ4Gy293rekg.java:122)
at com.pegarules.generated.callActivity_071017_xvj4o_pyNDBZ4Gy293rekg.invoke(callActivity_071017_xvj4o_pyNDBZ4Gy293rekg.java:82)
at com.pega.pegarules.generation.internal.library.LibraryRuntime.resolveAndinvokeFunctionViaReflection(LibraryRuntime.java:133)
at com.pega.pegarules.generation.internal.library.LibraryRuntime.invokeLibraryRuntime(LibraryRuntime.java:110)
at com.pega.pegarules.session.internal.mgmt.Executable.invokeLibraryRuntime(Executable.java:8955)
at com.pega.pegarules.priv.generator.LibrarySupport.resolveAndInvokeFunctionViaReflection(LibrarySupport.java:181)
at com.pegarules.generated.pega_rules_utilities.callActivity(pega_rules_utilities.java:1744)
at com.pegarules.generated.activity.ra_action_executesla_385b3e0f8d36abe26bfa86b4b22f803a.step19_circum0(ra_action_executesla_385b3e0f8d36abe26bfa86b4b22f803a.java:2107)
at com.pegarules.generated.activity.ra_action_executesla_385b3e0f8d36abe26bfa86b4b22f803a.perform(ra_action_executesla_385b3e0f8d36abe26bfa86b4b22f803a.java:434)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3500)
at com.pega.pegarules.session.internal.mgmt.Executable.invokeActivity(Executable.java:10519)
at com.pegarules.generated.activity.ra_action_processevent_b20b900d4f9f22f92e8fd368c9027da2.step7_circum0(ra_action_processevent_b20b900d4f9f22f92e8fd368c9027da2.java:735)
at com.pegarules.generated.activity.ra_action_processevent_b20b900d4f9f22f92e8fd368c9027da2.perform(ra_action_processevent_b20b900d4f9f22f92e8fd368c9027da2.java:198)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3500)
at com.pega.pegarules.session.internal.async.agent.QueueProcessor.runActivity(QueueProcessor.java:721)
at com.pega.pegarules.session.internal.async.agent.QueueProcessor.execute(QueueProcessor.java:602)
at com.pega.pegarules.session.internal.async.BatchRequestorTask.run(BatchRequestorTask.java:945)
at com.pega.pegarules.session.internal.PRSessionProviderImpl.performTargetActionWithLock(PRSessionProviderImpl.java:1237)
at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:986)
at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:879)
at com.pega.pegarules.session.internal.async.BatchRequestorTask.run(BatchRequestorTask.java:670)
at com.pega.jsr166backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:991)
at com.pega.jsr166backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:532)
at java.lang.Thread.run(Unknown Source)
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at sun.security.ssl.InputRecord.readFully(Unknown Source)
at sun.security.ssl.InputRecord.read(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readDataRecord(Unknown Source)
at sun.security.ssl.AppInputStream.read(Unknown Source)
at com.pega.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:149)
at com.pega.apache.http.impl.io.SocketInputBuffer.fillBuffer(SocketInputBuffer.java:110)
at com.pega.apache.http.impl.io.AbstractSessionInputBuffer.readLine(AbstractSessionInputBuffer.java:264)
at com.pega.apache.http.impl.conn.DefaultResponseParser.parseHead(DefaultResponseParser.java:98)
at com.pega.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:252)
at com.pega.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:281)
at com.pega.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:247)
at com.pega.apache.http.impl.conn.AbstractClientConnAdapter.receiveResponseHeader(AbstractClientConnAdapter.java:219)
at com.pega.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:298)
at com.pega.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125)
at com.pega.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:645)
at com.pega.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:464)
at com.pega.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:825)
at com.pega.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:759)
at com.pegarules.generated.activity.ra_action_pyinvokerestconnector_eb7dafe6dac00116b03b951c8add1e9a.step12_circum0(ra_action_pyinvokerestconnector_eb7dafe6dac00116b03b951c8add1e9a.java:2467)
Pegasystems Inc.
IN
Hi Sarthwik,
Please provide below details
1.Are you using https rest url?
2.Which version of pega?
3.httpclient jar version,you can find it in pr_engineclasses table.
4.Whether the same requests gets failed every time or Is it different?Are you trying to hit same method in web service.
Thanks,
Abhinav
Anthem
US
Hi Abhinav,
1.Yes,we are using https rest url
2.Our Pega version is 7.1.8
3.Httpclient jar version is "httpclient-4.3.5.jar"
4.Yes,same requests are failing everytime.
Thanks,
Sarthwik
Anthem
US
Hello Abhinav,
Do you have an update on this?
Thanks,
Sarthwik
Pegasystems Inc.
IN
Hi Sarthwik,
Please capture fiddler trace when you get this issue.Analyse it & find out the reason behind failure of request.
Thanks,
Abhinav
Updated: 8 Jun 2020 7:48 EDT
mfc
AE
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.