technomancy / leiningen

Moved to Codeberg; this is a convenience mirror
https://codeberg.org/leiningen/leiningen
Other
7.29k stars 1.6k forks source link

"Could not transfer artifact org.clojure:tools.nrepl:pom:0.2.12" when running "lein repl" #2163

Closed gtzampanakis closed 8 years ago

gtzampanakis commented 8 years ago

On centos-release-6-5.el6.centos.11.1.i686 I followed the instructions:

    Download the lein script (or on Windows lein.bat)
    Place it on your $PATH where your shell can find it (eg. ~/bin)
    Set it to be executable (chmod a+x ~/bin/lein)
    Run it (lein) and it will download the self-install package

But then when trying lein repl I get the error below. I don't have any network connectivity issues as far as I can tell (i.e. If I run wget https://repo1.maven.org/maven2/ the command completes without errors).

Could not transfer artifact org.clojure:tools.nrepl:pom:0.2.12 from/to central (https://repo1.maven.org/maven2/): java.security.ProviderException: java.security.KeyException
Could not transfer artifact clojure-complete:clojure-complete:pom:0.2.4 from/to central (https://repo1.maven.org/maven2/): java.security.ProviderException: java.security.KeyException
Could not transfer artifact org.clojure:clojure:pom:1.8.0 from/to central (https://repo1.maven.org/maven2/): java.security.ProviderException: java.security.KeyException
This could be due to a typo in :dependencies or network issues.
If you are behind a proxy, try setting the 'http_proxy' environment variable.
Exception in thread "Thread-3" clojure.lang.ExceptionInfo: Could not resolve dependencies {:suppress-msg true, :exit-code 1}
        at clojure.core$ex_info.invokeStatic(core.clj:4617)
        at clojure.core$ex_info.invoke(core.clj:4617)
        at leiningen.core.classpath$fn__6613.invokeStatic(classpath.clj:295)
        at leiningen.core.classpath$fn__6613.invoke(classpath.clj:253)
        at clojure.lang.AFn.applyToHelper(AFn.java:160)
        at clojure.lang.AFn.applyTo(AFn.java:144)
        at clojure.core$apply.invokeStatic(core.clj:646)
        at clojure.core$memoize$fn__5708.doInvoke(core.clj:6107)
        at clojure.lang.RestFn.invoke(RestFn.java:436)
        at leiningen.core.classpath$get_dependencies.invokeStatic(classpath.clj:416)
        at leiningen.core.classpath$get_dependencies.doInvoke(classpath.clj:410)
        at clojure.lang.RestFn.invoke(RestFn.java:425)
        at clojure.lang.AFn.applyToHelper(AFn.java:156)
        at clojure.lang.RestFn.applyTo(RestFn.java:132)
        at clojure.core$apply.invokeStatic(core.clj:650)
        at clojure.core$apply.invoke(core.clj:641)
        at leiningen.core.classpath$resolve_dependencies.invokeStatic(classpath.clj:498)
        at leiningen.core.classpath$resolve_dependencies.doInvoke(classpath.clj:489)
        at clojure.lang.RestFn.invoke(RestFn.java:425)
        at leiningen.core.eval$prep.invokeStatic(eval.clj:84)
        at leiningen.core.eval$prep.invoke(eval.clj:72)
        at leiningen.core.eval$eval_in_project.invokeStatic(eval.clj:369)
        at leiningen.core.eval$eval_in_project.invoke(eval.clj:363)
        at leiningen.repl$server$fn__11767.invoke(repl.clj:243)
        at clojure.lang.AFn.applyToHelper(AFn.java:152)
        at clojure.lang.AFn.applyTo(AFn.java:144)
        at clojure.core$apply.invokeStatic(core.clj:646)
        at clojure.core$with_bindings_STAR_.invokeStatic(core.clj:1881)
        at clojure.core$with_bindings_STAR_.doInvoke(core.clj:1881)
        at clojure.lang.RestFn.invoke(RestFn.java:425)
        at clojure.lang.AFn.applyToHelper(AFn.java:156)
        at clojure.lang.RestFn.applyTo(RestFn.java:132)
        at clojure.core$apply.invokeStatic(core.clj:650)
        at clojure.core$bound_fn_STAR_$fn__4671.doInvoke(core.clj:1911)
        at clojure.lang.RestFn.invoke(RestFn.java:397)
        at clojure.lang.AFn.run(AFn.java:22)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.sonatype.aether.resolution.DependencyResolutionException: Failed to collect dependencies for [#object[org.sonatype.aether.graph.Dependency 0x1244bb4 "org.clojure:tools.nrepl:jar:0.2.12 (compile)"] #object[org.sonatype.aether.graph.Dependency 0x1d6a220 "clojure-complete:clojure-complete:jar:0.2.4 (compile)"] #object[org.sonatype.aether.graph.Dependency 0x520e5e "org.clojure:clojure:jar:1.8.0 (compile)"]]
        at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:371)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:93)
        at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:28)
        at cemerick.pomegranate.aether$resolve_dependencies_STAR_.invokeStatic(aether.clj:720)
        at cemerick.pomegranate.aether$resolve_dependencies_STAR_.doInvoke(aether.clj:619)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.core$apply.invokeStatic(core.clj:646)
        at clojure.core$apply.invoke(core.clj:641)
        at cemerick.pomegranate.aether$resolve_dependencies.invokeStatic(aether.clj:729)
        at cemerick.pomegranate.aether$resolve_dependencies.doInvoke(aether.clj:723)
        at clojure.lang.RestFn.invoke(RestFn.java:2088)
        at leiningen.core.classpath$fn__6613.invokeStatic(classpath.clj:258)
        ... 34 more
Caused by: org.sonatype.aether.collection.DependencyCollectionException: Failed to collect dependencies for [#object[org.sonatype.aether.graph.Dependency 0x1244bb4 "org.clojure:tools.nrepl:jar:0.2.12 (compile)"] #object[org.sonatype.aether.graph.Dependency 0x1d6a220 "clojure-complete:clojure-complete:jar:0.2.4 (compile)"] #object[org.sonatype.aether.graph.Dependency 0x520e5e "org.clojure:clojure:jar:1.8.0 (compile)"]]
        at org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:258)
        at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:333)
        ... 49 more
Caused by: org.sonatype.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for org.clojure:tools.nrepl:jar:0.2.12
        at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:296)
        at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:186)
        at org.sonatype.aether.impl.internal.DefaultDependencyCollector.process(DefaultDependencyCollector.java:412)
        at org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:240)
        ... 50 more
Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Could not transfer artifact org.clojure:tools.nrepl:pom:0.2.12 from/to central (https://repo1.maven.org/maven2/): java.security.ProviderException: java.security.KeyException
        at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:538)
        at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:216)
        at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:193)
        at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:281)
        ... 53 more
Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact org.clojure:tools.nrepl:pom:0.2.12 from/to central (https://repo1.maven.org/maven2/): java.security.ProviderException: java.security.KeyException
        at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:951)
        at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:941)
        at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:669)
        at org.sonatype.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:60)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        ... 1 more
Caused by: org.apache.maven.wagon.TransferFailedException: java.security.ProviderException: java.security.KeyException
        at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:1066)
        at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:960)
        at org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:116)
        at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88)
        at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)
        at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:601)
        ... 4 more
Caused by: javax.net.ssl.SSLException: java.security.ProviderException: java.security.KeyException
        at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
        at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949)
        at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1906)
        at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1889)
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1410)
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)
        at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:394)
        at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:353)
        at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:134)
        at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
        at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
        at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
        at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
        at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
        at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
        at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
        at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.execute(AbstractHttpClientWagon.java:832)
        at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:983)
        ... 9 more
Caused by: java.security.ProviderException: java.security.KeyException
        at sun.security.ec.ECKeyPairGenerator.generateKeyPair(ECKeyPairGenerator.java:147)
        at java.security.KeyPairGenerator$Delegate.generateKeyPair(KeyPairGenerator.java:703)
        at sun.security.ssl.ECDHCrypt.<init>(ECDHCrypt.java:77)
        at sun.security.ssl.ClientHandshaker.serverKeyExchange(ClientHandshaker.java:721)
        at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:281)
        at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979)
        at sun.security.ssl.Handshaker.process_record(Handshaker.java:914)
        at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062)
        at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)
        ... 23 more
Caused by: java.security.KeyException
        at sun.security.ec.ECKeyPairGenerator.generateECKeyPair(Native Method)
        at sun.security.ec.ECKeyPairGenerator.generateKeyPair(ECKeyPairGenerator.java:128)
        ... 32 more
winks commented 8 years ago

Just tried to reproduce on centos 6.7 with openjdk 1.7 - it worked.

I do have some faint memory of keystore issues on several versions of distros, not sure if any of those tickets is related: list

cprice404 commented 8 years ago

The java.security.KeyException indicate an ssl error when trying to communicate with the HTTPS server via Java. This could be because you need to update the JDK, or some other package (I've had jvm SSL issues occur when I had old versions of the nss package before). You might just try running a yum update to update all of your packages and then see what happens.

You should also check your system clock and make sure the time is accurate; it's possible to run into SSL connection failures if your clock is way out of sync.

gtzampanakis commented 8 years ago

Running yum update nss fixed the issue. Thanks @cprice404 .

WilliamLightner commented 7 years ago

No such command as 'yum' on Windows 10. I'm having the same issue. Running Java 1.8.0_101.

This is a new, previously unopened copy of Counterclockwise 0.35. Same kind of issue with prior version (reason for upgrade).

Error occurs when I try to create a new project.

This is a very unpleasant, ugly kind of problem for someone new to Clojure and Leiningen.

I've tried supplying the 'http_proxy' environment setting. Doesn't help. Our site runs a white list, and there is no documentation (that I've found, or could find with a quick search) regarding what should be provided to the white list managers.

I've been trying to get into Clojure for "a while now" (soon to be counted in plural years), and the bottleneck has always been getting it to run. I've even succeeded a couple times, by which time I'm out of time to actually do the self-education. And when I come back to it, or upgrade, I'm always faced with the same (short word list) installation/start-up issues.

I have to wonder how many other programmers have just stopped here.

michaellindon commented 7 years ago

I also get this error on fedora 25 with up to date nss package

WilliamLightner commented 7 years ago

To clarify:

lein installs the leiningen-2.7.1-standalone.jar. Then it fails. If I delete the jar & run lein upgrade, it does the same thing.

I'm sure this is a simple thing to fix...if you know how. I've no doubt I can figure this out...in time, although I have no experience with SSL certificates &c.

I do have PowerShell (it comes installed WinX). I have curl & wget available via Cygwin, but that isn't on the path (and isn't going to get added).

The problem doesn't seem to be the install itself: at least not the initial install of the leiningen.jar. The problem happens when it tries to continue & pull other packages/poms, as if my machine can't see/accept the repository. Since we do use Maven here, I suspect (after some thought and research) that leiningen is attempting to pull from a repository that has not been included in our set. But that's a semi-educated guess.

Chasing the error message (assuming that I'm going to have to debug the Java...) I find this site: -->e:\devtools\lisp\leiningen2.7.1\lein.bat Could not transfer artifact cider:cider-nrepl:pom:0.14.0 from/to clojars (https://clojars.org/repo/): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target Could not transfer artifact lein-try:lein-try:pom:0.4.1 from/to clojars (https://clojars.org/repo/): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target This could be due to a typo in :dependencies or network issues. If you are behind a proxy, try setting the 'http_proxy' environment variable.

Googling the error "sun.security.validator.ValidatorException: PKIX path building failed" leads me to this site: https://confluence.atlassian.com/kb/unable-to-connect-to-ssl-services-due-to-pkix-path-building-failed-779355358.html

So I pulled down the SSLPoke.class and (after decompiling it to see what was really in there) ran it. I got these results:

-->"%Java_home%\bin\java" -cp . SSLPoke clojars.org 443 sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:387) at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292) at sun.security.validator.Validator.validate(Validator.java:260) at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324) at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229) at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124) at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1488) at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216) at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979) at sun.security.ssl.Handshaker.process_record(Handshaker.java:914) at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375) at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:747) at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:123) at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:138) at SSLPoke.main(SSLPoke.java:31) Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:146) at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:131) at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280) at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:382) ... 15 more

->"%Java_home%\bin\java" -cp . SSLPoke clojars.org/repo 443 java.net.UnknownHostException: clojars.org/repo at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184) 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.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:668) at sun.security.ssl.SSLSocketImpl.(SSLSocketImpl.java:427) at sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:88) at SSLPoke.main(SSLPoke.java:25)

This seemed to work: https://itestfirst.wordpress.com/2013/01/11/82/ ...in that the command "lein.bat self-install" ran (under Cygwin) with no errors.

But then entering "lein.bat help: returned the familiar:

Could not transfer artifact cider:cider-nrepl:pom:0.14.0 from/to central (https://repo1.maven.org/maven2/): proxy Could not transfer artifact lein-try:lein-try:pom:0.4.1 from/to central (https://repo1.maven.org/maven2/): proxy This could be due to a typo in :dependencies or network issues. If you are behind a proxy, try setting the 'http_proxy' environment variable.

I noticed that this was complaining about a different address. But repeating the process with this address did not further change the result. And the other address eventually showed up again, as well.

I poked around in lein.bat. I tried running the wget version with --no-check-certificate. No luck.

And, to make it even more frustrating, I was able to click on the links above after committing the last update, and go straight to the necessary files in the repositories.

This suggests, of course, that this is strictly a problem with the SSL/certificates, probably missing from the Java certificate store. So how do I fix that?

I have now (for maybe the fifth or sixth time, over the last couple years) poked around all over the internet, and found at least half a dozen "solutions"...that don't work for me. I have, again, spent the better part of a day trying to get Leiningen to work...with less success than the last two times.

I firmly and fully realize that this problem could be worked around, if I am willing to put in more time to make it work. But I am out of time to do so. And, again, I have to wonder how many other people have put in this much effort and given up as well?

mgrant0 commented 6 years ago

I am having the same issue on debian. I installed leiningen 2.8.1 via apt-get install leiningen.

I have tried running update-ca-certificates -f and dpkg-reconfigure ca-certificates but it made no difference.

I can run curl -s on the links without complaint.

lein repl
Could not transfer artifact org.clojure:tools.nrepl:jar:0.2.12 from/to central (https://repo1.maven.org/maven2/): java.lang.RuntimeException: Unexpected error:                                                                                                                                                              java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
Could not transfer artifact org.clojure:tools.nrepl:jar:0.2.12 from/to clojars (https://repo.clojars.org/): java.lang.RuntimeException: Unexpected error: java.s                                                                                                                                                             ecurity.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
Could not transfer artifact clojure-complete:clojure-complete:jar:0.2.4 from/to central (https://repo1.maven.org/maven2/): java.lang.RuntimeException: Unexpecte                                                                                                                                                             d error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
Could not transfer artifact clojure-complete:clojure-complete:jar:0.2.4 from/to clojars (https://repo.clojars.org/): java.lang.RuntimeException: Unexpected erro                                                                                                                                                             r: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
Could not transfer artifact org.clojure:tools.nrepl:pom:0.2.12 from/to central (https://repo1.maven.org/maven2/): java.lang.RuntimeException: Unexpected error:                                                                                                                                                              java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
Could not transfer artifact clojure-complete:clojure-complete:pom:0.2.4 from/to central (https://repo1.maven.org/maven2/): java.lang.RuntimeException: Unexpecte                                                                                                                                                             d error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
This could be due to a typo in :dependencies, file system permissions, or network issues.
If you are behind a proxy, try setting the 'http_proxy' environment variable.
Exception in thread "Thread-1" clojure.lang.ExceptionInfo: Could not resolve dependencies {:suppress-msg true, :exit-code 1}
        at clojure.core$ex_info.invokeStatic(core.clj:4617)
        at clojure.core$ex_info.invoke(core.clj:4617)
        at leiningen.core.classpath$get_dependencies_STAR_.invokeStatic(classpath.clj:311)
        at leiningen.core.classpath$get_dependencies_STAR_.invoke(classpath.clj:265)
        at clojure.lang.AFn.applyToHelper(AFn.java:165)
        at clojure.lang.AFn.applyTo(AFn.java:144)
        at clojure.core$apply.invokeStatic(core.clj:646)
        at clojure.core$apply.invoke(core.clj:641)
        at clojure.core$memoize$fn__10934.doInvoke(core.clj:6109)
        at clojure.lang.RestFn.invoke(RestFn.java:457)
        at leiningen.core.classpath$get_dependencies$fn__9282.invoke(classpath.clj:332)
        at leiningen.core.classpath$get_dependencies.invokeStatic(classpath.clj:330)
        at leiningen.core.classpath$get_dependencies.doInvoke(classpath.clj:324)
        at clojure.lang.RestFn.invoke(RestFn.java:445)
        at clojure.lang.AFn.applyToHelper(AFn.java:160)
        at clojure.lang.RestFn.applyTo(RestFn.java:132)
        at clojure.core$apply.invokeStatic(core.clj:652)
        at clojure.core$apply.invoke(core.clj:641)
        at leiningen.core.classpath$resolve_managed_dependencies.invokeStatic(classpath.clj:441)
        at leiningen.core.classpath$resolve_managed_dependencies.doInvoke(classpath.clj:428)
        at clojure.lang.RestFn.invoke(RestFn.java:445)
        at leiningen.core.eval$prep.invokeStatic(eval.clj:85)
        at leiningen.core.eval$prep.invoke(eval.clj:73)
        at leiningen.core.eval$eval_in_project.invokeStatic(eval.clj:362)
        at leiningen.core.eval$eval_in_project.invoke(eval.clj:356)
        at leiningen.repl$server$fn__15240.invoke(repl.clj:244)
        at clojure.lang.AFn.applyToHelper(AFn.java:152)
        at clojure.lang.AFn.applyTo(AFn.java:144)
        at clojure.core$apply.invokeStatic(core.clj:646)
        at clojure.core$apply.invoke(core.clj:641)
        at clojure.core$with_bindings_STAR_.invokeStatic(core.clj:1890)
        at clojure.core$with_bindings_STAR_.doInvoke(core.clj:1881)
        at clojure.lang.RestFn.invoke(RestFn.java:425)
        at clojure.lang.AFn.applyToHelper(AFn.java:156)
        at clojure.lang.RestFn.applyTo(RestFn.java:132)
        at clojure.core$apply.invokeStatic(core.clj:650)
        at clojure.core$apply.invoke(core.clj:641)
        at clojure.core$bound_fn_STAR_$fn__9897.doInvoke(core.clj:1912)
        at clojure.lang.RestFn.invoke(RestFn.java:397)
        at clojure.lang.AFn.run(AFn.java:22)
        at java.base/java.lang.Thread.run(Thread.java:844)
Caused by: org.eclipse.aether.resolution.DependencyResolutionException: Failed to collect dependencies at org.clojure:tools.nrepl:jar:0.2.12
        at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:351)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:564)
        at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:93)
        at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:28)
        at cemerick.pomegranate.aether$resolve_dependencies_STAR_.invokeStatic(aether.clj:806)
        at cemerick.pomegranate.aether$resolve_dependencies_STAR_.doInvoke(aether.clj:707)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.core$apply.invokeStatic(core.clj:646)
        at clojure.core$apply.invoke(core.clj:641)
        at cemerick.pomegranate.aether$resolve_dependencies.invokeStatic(aether.clj:815)
        at cemerick.pomegranate.aether$resolve_dependencies.doInvoke(aether.clj:809)
        at clojure.lang.RestFn.invoke(RestFn.java:2793)
        at leiningen.core.classpath$get_dependencies_STAR_.invokeStatic(classpath.clj:273)
        ... 38 more
Caused by: org.eclipse.aether.collection.DependencyCollectionException: Failed to collect dependencies at org.clojure:tools.nrepl:jar:0.2.12
        at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:293)
        at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:307)
        ... 53 more
Caused by: org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for org.clojure:tools.nrepl:jar:0.2.12
        at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:283)
        at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:199)
        at org.eclipse.aether.internal.impl.DefaultDependencyCollector.resolveCachedArtifactDescriptor(DefaultDependencyCollector.java:539)
        at org.eclipse.aether.internal.impl.DefaultDependencyCollector.getArtifactDescriptorResult(DefaultDependencyCollector.java:524)
        at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:412)
        at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:365)
        at org.eclipse.aether.internal.impl.DefaultDependencyCollector.process(DefaultDependencyCollector.java:353)
        at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:256)
        ... 54 more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not transfer artifact org.clojure:tools.nrepl:pom:0.2.12 from/to central (https://re                                                                                                                                                             po1.maven.org/maven2/): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-e                                                                                                                                                             mpty
        at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:422)
        at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:224)
        at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:201)
        at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:268)
        ... 61 more
Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact org.clojure:tools.nrepl:pom:0.2.12 from/to central (https://repo1.                                                                                                                                                             maven.org/maven2/): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
        at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:52)
        at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:365)
        at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:75)
        at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:583)
        at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:259)
        at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:498)
        at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:399)
        ... 64 more
Caused by: org.apache.maven.wagon.TransferFailedException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the t                                                                                                                                                             rustAnchors parameter must be non-empty
        at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:1082)
        at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:976)
        at org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:126)
        at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88)
        at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)
        at org.eclipse.aether.transport.wagon.WagonTransporter$GetTaskRunner.run(WagonTransporter.java:567)
        at org.eclipse.aether.transport.wagon.WagonTransporter.execute(WagonTransporter.java:435)
        at org.eclipse.aether.transport.wagon.WagonTransporter.get(WagonTransporter.java:412)
        at org.eclipse.aether.connector.basic.BasicRepositoryConnector$GetTaskRunner.runTask(BasicRepositoryConnector.java:453)
        at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:360)
        ... 69 more
Caused by: javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors paramete                                                                                                                                                             r must be non-empty
        at java.base/sun.security.ssl.Alerts.getSSLException(Alerts.java:214)
        at java.base/sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1969)
        at java.base/sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1921)
        at java.base/sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1904)
        at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1436)
        at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1413)
        at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:396)
        at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:355)
        at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142)
        at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:359)
        at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:381)
        at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:237)
        at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185)
        at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
        at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:111)
        at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
        at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.execute(AbstractHttpClientWagon.java:838)
        at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:999)
        ... 78 more
Caused by: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
        at java.base/sun.security.validator.PKIXValidator.<init>(PKIXValidator.java:89)
        at java.base/sun.security.validator.Validator.getInstance(Validator.java:181)
        at java.base/sun.security.ssl.X509TrustManagerImpl.getValidator(X509TrustManagerImpl.java:330)
        at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrustedInit(X509TrustManagerImpl.java:180)
        at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:192)
        at java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:133)
        at java.base/sun.security.ssl.ClientHandshaker.checkServerCerts(ClientHandshaker.java:1947)
        at java.base/sun.security.ssl.ClientHandshaker.certificateStatus(ClientHandshaker.java:1798)
        at java.base/sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:276)
        at java.base/sun.security.ssl.Handshaker.processLoop(Handshaker.java:1092)
        at java.base/sun.security.ssl.Handshaker.processRecord(Handshaker.java:1026)
        at java.base/sun.security.ssl.SSLSocketImpl.processInputRecord(SSLSocketImpl.java:1137)
        at java.base/sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1074)
        at java.base/sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973)
        at java.base/sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1402)
        at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1429)
        ... 92 more
Caused by: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
        at java.base/java.security.cert.PKIXParameters.setTrustAnchors(PKIXParameters.java:200)
        at java.base/java.security.cert.PKIXParameters.<init>(PKIXParameters.java:120)
        at java.base/java.security.cert.PKIXBuilderParameters.<init>(PKIXBuilderParameters.java:104)
        at java.base/sun.security.validator.PKIXValidator.<init>(PKIXValidator.java:86)
        ... 107 more
^C
veer66 commented 6 years ago

I suppose this is OpenJDK's issue https://bugs.openjdk.java.net/browse/JDK-8193447.

I also checked cacerts files from Ubuntu 18.04, openjdk-10.0.1_linux-x64_bin.tar.gz, and jdk-10.0.1_linux-x64_bin.tar.gz today. They are still different.

WilliamLightner commented 6 years ago

That doesn’t look like an OpenJDK issue. It looks like a problem with Leningen’s choice of certification. Without much thought about it, I would expect a tool dependent upon the OpenJDK to be compatible to the OpenJDK root certification associations. If not, it would be reasonable to provide a straight-forward path/mechanism for providing/adding them.

Certification management falls in the “ugly, unpleasant and error-prone” category if, like me, you’re not used to dealing with them...or if your certifications are managed as a corporate policy & you don’t have the option of ‘fixing’ them.

From: Vee Satayamas notifications@github.com Sent: Wednesday, May 02, 2018 20:29 To: technomancy/leiningen leiningen@noreply.github.com Cc: William Lightner johncalyn@gmail.com; Comment comment@noreply.github.com Subject: Re: [technomancy/leiningen] "Could not transfer artifact org.clojure:tools.nrepl:pom:0.2.12" when running "lein repl" (#2163)

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

I suppose this is OpenJDK's issue https://bugs.openjdk.java.net/browse/JDK-8193447https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.openjdk.java.net_browse_JDK-2D8193447&d=DwMFaQ&c=MsXLK6sQQBUgeD0JbTyYgA&r=Tj1tSe1Zjh1A02goQ6EbxOHikqLPeV6Gc7lT_K_qJZ8&m=tA-DqrJXxlLVXUf2UZm2ygEkTqJSGk4qHEVEGDosxSA&s=bAWgnlTsS9t1HWPOpVOnLMaJaOvd4UzbdLoHMbbGrxc&e=.

I also check cacerts files from Ubuntu 18.04, openjdk-10.0.1_linux-x64_bin.tar.gz, and jdk-10.0.1_linux-x64_bin.tar.gz today. They are still different.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_technomancy_leiningen_issues_2163-23issuecomment-2D386169186&d=DwMFaQ&c=MsXLK6sQQBUgeD0JbTyYgA&r=Tj1tSe1Zjh1A02goQ6EbxOHikqLPeV6Gc7lT_K_qJZ8&m=tA-DqrJXxlLVXUf2UZm2ygEkTqJSGk4qHEVEGDosxSA&s=ubG7J4QeU7ieZ4OKL6OVj7JRCvyeOe8bVkY365wKKrM&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AGi9u6D9cD-2Dg2bYKqRkIHQ0UOd7QqcQvks5tul11gaJpZM4I7vSD&d=DwMFaQ&c=MsXLK6sQQBUgeD0JbTyYgA&r=Tj1tSe1Zjh1A02goQ6EbxOHikqLPeV6Gc7lT_K_qJZ8&m=tA-DqrJXxlLVXUf2UZm2ygEkTqJSGk4qHEVEGDosxSA&s=9r9WgoFSspODscapvoGoJdiHUhz5a2IBf5HgHoiuerw&e=.

jwhitlark commented 6 years ago

The end of this post seems to have some pointers. https://www.deps.co/guides/travis-ci-latest-java/

It started happening to me after installing graalvm, so that's probably my issue.

danielcompton commented 6 years ago

Yep, these are the key lines from that post for using the system cert store instead of the JDK's one:

$ rm "${JAVA_HOME}/lib/security/cacerts"
$ ln -s /etc/ssl/certs/java/cacerts "${JAVA_HOME}/lib/security/cacerts"
stiofand commented 5 years ago

Im getting this on Ubuntu 19 with latest leiningen, has any one suggested an actionable solution yet?