I am using sbt
behind a proxy, with a corporate Nexus server.
My setup works correctly, using CNTLM
JAVA_OPTS="-Dhttp.proxyHost=10.0.2.2 -Dhttp.proxyPort=3128 -Dhttps.proxyHost=10.0.2.2 -Dhttps.proxyPort=3128"
SBT_OPTS="-Dsbt.override.build.repos=true"
and Nexus setup in ~/.sbt/repositories
[repositories]
local
my-ivy-proxy-releases:http://company.com:8081/nexus/content/groups/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
my-maven-proxy-releases:http://company.com:8081/nexus/content/groups/mvn-repositories/
All works correctly, even the "titled problem", if managed by sbt, fe:
libraryDependencies += "org.apache.spark" %% spark-core % "1.6.1" withSources())
But if I want to use the build in IntelliJ "download sources" button:
it will give me a connection error:
What am I missing? I even looked at the IntelliJ logs, but they dont tell much
2017-04-07 10:52:24,002 [89494035] WARN - r.InternetAttachSourceProvider - Connection problem. See log for more details.
com.intellij.jarFinder.SourceSearchException: Connection problem. See log for more details.
at com.intellij.jarFinder.MavenCentralSourceSearcher.findSourceJar(MavenCentralSourceSearcher.java:65)
at com.intellij.jarFinder.InternetAttachSourceProvider$2$1.run(InternetAttachSourceProvider.java:134)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:726)
at com.intellij.openapi.progress.impl.CoreProgressManager$6.run(CoreProgressManager.java:410)
at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:176)
at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:556)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:501)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:163)
at com.intellij.openapi.application.impl.ApplicationImpl.a(ApplicationImpl.java:594)
at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:334)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
2017-04-07 10:52:38,562 [89508595] WARN - der.MavenCentralSourceSearcher - Remote host closed connection during handshake
javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:992)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1513)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)
at com.intellij.util.io.HttpRequests.openConnection(HttpRequests.java:511)
at com.intellij.util.io.HttpRequests.access$300(HttpRequests.java:61)
at com.intellij.util.io.HttpRequests$RequestImpl.getConnection(HttpRequests.java:289)
at com.intellij.util.io.HttpRequests$RequestImpl.getInputStream(HttpRequests.java:298)
at com.intellij.util.io.HttpRequests$RequestImpl.getReader(HttpRequests.java:316)
at com.intellij.jarFinder.SourceSearcher$1.process(SourceSearcher.java:76)
at com.intellij.jarFinder.SourceSearcher$1.process(SourceSearcher.java:72)
at com.intellij.util.io.HttpRequests.lambda$doProcess$0(HttpRequests.java:420)
at com.intellij.util.net.ssl.CertificateManager.runWithUntrustedCertificateStrategy(CertificateManager.java:349)
at com.intellij.util.io.HttpRequests.doProcess(HttpRequests.java:420)
at com.intellij.util.io.HttpRequests.process(HttpRequests.java:395)
at com.intellij.util.io.HttpRequests.access$100(HttpRequests.java:61)
at com.intellij.util.io.HttpRequests$RequestBuilderImpl.connect(HttpRequests.java:263)
at com.intellij.jarFinder.SourceSearcher.readDocumentCancelable(SourceSearcher.java:72)
at com.intellij.jarFinder.MavenCentralSourceSearcher.findSourceJar(MavenCentralSourceSearcher.java:39)
at com.intellij.jarFinder.InternetAttachSourceProvider$2$1.run(InternetAttachSourceProvider.java:134)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:726)
at com.intellij.openapi.progress.impl.CoreProgressManager$6.run(CoreProgressManager.java:410)
at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:176)
at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:556)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:501)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:163)
at com.intellij.openapi.application.impl.ApplicationImpl.a(ApplicationImpl.java:594)
at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:334)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.EOFException: SSL peer shut down incorrectly
at sun.security.ssl.InputRecord.read(InputRecord.java:505)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973)
... 39 more
2017-04-07 10:52:38,563 [89508596] WARN - r.InternetAttachSourceProvider - Connection problem. See log for more details.
com.intellij.jarFinder.SourceSearchException: Connection problem. See log for more details.
at com.intellij.jarFinder.MavenCentralSourceSearcher.findSourceJar(MavenCentralSourceSearcher.java:65)
at com.intellij.jarFinder.InternetAttachSourceProvider$2$1.run(InternetAttachSourceProvider.java:134)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:726)
at com.intellij.openapi.progress.impl.CoreProgressManager$6.run(CoreProgressManager.java:410)
at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:176)
at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:556)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:501)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:163)
at com.intellij.openapi.application.impl.ApplicationImpl.a(ApplicationImpl.java:594)
at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:334)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
I am not sure but it seems I am not alone:
It was a bug in Intellj and it is resolved.