+ Start a Discussion
Sunny NarulaSunny Narula 

An Error in Callout to a WordPress API from Salesforce host on a particular server.

CALLOUT_REQUEST|[21]|
System.HttpRequest retrying request in response to handshake failure: sun.security.validator.ValidatorException:
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

EXCEPTION_THROWN|[21]|System.CalloutException: sun.security.validator.ValidatorException:
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

HEAP_ALLOCATE|[21]|Bytes:193
METHOD_EXIT|[6]|01p0S000000gM9K|cWebService_Callout.makePostCalloutDoctor(String)
FATAL_ERROR|System.CalloutException: sun.security.validator.ValidatorException:
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

I get this error on ONLY ONE server, the same code is working if API is hosted on another server. 

I m making a GET call from Salesforce to WordPress, to call a WordPress web service into salesforce.
It is not working when it is hosted on a particular server. However, if the same service is hosted on another server it works 

I have taken take of adding the details to Remote Site Settings.

Please guide with possible errors and solution to cross-check why that is not working on a particular server ONLY