Support Article
pyInvokeRESTConnector ignores proxy settings
Summary
User wants to use proxy (configured as command line parameters to JVM) to access REST Service using HTTPS.
Step 11 of pyInvokeRESTConnector has sort of support for proxy settings, but step 12 where the actual connection is made ignores these settings.
User also tried to use the code for BUG-140473, but the code itself only works for HTTP proxy settings per code review.
Error Messages
Caused by: java.net.UnknownHostException: XXXXXXXX: unknown error
at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:907)
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1302)
at java.net.InetAddress.getAllByName0(InetAddress.java:1255)
at java.net.InetAddress.getAllByName(InetAddress.java:1171)
at java.net.InetAddress.getAllByName(InetAddress.java:1105)
at com.pega.apache.http.impl.conn.DefaultClientConnectionOperator.resolveHostname(DefaultClientConnectionOperator.java:242)
at com.pega.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:130)
at com.pega.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:149)
at com.pega.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:121)
at com.pega.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:573)
at com.pega.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:425)
at com.pega.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:825)
at com.pega.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:759)
at com.pegarules.generated.activity.ra_action_pyinvokerestconnector_a547c6f3a0124a96e75a5034030f8e52.step12_circum0(ra_action_pyinvokerestconnector_a547c6f3a0124a96e75a5034030f8e52.java:2483)
... 82 more
Steps to Reproduce
1. Create Connect REST rule and then text with proxy settings passed as command line arguments.
2. Observe using TCPmon (or any other traffic monitoring tool) that PRPC still will try to use direct connection and will fail at step 12.
Root Cause
A defect in Pegasystems’ code or rules as pyInvokeRESTConnector ignores proxy settings.
Resolution
Apply HFix-30397.
Published January 5, 2017 - 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.