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



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

Error Messages Connection reset
at com.pega.apache.http.impl.conn.DefaultResponseParser.parseHead(
at com.pega.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(
at com.pega.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(
at com.pega.apache.http.impl.conn.AbstractClientConnAdapter.receiveResponseHeader(
at com.pega.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(
at com.pega.apache.http.protocol.HttpRequestExecutor.execute(
at com.pega.apache.http.impl.client.DefaultRequestDirector.tryExecute(
at com.pega.apache.http.impl.client.DefaultRequestDirector.execute(
at com.pega.apache.http.impl.client.AbstractHttpClient.execute(
at com.pega.apache.http.impl.client.AbstractHttpClient.execute(
at com.pegarules.generated.activity.ra_action_pyinvokerestconnector_ea5a601f5c30c4d8bb2e5da269e20397.step5_circum0(

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.


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.


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