6

I`m making calls to the outbound REST API from Salesforce via Batch apex. Most of the calls are working fine, except in some cases, Im getting below error. For example, if I run 200 batches (with batch size as 1), Im getting atleast 10 batches fail per execution but remaining 190 work fine.

First error: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

10
+25

This happens when your endpoint uses a Load Balancer.

So when you make calls in quick succession the Load Balancer Splits them to different servers. This is the reason why it doesn't happen every time and in few occurrences.

enter image description here.

So in One of the end server, the certificate assigned is not valid or properly configured.

Once your 3rd party guy configures Valid certificate you will stop seeing this issue.

Salesforce only supports a certain set of certificates, you can view them here.

https://developer.salesforce.com/page/Outbound_Messaging_SSL_CA_Certificates

Image Source: Google.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.