Support Article
Http proxy setting in JVM is ignored by Connect-HTTP
SA-7672
Summary
The user has migrated their machines to a new data centre which now has an additional security to pass all outgoing requests via a proxy server. User have configured the proxy settings in JVM level and all the requests are picking up the proxy setting and going through the configured proxy. However a connect HTTP rule which is supposed to contact an external bank for payment gateway is failing as it is blocked in the firewall. This is because this HTTP request was not using the proxy setting and going out directly. User wants to know whether there is any configuration they could do to make sure the HTTP-Connect goes via the proxy server.
Error Messages
javax.net.ssl.SSLHandshakeException
Steps to Reproduce
1. Add new proxy rules to jvm custom properties
2. Complete transaction in application which fails to pick the proxy setting and gets blocked in firewall.
Root Cause
The root cause of this issue is Proxy Configuration settings not being configured in Step 2 of InvokeHTTPConnector activity. T
Resolution
This issue is resolved through the following local change:
1. Save a copy of the Activity ‘InvokeHTTPConnector’
2. Add the following code in Step 2 (Java Step):
//
if (client == null)
{
client = new com.pega.apache.commons.httpclient.HttpClient();
com.pega.apache.commons.httpclient.HostConfiguration hostConfiguration = client.getHostConfiguration();
hostConfiguration.setProxy("IAGPROXYNAME", 8080);
client.setHostConfiguration(hostConfiguration);
}
//
Published January 31, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.