Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connection problems behind forced proxy #1126

Closed
lherschi opened this issue Jun 20, 2019 · 7 comments
Closed

connection problems behind forced proxy #1126

lherschi opened this issue Jun 20, 2019 · 7 comments
Assignees
Labels
bug Issues that are problems in the code as reported by the community
Milestone

Comments

@lherschi
Copy link

lherschi commented Jun 20, 2019

Platform: Windows 7

Architecture: x64

I have connection problems inside netbeans 8.2 in conjunction with AdoptOpenJDK 8. The problem only occurs when you have to connect via a proxy. The problem exists since update 212, both b03 and b04 with HotSpot JVM. The problem is not with OpenJ9 JVM nor with Oracle JDK or openjdkbuild. You can easily readjust this via the netbeans menu Help -> Check for Updates. It can no longer be established connection and I get the following exception in the log.

INFO [org.netbeans.modules.autoupdate.updateprovider.DownloadListener]: Reading URL http://plugins.netbeans.org/nbpluginportal/updates/8.2/catalog.xml.gz failed (java.net.ConnectException: Connection timed out: connect) INFO [org.netbeans.modules.autoupdate.ui.actions.AutoupdateCheckScheduler] java.net.ConnectException: Connection timed out: connect at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at sun.net.NetworkClient.doConnect(NetworkClient.java:175) at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) at sun.net.www.http.HttpClient.New(HttpClient.java:339) at sun.net.www.http.HttpClient.New(HttpClient.java:357) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1220) at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1156) at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1040) at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1038) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessController.doPrivilegedWithCombiner(AccessController.java:782) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1037) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:984) at org.netbeans.modules.autoupdate.updateprovider.NetworkAccess.checkRedirect(NetworkAccess.java:252) at org.netbeans.modules.autoupdate.updateprovider.NetworkAccess.access$700(NetworkAccess.java:69) at org.netbeans.modules.autoupdate.updateprovider.NetworkAccess$Task$2.call(NetworkAccess.java:172) at org.netbeans.modules.autoupdate.updateprovider.NetworkAccess$Task$2.call(NetworkAccess.java:150) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)

With update 212 I get in the netbeans log at start only the following info.

INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network proxy resolver: Windows

With the other jdks or older adoptopenjdk releases the proxy can be determined and I have thereby no connection problems.

INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network proxy resolver: Windows INFO [org.netbeans.core.network.proxy.windows.WindowsNetworkProxy]: Windows system proxy resolver: auto detect INFO [org.netbeans.core.network.proxy.windows.WindowsNetworkProxy]: Windows system proxy resolver: auto - PAC (http://wpad/wpad.dat) INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network proxy reloading succeeded. INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network proxy - mode: auto INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network proxy - pac url: http://wpad/wpad.dat INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network proxy TEST - http host: squid.incore INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network proxy TEST - http port: 3128

@karianna karianna added the bug Issues that are problems in the code as reported by the community label Jun 24, 2019
@karianna karianna added this to the June 2019 milestone Jun 24, 2019
@lherschi
Copy link
Author

I've tried the nightly builds. The described problem I have here from the build OpenJDK8U_x64_windows_hotspot_2018-09-20-18-33. Until build OpenJDKU_x64_windows_hotspot_2018-09-19-15-36 there are no problems. If I look at the differences here, I can see immediately that there has been a change in Visual C++ from 2010 to 2012. The same change happened during the releases between update 202 and 212.

@karianna
Copy link
Contributor

I'll assign this to @ali-ince who is juggling a few of these. We need to unblock him on an infra piece I think and then the toolchains will get upgraded.

@karianna karianna modified the milestones: June 2019, July 2019 Jul 5, 2019
@ali-ince
Copy link
Contributor

Hi @lherschi,

I wasn't able to reproduce this on my Windows 10 environment but I'm trying to get a clean Windows 7 installation to verify.

In the meantime, would you please verify if copying <jdk_home>\jre\bin\msvcp120.dll to <jdk_home>\bin folder helps to resolve the issue?

@karianna karianna added this to the July 2019 milestone Jul 16, 2019
@karianna karianna added the Waiting on OP Issues that are awaiting a response from the original author of the ticket label Jul 16, 2019
@lherschi
Copy link
Author

I've just verified the connection problem again with windows 7, 8.1 and 10. Copying the file has not helped any of the system.
Maybe you can reproduce the following. As soon as a newer AdoptOpenJDK has been installed I get an exception in Netbeans as soon as I click on the Reload button of "Use System Proxy Settings" in the Tools-> Options menu in the General tab.

Exception:
java.lang.NoClassDefFoundError: Could not initialize class org.netbeans.core.network.proxy.windows.WindowsNetworkProxyLibrary$ProxyConfig$ByReference at org.netbeans.core.network.proxy.windows.WindowsNetworkProxy.getNetworkProxySettings(WindowsNetworkProxy.java:70) at org.netbeans.core.network.proxy.NetworkProxyReloader.reloadNetworkProxy(NetworkProxyReloader.java:90) at org.netbeans.core.network.proxy.NetworkProxyReloader.reload(NetworkProxyReloader.java:264) at org.netbeans.core.ProxySettings.reload(ProxySettings.java:407) at org.netbeans.core.ui.options.general.GeneralOptionsPanel.bReloadProxyActionPerformed(GeneralOptionsPanel.java:526) at org.netbeans.core.ui.options.general.GeneralOptionsPanel.access$900(GeneralOptionsPanel.java:87) at org.netbeans.core.ui.options.general.GeneralOptionsPanel$7.actionPerformed(GeneralOptionsPanel.java:326) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) at java.awt.Component.processMouseEvent(Component.java:6539) at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) at java.awt.Component.processEvent(Component.java:6304) at java.awt.Container.processEvent(Container.java:2239) at java.awt.Component.dispatchEventImpl(Component.java:4889) at java.awt.Container.dispatchEventImpl(Container.java:2297) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476) at java.awt.Container.dispatchEventImpl(Container.java:2283) at java.awt.Window.dispatchEventImpl(Window.java:2746) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84) at java.awt.EventQueue$4.run(EventQueue.java:733) at java.awt.EventQueue$4.run(EventQueue.java:731) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) at java.awt.EventQueue.dispatchEvent(EventQueue.java:730) at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159) [catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

@lherschi
Copy link
Author

I have looked at the netbeans sources and it probably fails loading winhttp.dll

@ali-ince
Copy link
Contributor

It seems that netbeans ships with its own native DLLs which depend on msvcr100.dll and we no longer ship with this native DLL due to our move to MSVC 2013 with 8u212 (which results in msvcr120.dll to be bundled in the binaries).

One temporary workaround would be to install Microsoft Visual C++ 2010 Service Pack 1 Redistributable Package on the system so that Netbeans' DLLs will be able to locate their dependencies. Would it be possible for you to verify if this works?

@lherschi
Copy link
Author

The installation of MSVC 2010 Redistributable fixes the connection problem. It is important to install the bit version appropriate for the JDK.
Many thanks for your support.

@karianna karianna removed the Waiting on OP Issues that are awaiting a response from the original author of the ticket label Jul 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues that are problems in the code as reported by the community
Projects
None yet
Development

No branches or pull requests

3 participants