Welcome! Please see the About page for a little more info on how this works.

0 votes
ago in Tools by

Since GitHub (still) do not support IPv6 it is not possible to follow the instructions at https://clojure.org/guides/install_clojure (for Linux, say) to install the Clojure CLI on a machine running ONLY IPv6 (in this case Hertzner).

When downloading the .tar.gz-file manally and uploading it directly, installing the CLI tools is possilbe.

The problems seem to continue installing common clojure dependencies, like data.json 2.5.2, which leads to this:

clj -X:server
Error building classpath. Failed to read artifact descriptor for org.clojure:data.json:jar:2.5.2
org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for org.clojure:data.json:jar:2.5.2
	at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:255)
	at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:171)
	at org.eclipse.aether.internal.impl.DefaultRepositorySystem.readArtifactDescriptor(DefaultRepositorySystem.java:263)
	at clojure.tools.deps.extensions.maven$read_descriptor.invokeStatic(maven.clj:115)
	at clojure.tools.deps.extensions.maven$fn__1340.invokeStatic(maven.clj:143)
	at clojure.tools.deps.extensions.maven$fn__1340.invoke(maven.clj:143)
	at clojure.lang.MultiFn.invoke(MultiFn.java:244)
	at clojure.tools.deps$expand_deps$children_task__959$fn__961$fn__962.invoke(deps.clj:299)
    ...
Caused by: java.net.SocketException: Network is unreachable
at java.base/sun.nio.ch.Net.connect0(Native Method)
at java.base/sun.nio.ch.Net.connect(Net.java:546)
at java.base/sun.nio.ch.Net.connect(Net.java:535)
at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:585)
at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.jar

All this seem a bit bisarre of course. Workarounds would make me happy!

1 Answer

0 votes
ago by

I haven't double-checked this but it seems that repo1.maven.org is IPv4-only, so you can't download artifacts from your IPv6-only server.

However, Sonatype offer https://ipv6.repo1.maven.org/maven2 for IPv6.

I don't know whether you can override the Maven Central URL that the Clojure CLI uses -- because it knows about Maven and Clojars internally and checks them in order first, for security reasons.

Hopefully, Alex will chime in on this.

ago by
Thank you, Sean!

I found some tooling options that enforces IPv6 better:

export JAVA_TOOL_OPTIONS="-Djava.net.preferIPv4Stack=false -Djava.net.preferIPv6Addresses=true"

But still GitHub does not have IPv6-support,.

It also seems like repo.clojars.org does not have correct IPv6-support, (clojars.org works!)

https://github.com/clojars/clojars-web/issues/941
ago by
Yeah, between Maven's regular repo URL and Clojars and GitHub all not offering IPv6, I don't know how far you're going to get.
...