You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "ebarboni (via GitHub)" <gi...@apache.org> on 2023/05/11 14:19:21 UTC

[GitHub] [netbeans] ebarboni opened a new pull request, #5935: fail proxy pac on windows if no URL

ebarboni opened a new pull request, #5935:
URL: https://github.com/apache/netbeans/pull/5935

   This is a "fix" to get rid of an annoying exception thrown on every launchd as info during windows autoproxy.
   I'm not sure this is right approach but "to me" as no URL are set I don't get why it should use http://wdap/wdap.dat.
   So exiting early.
   
   That the exception scaring user :p :
   INFO [org.netbeans.core.network.proxy.ProxyAutoConfig]: InputStream for http://wpad/wpad.dat throws 
   java.net.UnknownHostException: wpad
   	at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:567)
   	at java.base/java.net.Socket.connect(Socket.java:633)
   	at java.base/java.net.Socket.connect(Socket.java:583)
   	at java.base/sun.net.NetworkClient.doConnect(NetworkClient.java:183)
   	at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:531)
   	at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:636)
   	at java.base/sun.net.www.http.HttpClient.<init>(HttpClient.java:279)
   	at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:384)
   	at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:406)
   	at java.base/sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1309)
   	at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1287)
   	at java.base/sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1118)
   	at java.base/sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1116)
   	at java.base/java.security.AccessController.doPrivileged(AccessController.java:712)
   	at java.base/java.security.AccessController.doPrivilegedWithCombiner(AccessController.java:962)
   	at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1115)
   	at java.base/sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:1057)
   	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1665)
   	at java.base/sun.net.www.protocol.http.HttpURLConnection$9.run(HttpURLConnection.java:1581)
   	at java.base/sun.net.www.protocol.http.HttpURLConnection$9.run(HttpURLConnection.java:1579)
   	at java.base/java.security.AccessController.doPrivileged(AccessController.java:712)
   	at java.base/java.security.AccessController.doPrivilegedWithCombiner(AccessController.java:962)
   	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1578)
   	at org.netbeans.core.network.proxy.ProxyAutoConfig.downloadPAC(ProxyAutoConfig.java:155)
   [catch] at org.netbeans.core.network.proxy.ProxyAutoConfig.initEngine(ProxyAutoConfig.java:94)
   	at org.netbeans.core.network.proxy.ProxyAutoConfig$1.run(ProxyAutoConfig.java:82)
   	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
   	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
   	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:287)
   	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] ebarboni commented on pull request #5935: fail proxy pac on windows if no URL

Posted by "ebarboni (via GitHub)" <gi...@apache.org>.
ebarboni commented on PR #5935:
URL: https://github.com/apache/netbeans/pull/5935#issuecomment-1545610061

   @sdedic I do the proposed Info log message


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] ebarboni merged pull request #5935: fail proxy pac on windows if no URL

Posted by "ebarboni (via GitHub)" <gi...@apache.org>.
ebarboni merged PR #5935:
URL: https://github.com/apache/netbeans/pull/5935


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] ebarboni commented on pull request #5935: fail proxy pac on windows if no URL

Posted by "ebarboni (via GitHub)" <gi...@apache.org>.
ebarboni commented on PR #5935:
URL: https://github.com/apache/netbeans/pull/5935#issuecomment-1545459714

   @matthiasblaesing thanks for precision. I have no idea why wpad not working on my computer and others. By the way more simple PR with only a triage of exception
   (we have domain controled computer and it fail)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] matthiasblaesing commented on pull request #5935: fail proxy pac on windows if no URL

Posted by "matthiasblaesing (via GitHub)" <gi...@apache.org>.
matthiasblaesing commented on PR #5935:
URL: https://github.com/apache/netbeans/pull/5935#issuecomment-1544605712

   To my understanding the download URL `http://wpad/wpad.dat` is correct. The system will resolve the host `wpad` in the local DNS prefix. And try to download the wpad file from there. This can be read into 
   
   https://datatracker.ietf.org/doc/html/draft-ietf-wrec-wpad-01#section-4.4.3
   
   To get that URL on Windows, the following sequence has to run:
   
   The system is queried for proxy configuration:
   
   https://github.com/apache/netbeans/blob/75bb740f9d75f237159677f4f0410271b40ece52/platform/core.network/src/org/netbeans/core/network/proxy/windows/WindowsNetworkProxy.java#L47-L49
   
   Only if that is present:
   
   https://learn.microsoft.com/en-us/windows/win32/api/winhttp/nf-winhttp-winhttpgetieproxyconfigforcurrentuser
   https://github.com/apache/netbeans/blob/75bb740f9d75f237159677f4f0410271b40ece52/platform/core.network/src/org/netbeans/core/network/proxy/windows/WindowsNetworkProxy.java#L51
   
   And only if there is no PAC url configured, but autodetection is enabled:
   
   https://learn.microsoft.com/en-us/windows/win32/api/winhttp/ns-winhttp-winhttp_current_user_ie_proxy_config
   https://github.com/apache/netbeans/blob/75bb740f9d75f237159677f4f0410271b40ece52/platform/core.network/src/org/netbeans/core/network/proxy/windows/WindowsNetworkProxy.java#L59-L60
   
   that URL is returned.
   
   Sounds reasonable to me.
   
   It was added recently: https://github.com/apache/netbeans/pull/5210 and maybe the `java.net.UnknownHostException` should be caught and a sensible message issued. This PR would just reintroduce the issue, that was fixed by #5210.
   
   @sdedic could you have a look at this?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] sdedic commented on pull request #5935: fail proxy pac on windows if no URL

Posted by "sdedic (via GitHub)" <gi...@apache.org>.
sdedic commented on PR #5935:
URL: https://github.com/apache/netbeans/pull/5935#issuecomment-1545472352

   @ebarboni thanks for the update. The `UnknownHostException` catch handler is indeed missing - but I'd say it should not log at all, or just note something like `PAC script {0} unavailable`. It usually happens on systems with autoproxy enabled or even the URL configured that are *outside* of the proxied network. Then the DNS resolver does not know the hostname `wpad` and the automatic proxy configuration ends.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists