About our remote server: it is an edge server behind a cellular modem with a static IP. The hostname of the device is mapped to the static IP address with the edge server manufacturer who owns the domain. Because of the nature of the connection, the first authentication call to the server can be slow (5 seconds), but this error comes up immediately on executing the http callout – typically in 3-5 ms. So it seems almost as if Salesforce isn’t allowing the callout to happen. Code sample below:
Been scratching my head on this for a few days – any ideas out there on avenues to pursue to try to figure this out?http http = new http();
httpRequest req = new httpRequest();
req.setEndpoint('HOSTNAME URL');
req.setMethod('POST');
req.setBody('JSON STRING AUTHENTICATION');
req.setHeader('Content-Type','application/json');
httpResponse resp = http.send(req);
string cookie = resp.getHeader('Set-Cookie');
string json = resp.getbody();
system.debug('cookie: '+cookie);
system.debug('json from login: '+json);
For benefit of anyone reading this in future - - we did ultimately solve this and it was a DNS problem with the host domain.