MarisElsins / getMOSPatch

getMOSPatch V2 - Tool that helps downloading patches from My Oracle Support
58 stars 17 forks source link

Proxy settings #4

Closed fljdin closed 7 years ago

fljdin commented 7 years ago

From some production environments, I get java exception about proxy filtering despite declaring http_proxy or https_proxy env variables.

java.net.ConnectException: Connection refused
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:579)
        at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:637)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
        at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
        at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:934)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1302)
        at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)
        at getMOSPatch.getHttpInputStream(getMOSPatch.java:136)
        at getMOSPatch.DownloadFile(getMOSPatch.java:161)
        at getMOSPatch.DownloadString(getMOSPatch.java:239)
        at getMOSPatch.main(getMOSPatch.java:511)

Is it possible to pass some proxy arguments to jar file?

klauern commented 7 years ago

I have a pull request (#5) that addresses this issue for me. I know this works for me, but you may want to merge that in and try it yourself.

MarisElsins commented 7 years ago

I adjusted the README.md with the instructions on java tags you need to set to get it working behind a proxy (HTTPS or SOCKS)