Download [#VISUALVM-330] Can`t install plugins and Proxy auth

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
[VISUALVM-330] Can't install plugins and Proxy auth does not fork for
NTLMv2 Proxies Created: 27/Oct/09 Updated: 27/Oct/09 Resolved: 27/Oct/09
Status:
Project:
Component/s:
Affects
Version/s:
Fix Version/s:
Resolved
VisualVM
plugins
1.2
Type:
Reporter:
Resolution:
Labels:
Remaining
Estimate:
Time Spent:
Original
Estimate:
Environment:
Bug
4bugzilla
Won't Fix
None
Not Specified
Issuezilla Id:
330
not determined
Priority:
Assignee:
Votes:
Major
visualvm-issues
0
Not Specified
Not Specified
Operating System: All
Platform: All
Description
I am behind NTLMv2 Proxy and when I am using "Use System Proxy" or specify proxy
manually I get
–
Unable to connect to the VisualVM 1.2 Plugins Center because of
java.io.IOException: Authentication failure
–
From log file
–
java.io.IOException: java.io.IOException: Authentication failure
at
org.netbeans.modules.autoupdate.updateprovider.DownloadListener.notifyException(DownloadListener.java:10
at
org.netbeans.modules.autoupdate.updateprovider.AutoupdateCatalogCache.copy(AutoupdateCatalogCache.java
at
org.netbeans.modules.autoupdate.updateprovider.AutoupdateCatalogCache.writeCatalogToCache(AutoupdateC
at
org.netbeans.modules.autoupdate.updateprovider.AutoupdateCatalogProvider.refresh(AutoupdateCatalogProvid
at
org.netbeans.modules.autoupdate.services.UpdateUnitProviderImpl.refresh(UpdateUnitProviderImpl.java:153)
at
org.netbeans.api.autoupdate.UpdateUnitProvider.refresh(UpdateUnitProvider.java:158)
[catch] at
org.netbeans.modules.autoupdate.ui.Utilities.tryRefreshProviders(Utilities.java:330)
at
org.netbeans.modules.autoupdate.ui.Utilities.doRefreshProviders(Utilities.java:312)
at
org.netbeans.modules.autoupdate.ui.Utilities.presentRefreshProviders(Utilities.java:306)
at org.netbeans.modules.autoupdate.ui.UnitTab$12.run(UnitTab.java:731)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:577)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1030)
–
When I am changing
https://visualvm.dev.java.net/uc/release12/updates.xml.gz
to
http://visualvm.dev.java.net/uc/release12/updates.xml.gz
—
I get another error
—
WARNING
[org.netbeans.modules.autoupdate.updateprovider.AutoupdateCatalogParser]:
http://visualvm.dev.java.net/uc/release12/updates.xml.gz:1:50: White spaces are
required between publicId and systemId.
INFO [org.netbeans.modules.autoupdate.updateprovider.AutoupdateCatalogParser]:
Failed to parse http://visualvm.dev.java.net/uc/release12/updates.xml.gz
org.xml.sax.SAXParseException: White spaces are required between publicId and
systemId.
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1231)
at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
[catch] at
org.netbeans.modules.autoupdate.updateprovider.AutoupdateCatalogParser.getUpdateItems(AutoupdateCatalog
at
org.netbeans.modules.autoupdate.updateprovider.AutoupdateCatalogProvider.getUpdateItems(AutoupdateCatal
at
org.netbeans.modules.autoupdate.services.UpdateUnitFactory.appendUpdateItems(UpdateUnitFactory.java:170)
at
org.netbeans.modules.autoupdate.services.UpdateUnitFactory.getUpdateUnits(UpdateUnitFactory.java:140)
at
org.netbeans.modules.autoupdate.services.UpdateManagerImpl$Cache.<init>(UpdateManagerImpl.java:222)
at
org.netbeans.modules.autoupdate.services.UpdateManagerImpl.getCache(UpdateManagerImpl.java:196)
at
org.netbeans.modules.autoupdate.services.UpdateManagerImpl.getUpdateUnits(UpdateManagerImpl.java:93)
at org.netbeans.api.autoupdate.UpdateManager.getUpdateUnits(UpdateManager.java:100)
at
org.netbeans.modules.autoupdate.ui.PluginManagerUI.refreshUnits(PluginManagerUI.java:582)
at
org.netbeans.modules.autoupdate.ui.PluginManagerUI.updateUnitsChanged(PluginManagerUI.java:635)
at org.netbeans.modules.autoupdate.ui.UnitTab$3.updateUnit
—
Java itself and NetBeans work fine with NTLMv2 Proxies.
And the problem with installing plugins seems strange to me.
Thanks,
Serhiy
Comments
Comment by jsedlacek [ 27/Oct/09 ]
Plugin center requires https://, checking http:// is incorrect and throws the
described exception.
The main difference from other Java applications / NetBeans is that they
probably don't use https://. Do you have a public NTLMv2 Proxy available which
we could use to reproduce & fix the problem?
Lowering the priority, using NTLMv2 Proxy is not a typical case - as a
workaround you can download the plugins manually from
https://visualvm.dev.java.net/servlets/ProjectDocumentList?folderID=11783&expandFolder=11783&folderID=0
and install them using Tools | Plugins | Downloaded.
Comment by 4bugzilla [ 27/Oct/09 ]
Unfortunately I don't have a public proxy. This is our corporate proxy.
I understand that https:// is required. But my point was that it can connect to
sites via http:// with the same settings (SAXParseException vs IOException:
Authentication failure).
Recently there were same problem with Eclipse.
They have switched from jre based connection to apache http client and http
client does bot support NTLMv2 Proxies at all.
http://wiki.eclipse.org/ECF_Filetransfer_Support_for_NTLMv2_Proxies
I'll try to look into additional details to be able to find out more.
Thanks,
Serhiy
Comment by 4bugzilla [ 27/Oct/09 ]
Actually I have not dealt melodramatically with https behind a proxy. But I've
made some short investigation and want to share my results.
When I am running following
-----import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
public class RunTest {
public static void main(String[] args) {
try {
System.setProperty("http.proxyHost", "proxy_host");
System.setProperty("http.proxyPort", "proxy_port");
System.setProperty("https.proxyHost", "proxy_host");
System.setProperty("https.proxyPort", "proxy_port");
System.setProperty("http.proxyUser", "DOMAIN
userName");
System.setProperty("http.proxyPassword", "myPasswd");
System.setProperty("https.proxyUser", "DOMAIN
userName");
System.setProperty("https.proxyPassword", "myPasswd");
URL url = new URL(
"http://visualvm.dev.java.net/uc/release12/updates.xml.gz");
URLConnection urlConnection = url.openConnection();
DataInputStream dis = new DataInputStream(urlConnection
.getInputStream());
BufferedReader reader = new BufferedReader(new InputStreamReader(
dis));
String inputLine;
while ((inputLine = reader.readLine()) != null)
{ System.out.println(inputLine); }
dis.close();
} catch (MalformedURLException me)
{ System.out.println("MalformedURLException: " + me); }
catch (IOException ioe)
{ System.out.println("IOException: " + ioe); }
}
}
-----it works fine and I see content of the page. But when I am changing
URL url = new URL("http://visualvm.dev.java.net/uc/release12/updates.xml.gz");
to
URL url = new URL("https://visualvm.dev.java.net/uc/release12/updates.xml.gz");
I get
java.io.IOException: Authentication failure
I've tried both plain text and base64 encoded proxy user name and password for
https proxy env. variables but with no luck.
I have visualvm that comes with jdk 1.6.16 (also I've tested this with visualvm
1.2) and when I want to set proxy it suggests to use env. variables http.proxy*.
And it works fine but only for http://. I am not sure about other types of
proxies but with our NTLMv2 Proxy just setting
–
https.proxyPort
https.proxyHost
https.proxyUser
https.proxyPassword
–
does not work for https://.
I hope this will help to resolve this problem.
Thanks,
Serhiy
Comment by jsedlacek [ 27/Oct/09 ]
I assume you're getting this content using http://
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a
href="https://visualvm.dev.java.net/uc/release12/updates.xml.gz">here</a>.</p>
<hr>
<address>Apache Server at visualvm.dev.java.net Port 80</address>
</body></html>
This means you don't have access to the plugin center which is only available
using https://.
The "java.io.IOException: Authentication failure" shows that you are unable to
access https:// using the proxy even from a simple Java application. Not sure
what to do, but it looks like a configuration problem of the proxy or your system.
Comment by jsedlacek [ 27/Oct/09 ]
Just a quick idea - the JDK comes with preinstalled certificates for trusted
servers incl. *.dev.java.net. You could probably get the "java.io.IOException:
Authentication failure" if the certificate is missing on your side. Did you
modify the jre/lib/security/cacerts file or are you modifying
javax.net.ssl.trustStore system property?
Comment by thurka [ 27/Oct/09 ]
Can you provide whole stacktrace of "java.io.IOException: Authentication failure"? Thanks.
Comment by jsedlacek [ 27/Oct/09 ]
Not sure if JDK fully supports NTLMv2, see
http://forums.sun.com/thread.jspa?threadID=5362388 mentioning a third-party
library implementing additional security provider for NTLM.
Comment by 4bugzilla [ 27/Oct/09 ]
Actually java supports NTLMv2 at least for http://. This is because I can get
content of any site accessible via http using code sample I've posted. The only
problem is with https://
And as far as I can see that forum is about Apache's HttpClient. But not about
jre support.
Comment by jsedlacek [ 27/Oct/09 ]
Right, I meant it might be not fully supported by the JDK. Anyway, this looks
like a general Java problem unrelated specifically to VisualVM. We likely won't
be able to resolve it on our side.
Please update this issue if you find any way to make the VisualVM working with a
NTLMv2 proxy.
Generated at Wed May 03 15:49:22 UTC 2017 using JIRA 6.2.3#6260sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.