Skip to main content
Hello,

    We recenlty started getting the below error, when making an API call to the external service from our production environment. It is used to work fine before. We tried the same request on the sandbox and it worked fine. The error is coming only on the production environment.

System.CalloutException: Unexpected end of file from server

Here is the debug logs

12:00:01.0 (50849486)|CALLOUT_REQUEST|[79]|System.HttpRequest[Endpoint=https://cdi.services.com/xml.php?_[action]=auth&login=7001, Method=POST]

12:01:00.330 (59330812477)|EXCEPTION_THROWN|[79]|System.CalloutException: Unexpected end of file from server

12:01:00.330 (59330998366)|HEAP_ALLOCATE|[79]|Bytes:38

12:01:00.330 (59331033533)|METHOD_EXIT|[7]|01pU0000001VF2s|CentahCallout.getAccessToken()

12:01:00.330 (59331077545)|VARIABLE_SCOPE_BEGIN|[18]|ex|Exception|true|false

12:01:00.330 (59331184122)|VARIABLE_ASSIGNMENT|[18]|ex|"common.apex.runtime.impl.ExecutionException: Unexpected end of file from server"|0x568e9c7d

12:01:00.330 (59331191367)|STATEMENT_EXECUTE|[18]

I really app

 
3 answers
  1. Mar 1, 2017, 5:26 AM
    HI Manoj,

    The receiving server had a firewall blocking the sf IP addresses (and just about everything else too). Persuaded them to temporarily give access and the callout worked straight away.... hope this info is useful to others in the community!

    The problem is with the firewall settings. My app's firewall has been blocking the traffic from external IPs. Once we added the IP to whitelist, everything is fine.

    Thanks !
0/9000