Fork me on GitHub
#leiningen
<
2017-11-13
>
chrisn17:11:02

stuck with an odd issue I have never seen before:

[email protected]:~/dev/http-kit$ lein install
Could not transfer artifact com.amazonaws:aws-java-sdk-s3:pom:1.9.0 from/to central (): Host name '' does not match the certificate subject provided by the peer (CN=, O="Sonatype, Inc", L=Fulton, ST=MD, C=US)
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.

podviaznikov17:11:45

I have the same issue today as @chrisn.

Could not transfer artifact com.firebase:firebase-client-jvm:pom:2.5.2 from/to central (): Host name '' does not match the certificate subject provided by the peer (CN=, O="Sonatype, Inc", L=Fulton, ST=MD, C=US)
. Never seen this before

cjsauer18:11:39

I'm also getting a bunch of SSL certificate issues that I've never encountered before

cjsauer18:11:05

This is on a fresh Ubuntu 16.04 install and using the default-jre/jdk packages

cjsauer18:11:22

Leiningen 2.8.1 on Java 1.8.0_151 OpenJDK 64-Bit Server VM

cjsauer18:11:43

Tried rolling back to 2.7.1 with no luck

podviaznikov18:11:52

no, I also tried different version of lein(2.5 and latest one). But from reading error it seems that Maven central certs are not correct

bostonaholic18:11:01

I have a coworker experiencing this exact problem atm

Komcrad18:11:01

I reproduced this on two arch linux machines and a windows 10 machine. I agree with @podviaznikov

podviaznikov19:11:19

nice, seems to be fixed too

Komcrad19:11:21

@bostonaholic It's working for me now. Sweet.

Komcrad19:11:47

had to switch my windows machines to use 8.8.8.8 for dns.

derpocious19:11:50

Hey all, I'm trying to install leiningen on windows 7. I ran self install, added everything to my PATH, but still whenever I run lein anything it returns this: "Could not find or load main class clojure.main" has anyone encountered this before? I can't seem to find any solution online.

derpocious22:11:08

Where can I find the stack trace?

hlship22:11:06

I'm working on doing a build in an internal, locked down environment. No access to Clojars or Maven Central. On a lein install I'm seeing a 30 minute timeout, then lot of these exceptions:

Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Could not transfer artifact org.clojure:clojure:pom:1.8.0 from/to central (): Connect to  [] failed: Connection timed out (Connection timed out)
   at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve (DefaultArtifactResolver.java:538)
      org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts (DefaultArtifactResolver.java:216)
      org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact (DefaultArtifactResolver.java:193)
      org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom (DefaultArtifactDescriptorReader.java:281)
      org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor (DefaultArtifactDescriptorReader.java:186)
      org.sonatype.aether.impl.internal.DefaultDependencyCollector.process (DefaultDependencyCollector.java:412)
      org.sonatype.aether.impl.internal.DefaultDependencyCollector.process (DefaultDependencyCollector.java:544)
      org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDependencies (DefaultDependencyCollector.java:240)
      org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveDependencies (DefaultRepositorySystem.java:333)
      sun.reflect.NativeMethodAccessorImpl.invoke0 (:-2)
      sun.reflect.NativeMethodAccessorImpl.invoke (:-1)
      sun.reflect.DelegatingMethodAccessorImpl.invoke (:-1)
      java.lang.reflect.Method.invoke (:-1)
      clojure.lang.Reflector.invokeMatchingMethod (Reflector.java:93)
      clojure.lang.Reflector.invokeInstanceMethod (Reflector.java:28)
Outside of lein install things are working well, because we are using a mirror; from profiles.clj:
:mirrors
{#"clojars|central"
 {:name "internal-nexus"
  :url ""}}
It seems like the lein install task is ignoring the :mirrors. Any advice on how to get it to work from our internal Nexus instead?

hlship22:11:33

From what I can tell, this is related to the pom task.

hlship22:11:03

Probably not; our internal build system explicitly locks down everything outside, including Clojars and Central. Our internal Nexus white-lists artifacts from there. What's odd here is that before the install, we've done a build and test, so everything needed by our project, and by Leiningen, has already been downloaded through the internal Nexus. But something about POM generation seems to be taking a different path, and is accessing directly.

hlship22:11:27

But, ok, I see your point, my mirros rule may not be sufficient. I can try adding a bit more to it so ensure it matches anything .http://maven.org for example.

danielcompton22:11:24

Dunno, just spitballing, it's the only recent change I can see that would cause this. I'm assuming that this used to work?

hlship22:11:42

Well, we're sticking with 2.7.1 for the meantime. "used to work" isn't meaningful ... we're moving from a vanilla Jenkins to this internal CI based on Jenkins that operates in a significantly locked down environment. Very enterprisey.

danielcompton22:11:14

Oh, so this isn't something that just broke today?

hlship22:11:55

Nope, I'm just doing to the work to move to the internal CI today.

danielcompton22:11:41

@hlship looks like its trying to connect to , is that correct?

hlship22:11:22

Yes, and our built-in mirror rules should be redirecting it to our Internal nexus.

hlship22:11:50

I tried adding a more specific mirror rule, but Leiningen noticed that its duplicate:

+ lein install
Leiningen's classpath: :/usr/share/java/leiningen-2.7.1-standalone.jar
java.lang.IllegalArgumentException: Multiple mirrors configured to match repository {"central" ""}: {"" {:name "internal-nexus", :url ""}, #"clojars|central" {:name "internal-nexus", :url ""}}

hlship22:11:41

So I've circled back to "aether pom generation doesn't honor the :mirrors" as a working theory.

ajs22:11:58

which profile in project.clj is the one that is distributed in a clojars dependency?

hlship23:11:01

I've added my details to this above issue. Looks like a match. A work-around would be most welcome!

hlship20:11:56

Workaround: :mirrors in ~/.lein/profiles.clj doesn't work for deployment (it does work for most other tasks I've found). You have to move the :mirrors into project.clj. In my case, that means a lot of unwanted duplication across projects.