Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Connection reset error when invoking REST connector

SA-17013

Summary



Calling a REST service from Pega results in a Connection reset. Able to connect to this REST service outside of Pega.


Error Messages



java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:208)
at java.net.SocketInputStream.read(SocketInputStream.java:134)
at com.ibm.jsse2.a.a(a.java:244)
at com.ibm.jsse2.a.a(a.java:35)
at com.ibm.jsse2.qc.a(qc.java:189)
at com.ibm.jsse2.qc.a(qc.java:513)
at com.ibm.jsse2.e.read(e.java:15)
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_ea5a601f5c30c4d8bb2e5da269e20397.step5_circum0(ra_action_pyinvokerestconnector_ea5a601f5c30c4d8bb2e5da269e20397.java:1274)


Steps to Reproduce



Invoke the REST Connector.


Root Cause



A defect or configuration issue in the operating environment. The load balancer was closing the connection due to the request exceeding a request-header limit when utilizing a base64-encoded SAML token. The Pega function, Default:EncodeBase64 was adding numerous linebreak characters in to its encoded output. The additional line breaks were causing the request header count to appear to exceed the maximum allowed.

Resolution



Perform the following local-change: 

Make an updated EncodeBase64 function by following the instructions in the below article to remove the linefeeds and then invoke the REST service from Pega.

https://pdn.pega.com/support-articles/base64encode-password-includes-crlf-and-fails-when-read

 

Published January 31, 2016 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us