Question

Getting exception com.pega.pegarules.pub.services.ConnectorException: Caught unhandled exception: java.net.SocketException: Connection reset in Connect-Rest

Hi Team,

I am getting following exception with the connect-rest integration. the same service I can able to hit over http, only with https I am getting the issue. Even I have imported keystore into the pega system(client provided .pfx file, as pega is not supporting the format I have changed this to .jks file using keytool) & created DSS https/allowAllHostnames , & set Value:true as this is not existed in my environment.

I have tried to ping the server from pega application server machine with ping command, even it is able to hit the service physical machine with the service machine name/IP Address.

Can you please suggest on this issue.

Exception Trace com.pega.pegarules.pub.services.ConnectorException: Caught unhandled exception: java.net.SocketException: Connection reset
Java Stack Trace
at com.pegarules.generated.activity.ra_action_pyinvokerestconnector_c8e6bb23a4b0e46307cb13a01a31b1ae.step5_circum0(ra_action_pyinvokerestconnector_c8e6bb23a4b0e46307cb13a01a31b1ae.java:1688)
at com.pegarules.generated.activity.ra_action_pyinvokerestconnector_c8e6bb23a4b0e46307cb13a01a31b1ae.perform(ra_action_pyinvokerestconnector_c8e6bb23a4b0e46307cb13a01a31b1ae.java:137)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3527)
at com.pegarules.generated.activity.ra_action_invoke_4dc028ab25da14c2d6798b84993f966a.step7_circum0(ra_action_invoke_4dc028ab25da14c2d6798b84993f966a.java:1002)
at com.pegarules.generated.activity.ra_action_invoke_4dc028ab25da14c2d6798b84993f966a.perform(ra_action_invoke_4dc028ab25da14c2d6798b84993f966a.java:172)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3527)
at com.pegarules.generated.activity.sh_action_completecase_6f39108f194772370ea22fe0cff1a4c0.step4_circum0(sh_action_completecase_6f39108f194772370ea22fe0cff1a4c0.java:442)
at com.pegarules.generated.activity.sh_action_completecase_6f39108f194772370ea22fe0cff1a4c0.perform(sh_action_completecase_6f39108f194772370ea22fe0cff1a4c0.java:118)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3527)
at com.pega.pegarules.session.internal.mgmt.Executable.doAction(Executable.java:3260)
at com.pegarules.generated.activity.ra_action_pyrunrecordexecute_0f739eeb61a9046be9a6d286a73f151a.step1_circum0(ra_action_pyrunrecordexecute_0f739eeb61a9046be9a6d286a73f151a.java:175)
at com.pegarules.generated.activity.ra_action_pyrunrecordexecute_0f739eeb61a9046be9a6d286a73f151a.perform(ra_action_pyrunrecordexecute_0f739eeb61a9046be9a6d286a73f151a.java:69)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3527)
at com.pega.pegarules.session.internal.mgmt.Executable.invokeActivity(Executable.java:10674)
at com.pegarules.generated.activity.ra_action_pzrunrecordexecute_f73998920c112079b42c8cca0a4e44ad.step11_circum0(ra_action_pzrunrecordexecute_f73998920c112079b42c8cca0a4e44ad.java:1009)
at com.pegarules.generated.activity.ra_action_pzrunrecordexecute_f73998920c112079b42c8cca0a4e44ad.perform(ra_action_pzrunrecordexecute_f73998920c112079b42c8cca0a4e44ad.java:245)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3527)
at com.pega.pegarules.session.internal.mgmt.base.ThreadRunner.runActivitiesAlt(ThreadRunner.java:646)
at com.pega.pegarules.session.internal.mgmt.PRThreadImpl.runActivitiesAlt(PRThreadImpl.java:467)
at com.pega.pegarules.session.internal.engineinterface.service.HttpAPI.runActivities(HttpAPI.java:3166)
at com.pega.pegarules.session.external.engineinterface.service.EngineAPI.processRequestInner(EngineAPI.java:390)
at sun.reflect.GeneratedMethodAccessor83.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:508)
at com.pega.pegarules.session.internal.PRSessionProviderImpl.performTargetActionWithLock(PRSessionProviderImpl.java:1301)
at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:1038)
at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:893)
at com.pega.pegarules.session.external.engineinterface.service.EngineAPI.processRequest(EngineAPI.java:331)
at com.pega.pegarules.session.internal.engineinterface.service.HttpAPI.invoke(HttpAPI.java:825)
at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl._invokeEngine_privact(EngineImpl.java:327)
at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl.invokeEngine(EngineImpl.java:270)
at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl.invokeEngine(EngineImpl.java:247)
at com.pega.pegarules.priv.context.JNDIEnvironment.invokeEngineInner(JNDIEnvironment.java:278)
at com.pega.pegarules.priv.context.JNDIEnvironment.invokeEngine(JNDIEnvironment.java:223)
at com.pega.pegarules.web.impl.WebStandardImpl.makeEtierRequest(WebStandardImpl.java:594)
at com.pega.pegarules.web.impl.WebStandardImpl.doPost(WebStandardImpl.java:390)
at sun.reflect.GeneratedMethodAccessor82.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:508)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:370)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingThrowable(PRBootstrap.java:411)
at com.pega.pegarules.boot.internal.extbridge.AppServerBridgeToPega.invokeMethodPropagatingThrowable(AppServerBridgeToPega.java:224)
at com.pega.pegarules.boot.internal.extbridge.AppServerBridgeToPega.invokeMethod(AppServerBridgeToPega.java:273)
at com.pega.pegarules.internal.web.servlet.WebStandardBoot.doPost(WebStandardBoot.java:121)
at com.pega.pegarules.internal.web.servlet.WebStandardBoot.doGet(WebStandardBoot.java:92)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:474)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:798)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1434)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1153)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:785)
at java.net.SocketInputStream.read(SocketInputStream.java:220)
at java.net.SocketInputStream.read(SocketInputStream.java:152)
at com.ibm.jsse2.a.a(a.java:79)
at com.ibm.jsse2.a.a(a.java:182)
at com.ibm.jsse2.as.a(as.java:883)
at com.ibm.jsse2.as.a(as.java:382)
at com.ibm.jsse2.e.read(e.java:16)
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_c8e6bb23a4b0e46307cb13a01a31b1ae.step5_circum0(ra_action_pyinvokerestconnector_c8e6bb23a4b0e46307cb13a01a31b1ae.java:1286)

Thanks,

Rohith

***Updated by moderator: Lochan to update Categories***

**Moderation Team has archived post**

This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.

Group Tags

Correct Answer
May 26, 2017 - 12:07pm

While reviewing the SR associated with this thread it was discovered that SA-37379 Unable to connect the service from connect-rest over https was created as a resolution. Please refer to this SA if you have the same question.

Comments

Keep up to date on this post and subscribe to comments

April 13, 2017 - 6:16pm

Can you ensure the following that you imported the certificates in the chain in the correct order into the JKS trustStore?

1. Import the certificates in the certificate chain in the order Root > Intermediate1 > Intermediate2 > Entity into a JKS keystore via JDK's keytool.
2. On the Connect-Rest rule there is a property that will allow you to specify a truststore with the needed certificates (created in Step1 above).

Refer - https://www.sslshopper.com/tomcat-ssl-installation-instructions.html

 

April 14, 2017 - 1:53pm
Response to @nkur.das_GCS

Thanks for guiding me Ankur,

Client has provided us .pfx file and the .cer files. so I have generated .jks type file(below specified statement) with the provided .pfx file. then imported the same into pega keystore data instance(Data-Admin-Security-Kestore). when I uploaded it asked for password, given the password for .jks file & referring this rule in connect-rest rule under Secure protocol configuration-->security settings.

 keytool -importkeystore -srckeystore mypfxfile.pfx -srcstoretype pkcs12 -destkeystore clientcert.jks -deststoretype JKS

Am I missing anything in the procedure.

Thanks for all your help

April 14, 2017 - 5:49pm
Response to RohithReddyJ

Hi rohit, 

Instead of importing the keystore can you import the certs from the .cer files to your own JKS keystore and see if that helps.

 

April 18, 2017 - 8:06am
Response to @nkur.das_GCS

Hi Ankur,

I have already tried that too, just imported certs to empty .jks file & referred the same in connect-rest. still getting the same issue.

I have attached debug logs to SR-B44552 yesterday. it may give more causes, if you have can access it. 

pls let me know if you get any idea with them.

Thanks for all your help.

Regards,

Rohith

 

April 18, 2017 - 10:04pm
Response to RohithReddyJ

Hi Rohith,

Since this issue is being investigated by the dedicated GCS engineer with specialized knowledge in this area, you can close the post.

 

April 19, 2017 - 2:00am
Response to KevinZheng_GCS

Thank you @Kevin for guiding them correctly.

@Rohith, As Kevin mentioned, we have an SR already and GCS team would be the right path to work with.

Once you find a resolution, feel free to share it as a comment in the thread. It will benefit all the users who might face the same issue in future.

Thanks!

Vidyaranjan | Community Moderator | Pegasystems Inc.

May 26, 2017 - 12:07pm

While reviewing the SR associated with this thread it was discovered that SA-37379 Unable to connect the service from connect-rest over https was created as a resolution. Please refer to this SA if you have the same question.

Marissa | Community Moderator | Pegasystems Inc.