This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 136036

Summary: Option "Use System Proxy Settings" Does Not Work
Product: platform Reporter: tomwheeler <tomwheeler>
Component: -- Other --Assignee: Jiri Rechtacek <jrechtacek>
Status: REOPENED ---    
Severity: blocker CC: anebuzelsky, BullfrogBlues, chris_lu, hummeling, juhrik, lfischmeistr, lvwarren, mentlicher, pjiricka, puce
Priority: P2    
Version: 6.x   
Hardware: All   
OS: Windows XP   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on:    
Bug Blocks: 142827, 193689    

Description tomwheeler 2008-05-28 20:05:46 UTC
Due to some changes in the local LAN where I work, I must now use an HTTP proxy server for Internet access.  I have
noticed upon installing NetBeans that setting the option to "Use System Proxy Settings" (Tools->Options->General->Proxy
Settings) does not work.

Steps to reproduce:

0.  Internet Explorer is configured with the proxy server.  In the case of IE, this is done using the "automatic
configuration script" (the .pac file that MSIE recognizes and uses to configure itself).  Since the dialog used to
configure this is also available in the control panel under "Internet Options," I figure this is what is meant by
"system proxy settings."

1.  Click Tools->Options->General->Proxy Settings and select the radio button for "Use System Proxy Settings".

2.  Click Tools->Plugins->Installed->Reload Catalog.  I am shown an error dialog which says
"java.net.UnknownHostException" for updates.netbeans.org.   Note that the network here is set up in such a way that I
cannot resolve the IP for hosts on the internet; that is done by the proxy.

The workaround is to click Tools->Options->General->Proxy Settings and select the radio button for "Manual Proxy
Settings."  I type in the host and port number for the proxy server.
Comment 1 Lukas Hasik 2008-05-29 07:56:41 UTC
reassigning to Jirka who did a changes in proxy recently
Comment 2 Antonin Nebuzelsky 2010-11-02 12:29:38 UTC
Might be related to what is described in the following JDK bug report:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6951774

Can you check if setting your proxy.pac in Control Panel / Java / Network Settings the expected way (see the JDK bug) helps?

Thanks.
Comment 3 chris_lu 2010-11-02 12:59:29 UTC
(In reply to comment #2)

 Tried the workaround and all related possibilities. It does not work for me.


> Might be related to what is described in the following JDK bug report:
> 
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6951774
> 
> Can you check if setting your proxy.pac in Control Panel / Java / Network
> Settings the expected way (see the JDK bug) helps?
> 
> Thanks.
Comment 4 Yulia Novozhilova 2010-12-21 16:12:26 UTC
*** Bug 193683 has been marked as a duplicate of this bug. ***
Comment 5 driscoll 2011-01-04 19:08:56 UTC
I'm also seeing use system proxy settings not working on my work network, which is the Oracle Corporate network.

I'm seeing this on my Mac.  Let me know if you need more data.
Comment 6 Jiri Rechtacek 2011-01-07 13:34:42 UTC
We know this problem. I'm investigating possible solution - very probably it needs to change current approach in IDE. I let you know once a solution found and can be integrated into code, best within NB7.0.
Comment 7 Yulia Novozhilova 2011-01-19 16:46:56 UTC
*** Bug 194047 has been marked as a duplicate of this bug. ***
Comment 8 Jiri Rechtacek 2011-01-20 14:31:25 UTC
It should be fixed in core-main/rev/66b384c2cd0e
IDE now reads PAC files from system if any and interprets it while finding proxy for given URL. It means, IDE finds a corresponing proxy for each URL what connects from IDE. java.net.ProxySelector.getDefault() called in NetBeans Platform returns these proxies.
Comment 9 tomwheeler 2011-01-25 17:39:12 UTC
Jirka,

Should I expect that it should work in the January 25 trunk build?  Because it doesn't, so I am reopening.

Using the following configuration:

Product Version: NetBeans IDE Dev (Build 201101250001)
Java: 1.6.0_23; Java HotSpot(TM) Client VM 19.0-b09
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
Userdir: C:\Documents and Settings\twheeler\.netbeans\proxytesting

I started the IDE and verified that Tools -> Options -> General showed "Use system proxy settings" selected.  But when I went to Tools -> Plugins -> Updates and clicked the "Reload Catalog" button, it failed with the following message (reformatted here for clarity):

    Unable to connect to the Latest Development Build 
    because of deadlock.netbeans.org

    Check your proxy settings or try again later. 
    The server may be unavailable at the moment. 

    You may also want to make sure that your 
    firewall is not blocking network traffic.
Comment 10 Jiri Rechtacek 2011-01-26 15:35:47 UTC
Tom, you are right, the build 20110125 should contain it. There are several possibilities what's wrong:
- failed detection PAC file on your system
- cannot resolve that file
- returning wrong results.
Please, make sure your system is set to use Automatic Proxy Configuration and contains correct URL. Run you IDE with switch -J-Dorg.netbeans.core.ProxyAutoConfig.level=-1 for more verbose output and attach your messages. It might help to evaluate/fix this problem. Thank you
Comment 11 tomwheeler 2011-01-26 16:18:36 UTC
I tried changing a few options in Internet Explorer (such as switching from a proxy.pac script to a hardcoded proxy name/port number), but they had no effect.  I used the log option you mentioned and it didn't have anything that I think would be very useful to you.  

Our network is set up in a fairly unusual way, and since I know that the IDE and platform applications work OK when the proxy name/port is hardcoded, it's not a showstopper for me, and probably not worthwhile to ensure automatic detection works in this case.  

I am more concerned with whether it works for the typical corporate network, so I will step back so someone else on the CC list who experienced the problem can verify whether it's fixed now.
Comment 12 Jiri Rechtacek 2011-01-26 18:35:54 UTC
> --- Comment #11 from tomwheeler<tomwheeler@netbeans.org>   2011-01-26 16:18:36 ---
> I tried changing a few options in Internet Explorer (such as switching from a
> proxy.pac script to a hardcoded proxy name/port number), but they had no
> effect.  I used the log option you mentioned and it didn't have anything that I
> think would be very useful to you.
There is a proxy info detected from your system among other system properties in log, not if no other log messages found in your log means proxy.pac wasn't be detected. Your log could be helpful still.

> Our network is set up in a fairly unusual way, and since I know that the IDE
> and platform applications work OK when the proxy name/port is hardcoded, it's
> not a showstopper for me, and probably not worthwhile to ensure automatic
> detection works in this case.
Okay.

> I am more concerned with whether it works for the typical corporate network, so
Oracle corporate uses PAC way for network setting, it gives me a chance to attend to this issue. PAC detection and reading proxies from it works for me now.
> I will step back so someone else on the CC list who experienced the problem can
> verify whether it's fixed now.
Well, I'll close it as fixed again and made it possible for other verify or reopen it.
Comment 13 Yulia Novozhilova 2011-02-09 10:35:39 UTC
*** Bug 195137 has been marked as a duplicate of this bug. ***
Comment 14 cerubim 2011-02-18 20:54:15 UTC
Hello!

I have the same issue as the original poster. I am behind a corporate network that has "Use automatic configuration script" for LAN settings. I am able to access the Internet with a browser but NetBeans6.9.1 Build 201007282301 won't connect to check for updates or load the plugin catalog returning connection timeout if I "Use system proxy settings".

Which files should I upload if I run netbeans with the above mentioned parameters for extra logs?

Thanks.
Comment 15 Jiri Rechtacek 2011-02-18 21:07:32 UTC
Fixed in NetBeans 7.0 release. You can download & try NetBeans 7.0 beta2 - http://download.netbeans.org/netbeans/7.0/beta2/
If you find any problem in 7.0beta2 or newer build, please file new issue with detail description what seems to be wrong instead of reopening this RFE. Thank you
Comment 16 cerubim 2011-02-22 18:08:44 UTC
This issue has not been solved neither in 6.9.1 as stated above, neither in 7.0
Neither versions can coonect for updates, to the Internet, using system proxy settings.
Instead of opening a new bug, this one provides the most info to the problem.
Which commit solved this issue in 7.0 release?
Comment 17 Jiri Rechtacek 2011-02-23 07:06:41 UTC
cerubim, stop reopeing this issue. File new one (product platform/component Other) with detail description what's your proxy settings in your system, attach your messages.log (found in IDE View|IDE Log). It helps to evaluate the problem. Thanks
Comment 18 BullfrogBlues 2012-01-31 15:51:49 UTC
+1 same issue 7.1

Very annoying, so is the bug tracker, it's a mess.
Comment 19 BullfrogBlues 2012-01-31 15:52:31 UTC
+1 same issue 7.1

Very annoying, so is the bug tracker, it's a mess.
Comment 20 sreevals 2012-04-03 11:37:11 UTC
I have downloaded NetBeans IDE 7.1.1 (Build 201203012225). Issue still exists :(
Comment 21 Jiri Rechtacek 2012-04-03 12:28:15 UTC
Everyone. Stop reopening this enhancement.

(In reply to comment #20)
> I have downloaded NetBeans IDE 7.1.1 (Build 201203012225). Issue still exists
What issue? File it as new issue (product: platform/component: Other) with detail description what's your proxy settings in your system, attach your messages.log (found in IDE View|IDE Log). It helps to evaluate the problem. Thanks
Comment 22 BullfrogBlues 2012-12-04 14:55:12 UTC
This is not fixed in 7.2.1, at least not on Ubuntu. 

I done a clean install of 7.2.1 on a clean install of Ubuntu 12.10.

You can resolve it by adding appending `-J-Djava.net.preferIPv4Stack=true` to the `netbeans_default_options` variable in `./netbeans/etc/netbeans.conf`.

From http://forums.netbeans.org/topic41484.html&highlight=netbeansdefaultoptions
Comment 23 puce 2013-05-17 14:51:53 UTC
I also have issues with the system proxy settings (pac file).

Product Version: NetBeans IDE 7.3 (Build 201302132200)
Java: 1.7.0_21; Java HotSpot(TM) 64-Bit Server VM 23.21-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_21-b11
System: Windows 7 version 6.1 running on amd64; Cp1252; de_CH (nb)

Java network setting: use browser settings
Firefox 20.0.1 (default browser, system proxy)
Internet Explorer 8

NetBeans log:
INFO [org.netbeans.core.ProxyAutoConfig]: findProxyForURL(http://updates.netbeans.org/netbeans/updates/7.3/uc/final/certified/catalog.xml.gz?unique=NB_GFMOD_JAVA_WEBCOMMON_WEBEE0c6ad140e-45ee-4e1b-8a3d-43aa12071307_99b98af2-2a80-4b45-a148-b56085f30485) returns null.
INFO [org.netbeans.core.ProxyAutoConfig]: findProxyForURL(socket://updates.netbeans.org:80) returns null.
INFO [org.netbeans.modules.autoupdate.updateprovider.DownloadListener]: Reading URL http://updates.netbeans.org/netbeans/updates/7.3/uc/final/certified/catalog.xml.gz?unique=NB_GFMOD_JAVA_WEBCOMMON_WEBEE0c6ad140e-45ee-4e1b-8a3d-43aa12071307_99b98af2-2a80-4b45-a148-b56085f30485 failed (java.net.ConnectException: Connection timed out: connect)
INFO [org.netbeans.modules.autoupdate.ui.Utilities]: Connection timed out: connect
java.net.ConnectException: Connection timed out: connect
	at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
	at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:75)
	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.PlainSocketImpl.connect(PlainSocketImpl.java:157)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
	at java.net.Socket.connect(Socket.java:579)
	at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:378)
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:473)
	at sun.net.www.http.HttpClient.<init>(HttpClient.java:203)
	at sun.net.www.http.HttpClient.New(HttpClient.java:290)
	at sun.net.www.http.HttpClient.New(HttpClient.java:306)
	at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:995)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:931)
	at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:849)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1299)
	at org.netbeans.modules.autoupdate.updateprovider.NetworkAccess$Task$2.call(NetworkAccess.java:146)
	at org.netbeans.modules.autoupdate.updateprovider.NetworkAccess$Task$2.call(NetworkAccess.java:136)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:722)
Caused: java.io.IOException: Connection timed out: connect
	at org.netbeans.modules.autoupdate.updateprovider.DownloadListener.notifyException(DownloadListener.java:103)
	at org.netbeans.modules.autoupdate.updateprovider.AutoupdateCatalogCache.copy(AutoupdateCatalogCache.java:248)
	at org.netbeans.modules.autoupdate.updateprovider.AutoupdateCatalogCache.writeCatalogToCache(AutoupdateCatalogCache.java:100)
	at org.netbeans.modules.autoupdate.updateprovider.AutoupdateCatalogProvider.refresh(AutoupdateCatalogProvider.java:154)
	at org.netbeans.modules.autoupdate.services.UpdateUnitProviderImpl.refresh(UpdateUnitProviderImpl.java:180)
	at org.netbeans.api.autoupdate.UpdateUnitProvider.refresh(UpdateUnitProvider.java:196)
[catch] at org.netbeans.modules.autoupdate.ui.Utilities.tryRefreshProviders(Utilities.java:433)
	at org.netbeans.modules.autoupdate.ui.Utilities.doRefreshProviders(Utilities.java:411)
	at org.netbeans.modules.autoupdate.ui.Utilities.presentRefreshProviders(Utilities.java:405)
	at org.netbeans.modules.autoupdate.ui.UnitTab$14.run(UnitTab.java:800)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1454)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2048)
INFO [org.netbeans.modules.extbrowser]: Cannot detect Mozilla : org.netbeans.modules.extbrowser.NbBrowserException: RegOpenKeyEx() failed for SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\MOZILLA.exe.
INFO [org.netbeans.core.ProxyAutoConfig]: findProxyForURL(http://download.oracle.com/javase/7/docs/api/overview-summary.html) returns null.
INFO [org.netbeans.core.ProxyAutoConfig]: findProxyForURL(socket://download.oracle.com:80) returns null.
INFO [org.netbeans.core.ProxyAutoConfig]: findProxyForURL(http://download.oracle.com/javase/7/docs/api/index.html) returns null.
INFO [org.netbeans.core.ProxyAutoConfig]: findProxyForURL(socket://download.oracle.com:80) returns null.
INFO [org.netbeans.core.ProxyAutoConfig]: findProxyForURL(http://download.oracle.com/javase/7/docs/api/index.htm) returns null.
INFO [org.netbeans.core.ProxyAutoConfig]: findProxyForURL(socket://download.oracle.com:80) returns null.
INFO [org.netbeans.core.ProxyAutoConfig]: findProxyForURL(http://download.oracle.com/javase/7/docs/api/package-list) returns null.
INFO [org.netbeans.core.ProxyAutoConfig]: findProxyForURL(socket://download.oracle.com:80) returns null.
Comment 24 puce 2013-05-17 14:58:36 UTC
Appending `-J-Djava.net.preferIPv4Stack=true` to
the `netbeans_default_options` variable in `./netbeans/etc/netbeans.conf` did not work
Comment 25 Libor Fischmeistr 2013-05-17 15:08:19 UTC
puce, thanks for your attention, but I think that your two posts should be two new separated issues. Also, the logic about dealing with proxy settings has significantly changed, so your problem may be solved in daily builds.

We really would appreciate if you could try to reproduce it with latest daily build.

Thanks
Comment 26 kaspean 2013-10-16 13:10:30 UTC
I am using version 7.3.1. Still see this issue. Whether it got fixed there or yet to be fixed?

Appreciate your help..
Comment 27 Libor Fischmeistr 2013-10-16 13:20:19 UTC
(In reply to kaspean from comment #26)
> I am using version 7.3.1. Still see this issue. Whether it got fixed there
> or yet to be fixed?
> 
> Appreciate your help..

Please, try NetBeans 7.4. The way how proxies are solved has changed and all these changes are in the new version.

If you find the problem in the 7.4, please file new issue.

Thank you
Comment 28 BullfrogBlues 2013-10-17 17:23:40 UTC
(In reply to Libor Fischmeistr from comment #27)
> (In reply to kaspean from comment #26)
> > I am using version 7.3.1. Still see this issue. Whether it got fixed there
> > or yet to be fixed?
> > 
> > Appreciate your help..
> 
> Please, try NetBeans 7.4. The way how proxies are solved has changed and all
> these changes are in the new version.
> 
> If you find the problem in the 7.4, please file new issue.
> 
> Thank you


Sorry, I just check 7.4 and this is not fixed. Appending `-J-Djava.net.preferIPv4Stack=true` to the `netbeans_default_options` variable in `./netbeans/etc/netbeans.conf` solves this problem for me.
Comment 29 Jiri Rechtacek 2013-10-18 10:23:54 UTC
(In reply to BullfrogBlues from comment #28)
> (In reply to Libor Fischmeistr from comment #27)
> > (In reply to kaspean from comment #26)
> > > I am using version 7.3.1. Still see this issue. Whether it got fixed there
> > > or yet to be fixed?
> > > 
> > > Appreciate your help..
> > 
> > Please, try NetBeans 7.4. The way how proxies are solved has changed and all
> > these changes are in the new version.
> > 
> > If you find the problem in the 7.4, please file new issue.
> > 
> > Thank you
> 
> 
> Sorry, I just check 7.4 and this is not fixed. Appending
> `-J-Djava.net.preferIPv4Stack=true` to the `netbeans_default_options`
> variable in `./netbeans/etc/netbeans.conf` solves this problem for me.

As state in the comment before, if you find the problem in the 7.4, please file new issue.
Comment 30 BullfrogBlues 2013-10-21 21:54:23 UTC
(In reply to Jiri Rechtacek from comment #29)
> (In reply to BullfrogBlues from comment #28)
> > (In reply to Libor Fischmeistr from comment #27)
> > > (In reply to kaspean from comment #26)
> > > > I am using version 7.3.1. Still see this issue. Whether it got fixed there
> > > > or yet to be fixed?
> > > > 
> > > > Appreciate your help..
> > > 
> > > Please, try NetBeans 7.4. The way how proxies are solved has changed and all
> > > these changes are in the new version.
> > > 
> > > If you find the problem in the 7.4, please file new issue.
> > > 
> > > Thank you
> > 
> > 
> > Sorry, I just check 7.4 and this is not fixed. Appending
> > `-J-Djava.net.preferIPv4Stack=true` to the `netbeans_default_options`
> > variable in `./netbeans/etc/netbeans.conf` solves this problem for me.
> 
> As state in the comment before, if you find the problem in the 7.4, please
> file new issue.

Nah. I won't bother.
Comment 31 gwilson 2013-10-22 17:43:35 UTC
I have the same problem. On the Options-->General dialog, I click the "Use System Proxy Settings", then click the Reload button (whatever that does), then click the Test connection button. Just to the right of the button, as error icon appears followed with the text "Cannot assign requested address: connect

Also, there isn't a hardcoded proxy in our environment. In Windows 7 LAN Settings for Internet, automatic config is checked (both boxes) and a url is given for the automatic config script. So, it might not work to look at the hard-coded Proxy server to support this feature.
Comment 32 srikowtha 2013-11-02 02:06:07 UTC
All

After getting frustrated to no end since my firm also uses an "Automatic Configuration Script" I finally stumbled upon a solution that worked for me at this website

http://www.haidongji.com/2009/01/20/identify-a-proxy-when-automatic-configuration-script-is-used/comment-page-1/#comment-40431

I followed the exact steps as described in taking the ACS address and pasting in the browser address and all the rest.

I entered that info under "Manually Set Proxy settings" option and tested the connection and it worked.

Give this a try
Comment 33 srikowtha 2013-11-02 02:13:14 UTC
Please follow the steps provided in the link below. That worked for me.

http://www.haidongji.com/2009/01/20/identify-a-proxy-when-automatic-configuration-script-is-used/comment-page-1/#comment-40431

All the best. I know the frustration. Really hope it works for you and others.
Comment 34 Theofanis Oikonomou 2015-09-09 06:34:01 UTC
*** Bug 195137 has been marked as a duplicate of this bug. ***
Comment 35 hummeling 2017-11-16 10:45:20 UTC
This is still not fixed for NetBeans IDE 8.2 on 64bit Windows 7 Enterprise SP1.
Please let me know if you require any more input from my side. I'm happy to deliver, since this also forces me to turn off proxy every time before restarting NB otherwise it hangs during start.