New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Processing doesn't work behind authenticated proxy (update checks, library manager...) #1476

Closed
processing-bugs opened this Issue Feb 10, 2013 · 5 comments

Comments

Projects
None yet
3 participants
@processing-bugs

processing-bugs commented Feb 10, 2013

Original author: eoin.ros...@gmail.com (December 04, 2012 16:47:50)

Or maybe this is a feature request for a processing.exe flag to use system proxy, I have no idea what I'm doing.

Also would be awesome if the library updater could consider those unfortunate souls behind corporate proxies when it is implemented.

What steps will reproduce the problem?
When behind an auth'd proxy, simply opening a blank sketch and waiting for the built-in delay you get the error below

What is the expected output? What do you see instead?
java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:525)
at java.net.Socket.connect(Socket.java:475)
at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:233)
at sun.net.www.http.HttpClient.New(HttpClient.java:306)
at sun.net.www.http.HttpClient.New(HttpClient.java:323)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:860)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:801)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:726)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1049)
at java.net.URL.openStream(URL.java:1010)
at processing.app.UpdateCheck.readInt(UpdateCheck.java:131)
at processing.app.UpdateCheck.updateCheck(UpdateCheck.java:93)
at processing.app.UpdateCheck$1.run(UpdateCheck.java:63)
at java.lang.Thread.run(Thread.java:619)

What version of the product are you using? On what operating system?
2.0b6

Please provide any additional information below.

Note: Please do not link to locations on other sites, such as your own
image site, video site, blog, etc. Include the relevant information here
with the report.

Original issue: http://code.google.com/p/processing/issues/detail?id=1438

@processing-bugs

This comment has been minimized.

Show comment
Hide comment
@processing-bugs

processing-bugs Feb 10, 2013

From f...@processing.org on December 05, 2012 00:05:29
Huh, surprised nobody has filed this earlier.

processing-bugs commented Feb 10, 2013

From f...@processing.org on December 05, 2012 00:05:29
Huh, surprised nobody has filed this earlier.

@processing-bugs

This comment has been minimized.

Show comment
Hide comment
@processing-bugs

processing-bugs Feb 10, 2013

From expre...@gmail.com on January 25, 2013 20:01:12
I am seeing the same error on 2.07b

processing-bugs commented Feb 10, 2013

From expre...@gmail.com on January 25, 2013 20:01:12
I am seeing the same error on 2.07b

@processing-bugs

This comment has been minimized.

Show comment
Hide comment
@processing-bugs

processing-bugs Feb 10, 2013

From f...@processing.org on January 25, 2013 20:15:17
Yes, of course; and you will continue to see it until someone implements support for proxy servers. Nobody said anything had been done about it.

processing-bugs commented Feb 10, 2013

From f...@processing.org on January 25, 2013 20:15:17
Yes, of course; and you will continue to see it until someone implements support for proxy servers. Nobody said anything had been done about it.

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Aug 7, 2013

Member

Added to preferences.txt for the next release (whatever comes after 2.0.1).

# HTTP PROXY
# Set a proxy server for folks that require it. This will allow the update
# checker and the contrib manager to run properly in those environments. 
proxy.host=proxy.example.com
proxy.port=8080

You'll need to add the proxy.host and proxy.port lines to preferences.txt.

More details here, which might help with how to use this for exported apps:
http://docs.oracle.com/javase/6/docs/technotes/guides/net/proxies.html

Member

benfry commented Aug 7, 2013

Added to preferences.txt for the next release (whatever comes after 2.0.1).

# HTTP PROXY
# Set a proxy server for folks that require it. This will allow the update
# checker and the contrib manager to run properly in those environments. 
proxy.host=proxy.example.com
proxy.port=8080

You'll need to add the proxy.host and proxy.port lines to preferences.txt.

More details here, which might help with how to use this for exported apps:
http://docs.oracle.com/javase/6/docs/technotes/guides/net/proxies.html

@benfry benfry closed this Aug 7, 2013

benfry added a commit that referenced this issue Aug 7, 2013

@dimkir

This comment has been minimized.

Show comment
Hide comment
@dimkir

dimkir Aug 25, 2013

Under:

  • Win7 64x
  • Processing 2.0.2

Seems like setting
proxy.host and proxy.port parameters in preferences.txt doesn't make neither PDE neither sketches use proxy.

Steps to reproduce (the simpliest way without having working proxy server to test):

  1. set up "fake" proxy settings in preferences.txt (ie. pointing to closed port on localhost)
  2. Run sketch which will attempt to download something (and also print out java proxy settings)
  3. If bug is present, your sketch will succeed in downloading and java proxy settings would be null.
    Below is a sketch which implements this. It displays java variables http.proxyHost and http.proxyPort
    https://github.com/dimkir/processingForumSnippets/blob/master/proxyPrint/proxyPrint.pde

Here's picture with summary of the sketches work:
Image

First I thought that proxy support simply wasn't included in 2.0.2 release, however the commit which adds proxy support f88c10e was made on the 7 August, and processing 2.0.2 was released 14 August 2013. So it seems that this commit should have been included into 2.0.2.

Also seems like #2026 is related to this issue somehow. Seems that similar stacktrace can be triggered not only by "Library download", but in more broad sense by PDE trying to access some URL (Tool list , library list, contributions.txt)

dimkir commented Aug 25, 2013

Under:

  • Win7 64x
  • Processing 2.0.2

Seems like setting
proxy.host and proxy.port parameters in preferences.txt doesn't make neither PDE neither sketches use proxy.

Steps to reproduce (the simpliest way without having working proxy server to test):

  1. set up "fake" proxy settings in preferences.txt (ie. pointing to closed port on localhost)
  2. Run sketch which will attempt to download something (and also print out java proxy settings)
  3. If bug is present, your sketch will succeed in downloading and java proxy settings would be null.
    Below is a sketch which implements this. It displays java variables http.proxyHost and http.proxyPort
    https://github.com/dimkir/processingForumSnippets/blob/master/proxyPrint/proxyPrint.pde

Here's picture with summary of the sketches work:
Image

First I thought that proxy support simply wasn't included in 2.0.2 release, however the commit which adds proxy support f88c10e was made on the 7 August, and processing 2.0.2 was released 14 August 2013. So it seems that this commit should have been included into 2.0.2.

Also seems like #2026 is related to this issue somehow. Seems that similar stacktrace can be triggered not only by "Library download", but in more broad sense by PDE trying to access some URL (Tool list , library list, contributions.txt)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment