Closed ibcoleman closed 6 years ago
This seems like a DNS or networking problem. I can't think of anything in Leiningen that would cause this.
It's extremely odd. There's no other piece of software on this machine where networking behaves like this. (e.g gradle, git, etc, etc, etc...)
@ibcoleman can you try some older versions of Leiningen?
@danielcompton I get the same error. On a whim I tried running as sudo and it looks like it was able to resolve the addresses of the remote repositories. I installed leiningen to /usr/local/bin:
curl https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein > lein
sudo mkdir -p /usr/local/bin/
sudo mv lein /usr/local/bin/lein
sudo chmod a+x /usr/local/bin/lein
export PATH=$PATH:/usr/local/bin
But if I install it as a non-root user to ~/bin then things look like they're working properly. I'm going to chalk this up to Mac OSX weirdness.
Sorry, do you mean to say that the ability of the JVM to correctly resolve domain names depends on the location in which the shell script is located? Or that it depends on whether it's being run as root or not?
Names were being resolved as root but not as a non-privileged user. It seems like the name resolution was in a broken state after an OSX upgrade. It was only failing in terminal. Bizarre. On Fri, Dec 15, 2017 at 12:31 PM Phil Hagelberg notifications@github.com wrote:
Sorry, do you mean to say that the ability of the JVM to correctly resolve domain names depends on the location in which the shell script is located? Or that it depends on whether it's being run as root or not?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/technomancy/leiningen/issues/2368#issuecomment-352064860, or mute the thread https://github.com/notifications/unsubscribe-auth/ABj6DUt50MxZ71SocR1Zlhwe_1fp34z7ks5tAq0JgaJpZM4Q8QtO .
We have exactly the same issue on Ubuntu, where name resolution works as sudo, but not as an unprivileged user.
Could not transfer artifact org.clojure:tools.namespace:pom:0.2.11 from/to central (https://repo1.maven.org/maven2/): Connect to [localhost/127.0.0.1] failed: Connection refused (Connection refused)
@j-pb Could you please give the output of lsb_release -a
and java -version
? And I assume you're running lein 2.8.1?
I have the same problem on Mac OS 10.14.2 + Lein 2.8.3. In my case the problem was in empty http_proxy
environment variable (set by Bash It I believe). It was tricky to spot because echo $http_proxy
gave no output, however variable was set to an empty string. So just running unset http_proxy
did the trick.
I think it's the DNS problem, adding a nameserver 8.8.8.8 to solve this problem.
Well, I had the same issue Ubuntu 20.04/Windows 10. Please, follow below steps:
1) Check clojars.org website.
If you can not visit website (your Internet Provider
blocks this website), then:
1) Use OpenVPN on Ubuntu (the easiest way)/I don't know VPN tools on Windows 10 (so, google it)
2) Or other methods to get access to visit this website from terminal
If you can visit website
1) Don't give up, ask somebody (community) to help in clojure channel (slack, discord and etc)
I installed Leiningen via the script (according to these instructions: http://www.lispcast.com/clojure-mac). After installing lein will return the version, and will successfully create a project with
lein new app foobar
.The odd thing is, it won't resolve any dependencies. For example, if I do:
For some reason, lein seems to be trying to connect to localhost instead of maven.org or clojars.org. I have a VPN client (which is not active) but I do not have any proxy env variables set:
If I add some arbitrary dependency to my ~/.lein/profile.clj, I get the following failure to resolve dependencies, again looking like it can't resolve the URLs:
Finally, I have no issues resolving, say, clojars.org from the CL.
I've posed the question on the clojure::leiningen slack channel, and asked in a few other places, but no one seems to have a clue why this clean install can't resolve URLs. Any suggestions?
Thanks!
--Ian