Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 364992

Summary: Proxy settings doesn't works
Product: [Eclipse Project] Equinox Reporter: Rick <ricardoblanco78>
Component: p2Assignee: P2 Inbox <equinox.p2-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: elwynd, flexx, matthew, remy.suen, thomas
Version: 3.7.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard: stalebug

Description Rick CLA 2011-11-28 13:11:33 EST
Build Identifier: Eclipse 20110916-0149

Using Win7 64bit i configured eclipse proxy settings, but when i tried to get updates or open eclipse market i always got connections errors, i checked the log and always indicate proxy errors, i googled for this kind of errors and found that sometimes disabling SOCKS proxy have worked for someone, in my case it doesn't. So i opened org.eclipse.core.net.prefs file and found that the line proxiesEnabled=true were not at begging of file, it was in middle between HTTP and HTTPS configuration, so i moved this line below systemProxiesEnabled=false and now my configuration works, i think eclipse reads in certain order the parameters and when not found the string proxiesEnabled maybe it assumes there is no proxy configured, i hope this can help someone else.

My cfg file now is:

#Mon Nov 28 11:56:50 CST 2011
systemProxiesEnabled=false
proxiesEnabled=true  <---- this line was between HTTP and HTTPS config
proxyData/HTTP/host=xxx.xxx.xxx.xxx
proxyData/HTTP/hasAuth=true
proxyData/HTTP/port=xxxx
eclipse.preferences.version=1
proxyData/HTTPS/port=xxxx
proxyData/HTTPS/hasAuth=true
proxyData/HTTPS/host=xxx.xxx.xxx.xxx
org.eclipse.core.net.hasMigrated=true

Reproducible: Always
Comment 1 Remy Suen CLA 2011-12-02 14:59:36 EST
p2, please advise.
Comment 2 Elwyn Davies CLA 2012-09-27 08:06:36 EDT
I have also encountered this problem.

It appears to exist in all the recent releases (Helios, Indigo, Juno).

The machine on which I was operating is Intel Atom based, running Ubuntu 10.04LTS.

The site where I was working had a single common proxy for all protocols including HTTP, HTTPS and SOCKS.  I had the 'System Wide' proxy settings in operation within Ubuntu.  Selecting 'Native' in the 'Windows->Preferences->Network Connection' dialog thus set up proxies for all three protocols within Eclipse. 

I was attempting to install the Android ADT Plugin from Google.

With this setting the mechanisms for 'Help->Install New Software' and 'Help->Check for Updates' hung up reporting that it was not possible to access the software sites.  Moving to a situation where proxies were not required allowed the installation to proceed.  

Replacing 'Native' mode with 'Manual' mode and defining all three (HTTP, HTTPS, SOCKS) proxies did not alter the behaviour.

After some searching on the web, I found a reference that suggested that clearing the SOCKS proxy setting in 'Manual' (leaving just HTTP and HTTPS) might help.. and indeed it did in this case.

One additional point:
It appears that cancelling the failed (hung up) 'Check for Updates' or the process of determining what new software was offered did not fully stop the attempt to access the software sites.  Even after the dialog was removed the main Eclipse window reported that the program was 'Trying to access children of ADT Plugin ' (or some such) with a progress indicator stuck at 2%.  The shell from which Eclipse had been launched reported that the (software installation?) plugin had failed to stop the process and it should have done.
Comment 3 Matthew Piggott CLA 2012-09-27 10:29:46 EDT
I'm not sure what the complaint is, specifying a SOCKS proxy if you don't use one won't work.  This is also what would lead to the process taking a long time to cancel as the job will be be blocked as it waits for responses from a non-existent proxy.

(In reply to comment #2)
> I have also encountered this problem.
> 
> It appears to exist in all the recent releases (Helios, Indigo, Juno).
> 
> The machine on which I was operating is Intel Atom based, running Ubuntu
> 10.04LTS.
> 
> The site where I was working had a single common proxy for all protocols
> including HTTP, HTTPS and SOCKS.  I had the 'System Wide' proxy settings in
> operation within Ubuntu.  Selecting 'Native' in the
> 'Windows->Preferences->Network Connection' dialog thus set up proxies for
> all three protocols within Eclipse. 
> 
> I was attempting to install the Android ADT Plugin from Google.
> 
> With this setting the mechanisms for 'Help->Install New Software' and
> 'Help->Check for Updates' hung up reporting that it was not possible to
> access the software sites.  Moving to a situation where proxies were not
> required allowed the installation to proceed.  
> 
> Replacing 'Native' mode with 'Manual' mode and defining all three (HTTP,
> HTTPS, SOCKS) proxies did not alter the behaviour.
> 
> After some searching on the web, I found a reference that suggested that
> clearing the SOCKS proxy setting in 'Manual' (leaving just HTTP and HTTPS)
> might help.. and indeed it did in this case.
> 
> One additional point:
> It appears that cancelling the failed (hung up) 'Check for Updates' or the
> process of determining what new software was offered did not fully stop the
> attempt to access the software sites.  Even after the dialog was removed the
> main Eclipse window reported that the program was 'Trying to access children
> of ADT Plugin ' (or some such) with a progress indicator stuck at 2%.  The
> shell from which Eclipse had been launched reported that the (software
> installation?) plugin had failed to stop the process and it should have done.
Comment 4 Elwyn Davies CLA 2012-09-27 13:28:41 EDT
(In reply to comment #3)
> I'm not sure what the complaint is, specifying a SOCKS proxy if you don't
> use one won't work.  This is also what would lead to the process taking a
> long time to cancel as the job will be be blocked as it waits for responses
> from a non-existent proxy.
> 
> (In reply to comment #2)
> > I have also encountered this problem.
> > 
> > It appears to exist in all the recent releases (Helios, Indigo, Juno).
> > 
> > The machine on which I was operating is Intel Atom based, running Ubuntu
> > 10.04LTS.
> > 
> > The site where I was working had a single common proxy for all protocols
> > including HTTP, HTTPS and SOCKS.  I had the 'System Wide' proxy settings in
> > operation within Ubuntu.  Selecting 'Native' in the
> > 'Windows->Preferences->Network Connection' dialog thus set up proxies for
> > all three protocols within Eclipse. 
> > 
> > I was attempting to install the Android ADT Plugin from Google.
> > 
> > With this setting the mechanisms for 'Help->Install New Software' and
> > 'Help->Check for Updates' hung up reporting that it was not possible to
> > access the software sites.  Moving to a situation where proxies were not
> > required allowed the installation to proceed.  
> > 
> > Replacing 'Native' mode with 'Manual' mode and defining all three (HTTP,
> > HTTPS, SOCKS) proxies did not alter the behaviour.
> > 
> > After some searching on the web, I found a reference that suggested that
> > clearing the SOCKS proxy setting in 'Manual' (leaving just HTTP and HTTPS)
> > might help.. and indeed it did in this case.
> > 
> > One additional point:
> > It appears that cancelling the failed (hung up) 'Check for Updates' or the
> > process of determining what new software was offered did not fully stop the
> > attempt to access the software sites.  Even after the dialog was removed the
> > main Eclipse window reported that the program was 'Trying to access children
> > of ADT Plugin ' (or some such) with a progress indicator stuck at 2%.  The
> > shell from which Eclipse had been launched reported that the (software
> > installation?) plugin had failed to stop the process and it should have done.

So why is Eclipse accessing the SOCKS proxy? The URLs are either http: or https:?

Maybe some additional help information is needed here.  I was assuming that as with web browsers and the Ubuntu system wide settings, the SOCKS proxy would only be accessed if specifically asked for.  For example the Firefox proxy settings allow setting a  SOCKS host but it isn't normally used when accessing HTTP/HTTPS and there is no harm in setting the value.

Elwyn
Comment 5 Thomas Hallgren CLA 2014-03-20 03:32:50 EDT
We have users that encounters this problem with Kepler SR2. What's the story here? Why is Eclipse ignoring HTTP/HTTPS settings when a SOCKS setting is present?
Comment 6 Alexander Wessel CLA 2019-07-25 10:21:59 EDT
I have the problem describes at comment #2. Using a manual set of proxies and only requireing http and https, I cannot seem to reach anything if a socks proxy is set. What's more, I cannot uncheck the socks proxy entry. If I enter my http proxy as a socks proxy, software installs would stall at 2% reliably. So apparently regardless of wether a HTTP / HTTPS proxy value is set, and the checkbox is activated, SOCKS will be used.

If I clear the socks setting, I am not stuck at 2% but pretty much any URL that is called will end up in the error logs with "connection refused" and some PKIX errors (but that's a different kind of story, apparently I get a host certificate from the proxy no matter what URL I call, when the system seems to expect the certificate of the original URL or it cannot deal with my self-signed proxy certificate). Anyway, I don't HAVE a socks proxy, why can't I uncheck it?

The same URLs work just fine in a browser.

I'm using I20190605-1800, and can't update due to being unable to reach anything from within Eclipse.
Comment 7 Eclipse Genie CLA 2021-07-15 13:03:06 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.