technomancy / leiningen

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

First time running "lein repl". Non stop crashing. #2168

Closed adg-adg closed 8 years ago

adg-adg commented 8 years ago

Have reinstalled java and re downloaded the script a number of times. A very annoying problem keeping me from working with Clojure. Only downloaded the script and enabled it for running. Ubuntu 16.04 Running java -version: java version "1.8.0_91" Java(TM) SE Runtime Environment (build 1.8.0_91-b14) Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)

lein -version: Leiningen 2.6.1 on Java 1.8.0_91 Java HotSpot(TM) 64-Bit Server VM

Could not transfer artifact org.clojure:tools.nrepl:pom:0.2.12 from/to central (https://repo1.maven.org/maven2/): 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 clojure-complete:clojure-complete:pom:0.2.4 from/to central (https://repo1.maven.org/maven2/): 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 org.clojure:clojure:pom:1.8.0 from/to central (https://repo1.maven.org/maven2/): 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. 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$fn6613.invokeStatic(classpath.clj:295) at leiningen.core.classpath$fn6613.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$fn5708.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$fn11767.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_bindingsSTAR.invokeStatic(core.clj:1881) at clojure.core$with_bindingsSTAR.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_fnSTAR$fn4671.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 0x40355b37 "org.clojure:tools.nrepl:jar:0.2.12 (compile)"] #object[org.sonatype.aether.graph.Dependency 0x7b860363 "clojure-complete:clojure-complete:jar:0.2.4 (compile)"] #object[org.sonatype.aether.graph.Dependency 0x5e8c24da "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_dependenciesSTAR.invokeStatic(aether.clj:720) at cemerick.pomegranate.aether$resolve_dependenciesSTAR.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$fn6613.invokeStatic(classpath.clj:258) ... 34 more Caused by: org.sonatype.aether.collection.DependencyCollectionException: Failed to collect dependencies for [#object[org.sonatype.aether.graph.Dependency 0x40355b37 "org.clojure:tools.nrepl:jar:0.2.12 (compile)"] #object[org.sonatype.aether.graph.Dependency 0x7b860363 "clojure-complete:clojure-complete:jar:0.2.4 (compile)"] #object[org.sonatype.aether.graph.Dependency 0x5e8c24da "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/): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target 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/): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target 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: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target 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.SSLHandshakeException: 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.ssl.Alerts.getSSLException(Alerts.java:192) at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949) at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302) at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296) at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1509) 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.startHandshake(SSLSocketImpl.java:1403) 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: 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:1491) ... 29 more 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:141) at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126) at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280) at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:382) ... 35 more

winks commented 8 years ago

Does this issue help?

adg-adg commented 8 years ago

The distro is fully updated as far as I know, so can't simply update nss. Already fully reinstall openjdk-8 to oracle-java8 to no effect. This has been going on for weeks, but I took a break from trying to fix it. What are some dependencies I should check or reinstall and what could be a possible culprit. This whole issue is very perplexing since I have basically not done any work with clojure as of yet. It might be important to add that I have installed an Intellij plugin Cursive for clojure development, but have not done anything other than get lost, possibly due to it not working because leiningen isn't working. Please help with anything, really want to get this sorted out.

winks commented 8 years ago

Trying to reproduce. So far, openjdk-8-jdk-headless seems to work fine:

root@ubuntu-xenial:/home/ubuntu# uname -a
Linux ubuntu-xenial 4.4.0-28-generic #47-Ubuntu SMP Fri Jun 24 10:09:13 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

root@ubuntu-xenial:/home/ubuntu# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04 LTS
Release:    16.04
Codename:   xenial

root@ubuntu-xenial:/home/ubuntu# java -version 
openjdk version "1.8.0_91"
OpenJDK Runtime Environment (build 1.8.0_91-8u91-b14-0ubuntu4~16.04.1-b14)
OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)
winks commented 8 years ago

Also with Oracle's JDK

ubuntu@ubuntu-xenial:~$ /opt/java/bin/java -version
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)

ubuntu@ubuntu-xenial:~$ JAVA_CMD=/opt/java/bin/java ./lein repl
nREPL server started on port 37803 on host 127.0.0.1 - nrepl://127.0.0.1:37803
adg-adg commented 8 years ago

Well it seems identical in that case. What could be an issue at stake here?

axg@isidio:~/bin$ uname -a Linux isidio 4.4.0-28-generic #47-Ubuntu SMP Fri Jun 24 10:09:13 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

and my java version is the same as the one you test. I really appreciate the effort. What could be a possible issue with this? My current Ubuntu install was upgraded from 15.10 to 16.04, maybe there is some discrepancy there. What else could I check, or is my only option reinstalling Ubuntu due to some hidden bug?

This continue to be the print out: http://pastebin.com/E0QttXVN

winks commented 8 years ago

a) are you behind a proxy? b) can you try curl -v https://repo1.maven.org/maven2/ c) can you try LEIN_JAVA_OPTS="-Djavax.net.debug=SSL" lein repl

winks commented 8 years ago

Maybe dpkg-reconfigue ca-certificates also helps.

cf: https://github.com/docker-library/openjdk/issues/19

hypirion commented 8 years ago

I've had issues with this on ubuntu before, sometimes the certificates aren't properly setup.

sudo update-ca-certificates -f

seems to usually resolve the issue.

adg-adg commented 8 years ago

curl -v https://repo1.maven.org/maven2/

http://pastebin.com/7YZbnfyg

LEIN_JAVA_OPTS="-Djavax.net.debug=SSL" lein repl

http://pastebin.com/3sUuWS7X

dpkg-reconfigure ca-certificates

http://pastebin.com/2ieDgB6m

sudo update-ca-certificates -f

http://pastebin.com/V2sCEQc6

I have no idea what could be causing this anymore. These commands seemed to execute properly but the issue remains. This is what I continue to get when running a simple lein repl (it hangs on that last line and I terminate with C-c :

http://pastebin.com/nakT7Ykr

adg-adg commented 8 years ago

Ended up doing a clean reinstall of the system. Thankfully everything is easy and understandable to setup with my linux setup. No problems this time around. Thanks for all the help in trying to find a possible culprit.

hypirion commented 8 years ago

Thanks for being patient :) If you end up with this issue again, feel free to reopen.

maw87 commented 8 years ago

Had the same issue, using Ubuntu 15.10, Java 1.8 and 4.2.0-42, fixed it by updating the certs with "sudo update-ca-certificates -f". Thanks for the tip.

z0del commented 7 years ago

Same issue on my Calculate Linux (Gentoo)

xueluofeng commented 5 years ago

Maybe dpkg-reconfigue ca-certificates also helps.

cf: docker-library/openjdk#19

thx