Question
Capgemini
IN
Last activity: 1 Mar 2017 20:35 EST
I am trying to call Web service with CONNECT REST & getting peer authentication error
Hi,
I am trying to call Web service(Containned data in JSON format) with CONNECT REST & getting peer authentication error.
That webservice hosted with SSL & I have already imported that certificate on lib/security/cacerts on java path & even imported in .keystore file which placed on root home directory, but still getting same issue.
Tomcat 7.57
Pega 717
Linux VM(Hosted on windows7)
Oracle 11g Data Base
Thanks,
Rohith
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
PEG
IN
Hi Rohith,
1)Did you run the web service with SOAP UI? If not can you run it in SOAP UI and see whether you are getting response or not.
2) Add the jvm arguments as below.
-Djavax.net.ssl.keyStore=C:/tomcat/client_keystore.keystore
-Djavax.net.ssl.keyStorePassword=client_keystore_pw_mypassword
-Djavax.net.ssl.trustStore= C:/tomcat/client_truststore.keystore
-Djavax.net.ssl.trustStorePassword= client_truststore_pw_mypassword
Incase if issue still persists after adding these settings at jvm level Could you please check whether web service is one way SSL or two way SSL?
Hope this helps!
Capgemini
IN
Thanks for your suggestions Ganga.
I have tried to run the webservice over SOAP UI & getting below exception. This service is exposed as REST, still can we run it in SOAP UI...
Error loading [https://sv-arg-jfrnt-d3.argenta.be:8306/portalserver/services/rest/v1/agencies]: org.apache.xmlbeans.XmlException: org.apache.xmlbeans.XmlException: error: Unexpected element: CDATA
As suggested, I have added jvm arguments, but still getting the sqme issue. Below is the log which i have copied from server.
2015-07-22 09:44:55,776 [http-bio-8080-exec-6] [ STANDARD] [ ] [nboardingFW:01.01.01] (ngineinterface.service.HttpAPI) ERROR Rohith - Proprietary information hidden: com.pega.pegarules.pub.PRRuntimeError
com.pega.pegarules.pub.PRRuntimeError: PRRuntimeError
at com.pega.pegarules.session.internal.mgmt.base.ThreadRunner.runActivitiesAlt(ThreadRunner.java:707)
at com.pega.pegarules.session.internal.mgmt.PRThreadImpl.runActivitiesAlt(PRThreadImpl.java:435)
at com.pega.pegarules.session.internal.engineinterface.service.HttpAPI.runActivities(HttpAPI.java:3252)
at com.pega.pegarules.session.external.engineinterface.service.EngineAPI.processRequestInner(EngineAPI.java:384)
at sun.reflect.GeneratedMethodAccessor69.invoke(Unknown Source)
Thanks for your suggestions Ganga.
I have tried to run the webservice over SOAP UI & getting below exception. This service is exposed as REST, still can we run it in SOAP UI...
Error loading [https://sv-arg-jfrnt-d3.argenta.be:8306/portalserver/services/rest/v1/agencies]: org.apache.xmlbeans.XmlException: org.apache.xmlbeans.XmlException: error: Unexpected element: CDATA
As suggested, I have added jvm arguments, but still getting the sqme issue. Below is the log which i have copied from server.
2015-07-22 09:44:55,776 [http-bio-8080-exec-6] [ STANDARD] [ ] [nboardingFW:01.01.01] (ngineinterface.service.HttpAPI) ERROR Rohith - Proprietary information hidden: com.pega.pegarules.pub.PRRuntimeError
com.pega.pegarules.pub.PRRuntimeError: PRRuntimeError
at com.pega.pegarules.session.internal.mgmt.base.ThreadRunner.runActivitiesAlt(ThreadRunner.java:707)
at com.pega.pegarules.session.internal.mgmt.PRThreadImpl.runActivitiesAlt(PRThreadImpl.java:435)
at com.pega.pegarules.session.internal.engineinterface.service.HttpAPI.runActivities(HttpAPI.java:3252)
at com.pega.pegarules.session.external.engineinterface.service.EngineAPI.processRequestInner(EngineAPI.java:384)
at sun.reflect.GeneratedMethodAccessor69.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.pega.pegarules.session.internal.PRSessionProviderImpl.performTargetActionWithLock(PRSessionProviderImpl.java:1188)
at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:926)
at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:811)
at com.pega.pegarules.session.external.engineinterface.service.EngineAPI.processRequest(EngineAPI.java:330)
at com.pega.pegarules.session.internal.engineinterface.service.HttpAPI.invoke(HttpAPI.java:839)
at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl._invokeEngine_privact(EngineImpl.java:315)
at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl.invokeEngine(EngineImpl.java:263)
at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl.invokeEngine(EngineImpl.java:240)
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:485)
at com.pega.pegarules.web.impl.WebStandardImpl.doPost(WebStandardImpl.java:290)
at sun.reflect.GeneratedMethodAccessor64.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:338)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingThrowable(PRBootstrap.java:379)
at com.pega.pegarules.boot.internal.extbridge.AppServerBridgeToPega.invokeMethodPropagatingThrowable(AppServerBridgeToPega.java:216)
at com.pega.pegarules.boot.internal.extbridge.AppServerBridgeToPega.invokeMethod(AppServerBridgeToPega.java:265)
at com.pega.pegarules.internal.web.servlet.WebStandardBoot.doPost(WebStandardBoot.java:118)
at com.pega.pegarules.internal.web.servlet.WebStandardBoot.doGet(WebStandardBoot.java:89)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.pega.pegarules.pub.services.ConnectorException: Caught unhandled exception: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
at com.pegarules.generated.activity.ra_action_pyinvokerestconnector_ea5a601f5c30c4d8bb2e5da269e20397.step5_circum0(ra_action_pyinvokerestconnector_ea5a601f5c30c4d8bb2e5da269e20397.java:1678)
at com.pegarules.generated.activity.ra_action_pyinvokerestconnector_ea5a601f5c30c4d8bb2e5da269e20397.perform(ra_action_pyinvokerestconnector_ea5a601f5c30c4d8bb2e5da269e20397.java:137)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3375)
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:3375)
at com.pegarules.generated.activity.sh_action_getbranchdetails_f18fa94fb620f257ed6fef4e28815c60.step2_circum0(sh_action_getbranchdetails_f18fa94fb620f257ed6fef4e28815c60.java:287)
at com.pegarules.generated.activity.sh_action_getbranchdetails_f18fa94fb620f257ed6fef4e28815c60.perform(sh_action_getbranchdetails_f18fa94fb620f257ed6fef4e28815c60.java:98)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3375)
at com.pega.pegarules.session.internal.mgmt.Executable.doAction(Executable.java:3096)
at com.pegarules.generated.activity.ra_action_pyrunrecordexecute_2bd86d392e84ac741a2083e8db29d3a9.step1_circum0(ra_action_pyrunrecordexecute_2bd86d392e84ac741a2083e8db29d3a9.java:190)
at com.pegarules.generated.activity.ra_action_pyrunrecordexecute_2bd86d392e84ac741a2083e8db29d3a9.perform(ra_action_pyrunrecordexecute_2bd86d392e84ac741a2083e8db29d3a9.java:69)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3375)
at com.pega.pegarules.session.internal.mgmt.Executable.invokeActivity(Executable.java:10450)
at com.pegarules.generated.activity.ra_action_pzrunrecordexecute_4cd34c6d9fc3e5a3369c6d2e321acb33.step8_circum0(ra_action_pzrunrecordexecute_4cd34c6d9fc3e5a3369c6d2e321acb33.java:787)
at com.pegarules.generated.activity.ra_action_pzrunrecordexecute_4cd34c6d9fc3e5a3369c6d2e321acb33.perform(ra_action_pzrunrecordexecute_4cd34c6d9fc3e5a3369c6d2e321acb33.java:193)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3375)
at com.pega.pegarules.session.internal.mgmt.base.ThreadRunner.runActivitiesAlt(ThreadRunner.java:641)
... 49 more
Caused by: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
at sun.security.ssl.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:421)
at com.pega.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:128)
at com.pega.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:398)
at com.pega.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:496)
at com.pega.apache.http.conn.scheme.SchemeSocketFactoryAdaptor.connectSocket(SchemeSocketFactoryAdaptor.java:62)
at com.pega.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:148)
at com.pega.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:149)
at com.pega.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:121)
at com.pega.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:573)
at com.pega.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:425)
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_ea5a601f5c30c4d8bb2e5da269e20397.step5_circum0(ra_action_pyinvokerestconnector_ea5a601f5c30c4d8bb2e5da269e20397.java:1274)
... 66 more
Pegasystems Inc.
IN
also could you please check ...
1. the version of JDK suggested should be 1.7
2. please check the authentication headers...
3. validate the headers and input data
4. run the same URL on SOAP UI
5. enable loggers on
- httpclient.wire.header
- httpclient.wire.content
- Rule_Obj_Activity.pyInvokeRESTConnector.Rule_Connect_REST.Action
Capgemini
IN
Thanks for your Suggestions phani.
Our JDK is 1.7 version only. As this is rest service, we didn't added any security headers. while i tried to hit the service via browser, its directly displaying the response.
I have tried to run the webservice over SOAP UI & getting below exception. This service is exposed as REST, still can we run it in SOAP UI...
Error loading [https://sv-arg-jfrnt-d3.argenta.be:8306/portalserver/services/rest/v1/agencies]: org.apache.xmlbeans.XmlException: org.apache.xmlbeans.XmlException: error: Unexpected element: CDATA
The failure is due to SSL handshake problem and your certs are not set right. SSL debug (-Djavax.net.debug=all) will help.
Capgemini
IN
Thank you very much for your inputs Ganga Babu...It's worked.
Thank you Phani & Vipin for your suggestions.
Thanks,
Rohith
PEG
IN
Hi Rohit,
Good to hear that suggested steps worked for you.
CapGemini
US
Hi Rohit I have added the aruguments but still facing the issue can you please let me know what you did other than jvm aruguments tio get the issue resolved