Bug 308035 - [Help] Help Contents gets "Connection Refused" when on VPN or behind authenticated proxy
Summary: [Help] Help Contents gets "Connection Refused" when on VPN or behind authenti...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: User Assistance (show other bugs)
Version: 3.5.2   Edit
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Target Milestone: 4.4 M7   Edit
Assignee: Chris Austin CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 338845
Blocks:
  Show dependency tree
 
Reported: 2010-04-03 15:11 EDT by David M. Karr CLA
Modified: 2015-05-11 08:34 EDT (History)
10 users (show)

See Also:


Attachments
Patch to connect Network Connections proxy settings to Help System URL connections (38.92 KB, patch)
2011-03-04 16:18 EST, Chris Austin CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David M. Karr CLA 2010-04-03 15:11:44 EDT
Build Identifier: M20100211-1343

When I'm in my office or home on VPN, when I try to bring up "Help Contents", it chugs for a bit and then gives "Connection Refused".  My Remote Connection settings are probably ok, because I have no trouble doing plugin updates.

If I'm at home and I temporarily disconnect from VPN and then try it again, it works fine.

I've tried setting "Help Contents" to "In an External Browser".  When I do that while on VPN, I see the following URLs show up in the address bar before it fails with "Connection Refused":

http://127.0.0.1:3317/help/index.jsp
http://135.209.96.227/

In my "Network Connections" settings, I have the following:
HTTP: my proxy hostname and port, with "Requires Authentication" checked, and my username and password, both verified (I wouldn't be able to update plugins without this).
HTTPS: Same as HTTP
SOCKS: "Requires Authentication" checked, and my username and password.

In the "Proxy bypass" section, I have "localhost" and "127.0.0.1".

Reproducible: Always
Comment 1 Chris Goldthorpe CLA 2010-04-04 00:04:03 EDT
It sounds more like a problem with your VPN intercepting calls to 127.0.0.1. If you are able to start the help system and view it when the VPN is down it then the help system is working correctly. I have not heard of this problem before.
Comment 2 David M. Karr CLA 2010-04-04 02:12:31 EDT
It would be an issue with the proxy, not the VPN.  I see the same issue when working from my office, which doesn't use the VPN.

However, I don't see how the proxy could get involved with this.  As I have "127.0.0.1" in the "Proxy bypass" list in Eclipse, it won't go through the proxy.
Comment 3 Chris Austin CLA 2010-04-05 08:48:06 EDT
David, can you try opening Internet Explorer and going to Tools -> Internet Options -> Connections -> LAN Settings.  I have seen the Eclipse Help use these proxy settings as opposed to the network settings in Eclipse.  Try checking the 'Bypass proxy server for local addresses' and see if you can connect to the help.
Comment 4 David M. Karr CLA 2010-04-05 10:54:41 EDT
Curious.  In my IE settings I had an automatic configuration script enabled.  I disabled that and checked the "proxy server" checkbox and put in the same proxy hostname that I have set in Eclipse, and checked the "Bypass proxy server for local addresses" checkbox.  I then set Eclipse to use the internal help browser.  With these settings, "Help Contents" displays properly.

I also noted without much surprise that even after I change the IE settings, if I had "Open help contents" set to "In an external browser" (where Firefox is my default), I get the same behavior as before, where I get "Connection refused".

So, is there a bug here?  Is this a known problem?  You imply that it's at least been seen before.
Comment 5 Chris Austin CLA 2010-04-05 11:26:55 EDT
Well, I am not sure if its a bug - I will defer to Chris G on it.  I know that the Eclipse browser seems to get most of its functionality from browsers that exist on the OS - in this case, Internet Explorer.  So its tough to say if we should or even can overwrite the Operating Systems browser proxy settings.
Comment 6 David M. Karr CLA 2010-04-05 11:51:25 EDT
If Eclipse can't override the OS proxy settings, then I'd say that presenting a dialog that says that it can is a bug.

I also wonder if the connection set up for "Help" is different from the connection set up for the Update Manager.  I've never had any trouble doing plugin updates, but it won't work if I don't have my proxy host set in the Eclipse connection settings.  The difference may be just remote vs. local.
Comment 7 Chris Austin CLA 2010-04-05 14:59:58 EDT
(In reply to comment #6)
> If Eclipse can't override the OS proxy settings, then I'd say that presenting a
> dialog that says that it can is a bug.

> I also wonder if the connection set up for "Help" is different from the
> connection set up for the Update Manager.  I've never had any trouble doing
> plugin updates, but it won't work if I don't have my proxy host set in the
> Eclipse connection settings.  The difference may be just remote vs. local.


The dialog that you are referring to, Network Connections preferences do affect Eclipse, just not necessarily all parts of Eclipse.  As you yourself have seen, it does affect the Update Manager, but not the help.  So maybe we need to be clear on what it does affect versus what it does not.
Comment 8 Chris Goldthorpe CLA 2010-04-05 15:32:56 EDT
I agree that it is a problem that the Network Connection preferences do not affect the help system, or anything else hosted on the Equinox Web Server.
Comment 9 Andres Alcarraz CLA 2010-07-10 03:40:52 EDT
(In reply to comment #7)

> 
> The dialog that you are referring to, Network Connections preferences do affect
> Eclipse, just not necessarily all parts of Eclipse.  As you yourself have seen,
> it does affect the Update Manager, but not the help.  So maybe we need to be
> clear on what it does affect versus what it does not.

But how the hell can I set the proxy ignored hosts? I'm in linux, but the problem is the same, I have the system proxy settings to use a proxy on normal urls but bypass in localhost and 127.0.0.1.

In firefox those preferences are used correctly and I can conencto to the help system, but I would like to use the internal help at least for the context help so that it appears at the side of the dialog I'm using.

I've been able to not to use the proxy at all by unsetting the http[s]_proxy environment variable but I would like to be able to only bypass proxy for local connections, how can I do that? I didn't found anything yet on google, I'll keep trying.

Thanks in advance
Comment 10 Andres Alcarraz CLA 2010-07-10 05:37:23 EDT
Finally I could bypass 127.0.0.1 so that help works as expected, I set the no_proxy environment variable as follows:
no_proxy=127.0.0.1,localhost

You can do that in the script that launches eclipse, or more globally, I did in /etc/environment as I'm using ubuntu and it reads the global environment options from there.
Comment 11 Wojciech Galanciak CLA 2010-10-08 07:07:22 EDT
Internal browser (which is used in help system) does not use Eclipse proxy settings. Anders mentioned a workaround for this issue. I think that this bug should be closed and work should be continued in bug 301424.
Comment 12 Chris Austin CLA 2011-03-04 16:18:16 EST
Created attachment 190446 [details]
Patch to connect Network Connections proxy settings to Help System URL connections

This patch attempts to force all URL connections to use proxy settings found in Window -> Preferences -> General -> Network Connections.

I do not have a proxy environment in which to test this, so it is very much theoretical.  It is important to note that there is a line where the browser proxy settings are used instead of the Network Connections, but due to the complexity of remote help, it is hard to explain exactly where that line is ;).  If anyone has a proxy environment to test this patch in I would be much obliged.
Comment 13 Chris Austin CLA 2011-09-30 11:03:08 EDT
We have had some testing of this code and it does adhere to the proxy network settings, I recommend we move to Java 1.5 (Bug 338845) and commit this.
Comment 14 Martin Oberhuber CLA 2013-03-11 19:07:24 EDT
For the records, bug 301424 has a Linux variant of the problem while this talks about a Windows variant. 

I haven't been able to test / reproduce, but I think that the Windows problem is actually fixed as of Eclipse 3.8 or later; the SWT FAQ talks about the Internet Explorer component always picking up Proxy Settings from the System, and not from Eclipse.
Comment 15 Chris Austin CLA 2013-05-28 11:40:35 EDT
I just restested this in 4.2, and setting a proxy has no effect on what help is displayed from a remote infocenter.  Maybe we can commit in 4.4?
Comment 16 Chris Austin CLA 2014-04-01 09:10:06 EDT
OK, I have submitted the patch for review against Gerrit - what are the next steps?

New Changes:
  https://git.eclipse.org/r/24220
Comment 17 Paul Webster CLA 2014-04-04 14:09:18 EDT
If you fix the comment on the review, amend your commit, and push it again for review, it's probably ready to go in.

I usually right-click on the repository and use Fetch From Gerrit... to get the latest change, before making more changes, amending the commit, and pushing it back up for review.

PW
Comment 19 Paul Webster CLA 2014-04-29 08:42:54 EDT
Chris, could you please verify this works as expected in a current 4.4 I build?

PW
Comment 20 Chris Austin CLA 2014-04-29 09:45:37 EDT
I have verified this is working as expected in I20140428-2000.
Comment 21 Teun van de Berg CLA 2015-05-11 08:34:51 EDT
(In reply to Chris Austin from comment #12)
> Created attachment 190446 [details]
> Patch to connect Network Connections proxy settings to Help System URL
> connections
> 
> This patch attempts to force all URL connections to use proxy settings found
> in Window -> Preferences -> General -> Network Connections.

I doubt that this issue is fully resolved. I'm using Eclipse 4.4.2 and as far as I understand have the exact issue David M. Karr has initially reported. I've set the proxy settings in Eclipse and set Eclipse to bypass the proxy for "localhost" and "127.0.0.1". Eclipse is able to download updates. Eclipse is not able to display help contents. This makes sense as Internet Explorer is configured to use a pac script which contains an error. Due to the pac script URLs starting with http://127.0.0.1 cannot be connected to. This is also seen in IE. When I manually set the proxy settings in IE Eclipse is able to locate the help files.
This makes me conclude the the IE settings are used to open the help contents rather than the Eclipse settings.