• Nick S.
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies
Hi Folks - I am trying to make a callout from salesforce to a remote server and I keep getting the following error: unable to tunnel through proxy. Proxy returns "HTTP/1.1 503 Service Unavailable”. 
The callout we are making works seamlessly from Postman, Charles, or seemingly any other http client.  It also worked from Salesforce for one afternoon, but has since been non-functional with the above error.  The hostname has been added to remote site whitelist in salesforce.  I checked the traffic back and forth between my PC and server with wireshark and observed that the traffic is coming back from the same IP address it is being sent to. 

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:
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);

Been scratching my head on this for a few days – any ideas out there on avenues to pursue to try to figure this out?  
 
List<Contact> conList = new List<Contact>{
    new Contact(FirstName='aryan',LastName='jha',description='computer'),
        new Contact(FirstName='atul',LastName='kumar',description='Buisness')};                                };
system.debug(+ conList );
insert conList;
List<Contact>Listtoupdate=new List<Contact>();
for(Contact con: conList){
con.Title='i am a computer analyst';
con.phone='9827373773';
system.debug(+ Listtoupdate );
}
update conList;
Hi Folks - I am trying to make a callout from salesforce to a remote server and I keep getting the following error: unable to tunnel through proxy. Proxy returns "HTTP/1.1 503 Service Unavailable”. 
The callout we are making works seamlessly from Postman, Charles, or seemingly any other http client.  It also worked from Salesforce for one afternoon, but has since been non-functional with the above error.  The hostname has been added to remote site whitelist in salesforce.  I checked the traffic back and forth between my PC and server with wireshark and observed that the traffic is coming back from the same IP address it is being sent to. 

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:
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);

Been scratching my head on this for a few days – any ideas out there on avenues to pursue to try to figure this out?