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 by peer



REST Service is configured and a file is passed as a parameter. The file is uploaded to a binary rule and the value of the file parameter is set with the file source property of the Pega binary file. However, the REST Service does not provide any response.

Error Messages

** Caught unhandled exception: java.lang.RuntimeException: Connection reset by peer: socket write error.

Steps to Reproduce

  1. Pass a multipart input to a REST Service.
  2. Create an activity.
  3. Invoke the REST Connector from the activity.

Root Cause

The REST Service Configuration and Activity Property-SET to pass the multipart input was configured incorrectly.


Perform the following local-change:
  1. Perform a Property-SET with the below parameters before invoking the REST Connector in the activity.

        .pyAttachNames(1) – “file” (as expected in the external Service API)
        .pyAttachFileNames(1) - “File Name”
        .pyAttachTypes(1) – “multipart/form-data”
        .pyAttachValues(1) – fetchFile.pyFileSource

  2. Configure the POST method of the REST Service and add the appropriate headers and parameters. To pass any String parameters in the REST Service request body, perform the same in the Property-SET by adding .pyAttachNames (index).
  3. Set the form parameters as .pyAttachNames (index). Correspondingly, set .pyAttachValues (index) equal to the BASE 64 encoded value of the form paramter value.

     For example,

     .pyAttachNames(2) - "type"
               .pyAttachValues(2) - if the value is "pdf", set this property to BASE 64 encoded value for "pdf".

  4. Map the Response to an equivalent property.


Published August 29, 2018 - 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