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.

(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.

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.

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.

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.

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

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 #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.

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.

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

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?

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

(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

(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.

(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.

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.