Question


JP Morgan Chase & Co
US
Last activity: 1 Mar 2017 11:39 EST
httpproxy configuration ignored when using rest connector
Hello, We are using http proxy while calling invoking rest connectors. We have set "http.proxyHost" & "http.proxyPort" params as jvm arguments. when invoking rest connectors we see that these values are being logged as part of "pyInvokeRestConnector" activity. However we see that the request directly goes out from server instead of initended proxy server. We are on version 7.1.9 & Smart Dispute 7.1.4. Wanted to know if there are any additional configurations which need to be done on the server side and also advise if there are any hot fixes available for this issue?
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!


Pegasystems Inc.
IN
not that I'm aware of but, would it be convincing/okay to provide...
- jvm argument syntax?
- hope - jvm arguments are configured before stating up PRPC.
- sever information?
- any exceptions/observations at firewall settings?


JP Morgan Chase & Co
US
Below are jvm args we set in WAS
-Dhttp.proxyPort=8080
-Dhttp.proxyHost=abc.def.net
We were not provided by any specific logs by network team. But IT team confirmed that request packet traffic is initiated from IP of App server instead of Proxy server.
Updated: 21 Dec 2015 12:36 EST


Pegasystems Inc.
GB
Hi Alladi,
What version of PRPC are you using ? I just looked at the Activity on a PRPC719 system:
Rule-Connect-REST.pyInvokeRESTConnector (Pega-IntegrationEngine:07-10-19)
And I did 'Actions|View Java' : and I can see there is support for Proxy Server settings:
Hi Alladi,
What version of PRPC are you using ? I just looked at the Activity on a PRPC719 system:
Rule-Connect-REST.pyInvokeRESTConnector (Pega-IntegrationEngine:07-10-19)
And I did 'Actions|View Java' : and I can see there is support for Proxy Server settings:
//BUG-140473 : Support for proxy String proxyHost = System.getProperty("http.proxyHost"); if (proxyHost != null && proxyHost.length() > 0) { String proxyPort = System.getProperty("http.proxyPort"); int proxyPortInt = Integer.parseInt(proxyPort); // Instantiate new HttpHost for proxy config com.pega.apache.http.HttpHost proxy = new com.pega.apache.http.HttpHost( proxyHost, proxyPortInt); String proxyUser = System.getProperty("http.proxyUser"); if (proxyUser != null && proxyUser.length() > 0) { String proxyPwd = System .getProperty("http.proxyPassword"); // Set up Basic auth as Scheme for Proxy List<String> authpref = new ArrayList<String>(); authpref .add(com.pega.apache.http.client.params.AuthPolicy.BASIC); client .getParams() .setParameter( com.pega.apache.http.auth.params.AuthPNames.PROXY_AUTH_PREF, authpref); // Configure proxy Authentication details com.pega.apache.http.client.CredentialsProvider credsProvider = client .getCredentialsProvider(); credsProvider .setCredentials( new com.pega.apache.http.auth.AuthScope( proxyHost, proxyPortInt), new com.pega.apache.http.auth.UsernamePasswordCredentials( proxyUser, proxyPwd)); client.setCredentialsProvider(credsProvider);[...]
The BUG referenced at the top of the code ( BUG-140473) states that the change was made in PRPC715 (onwards) .
If you are a version < 715 , then the cleanest way to get the fix is to install 719 I would say.....
EDIT: I can see you are on version 719 already....
Can you do a 'view java' on your Activity and locate the Proxy Handling calls ?
You might want to add in some 'oLog.infoForced' onto a PRIVATE EDIT version of your Activity in Step 4 (where the Proxy support is mostly done).... and see whether it is being called or not....
Cheers
John


JP Morgan Chase & Co
US
Hi John, I tested it and proxyHost & proxyPort values are being logged when the invoke activity gets called. But when the request reaches firewall we see that it is being sent from app server instead of proxy server.


Pegasystems Inc.
GB
mmh interesting : what happens if you engineer a deliberate fail - can you set the PROXY host to your *real* proxy server's name, but set the PORT to something which has nothing listening on it....
Does this alter the behaviour or not ?
I assume your App Server and Proxy Server are on different physical machines (or at least on different network cards ?)
Cheers
John


Pegasystems Inc.
US
any resolution on this? I'm working on a ticket with exact same scenario?


JP Morgan Chase & Co
US
Hi Paul, No resolution yet our developers are working with PEGA on this issue.
Updated: 18 Jan 2016 4:13 EST


Is endpoint SSL/TLS protected ? If so, you need to use different set of JVM args, as outlined here : Java Networking and Proxies
Also, as John Pritchard-Williams mentioned, did you tried to simulate/deliberate failure ?


JP Morgan Chase & Co
US
We forced a deliberate failure and it was the same error unable to connect.
Our service endpoint is SSL enabled where as our proxy url is not. Do you suggest we use https jvm args instead of http???


Pegasystems Inc.
US
Yes, exactly. That is how we're proceeding. I'll let you know the results.
https.proxyHost + https.proxyPort


Societe Generale SA
FR
Did u get any success ?


Pegasystems Inc.
US
Have you considered using a remote IP valve?