`Mix deps.get` not fetching packages hosted on hex.pm (aws S3 indeed)

902 views
Skip to first unread message

Zhe Wang

unread,
Jan 6, 2015, 6:11:12 AM1/6/15
to elixir-l...@googlegroups.com
I am trying to get all the dependency for my Mix project through calling `Mix deps.get`. It runs fine locally. But when I call `Mix deps.get` on the host (on DigitalOcean), it will only fetch and install the packages from Github successfully (e.g. {:uuid, github: "okeuday/uuid"}), but for the packages from Hex.pm (e.g. {:phoenix, "0.7.2"}), it fails to fetch the packages and hangs there forever.

I will really appreciate any hint on what may be going on. I have no trouble directly getting the packages on S3 though (i.e. commands like `wget https://s3.amazonaws.com/s3.hex.pm/tarballs/plug-0.9.0.tar` works fine).

Thanks!

José Valim

unread,
Jan 6, 2015, 7:05:43 AM1/6/15
to elixir-l...@googlegroups.com
Do you see any error or anything being logged?



José Valim
Skype: jv.ptec
Founder and Lead Developer

--
You received this message because you are subscribed to the Google Groups "elixir-lang-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-ta...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Zhe Wang

unread,
Jan 6, 2015, 12:48:49 PM1/6/15
to elixir-l...@googlegroups.com
Thanks. Is there a place for seeing the Mix log only?

Or I have to dig the system logs?

José Valim

unread,
Jan 6, 2015, 12:56:56 PM1/6/15
to elixir-l...@googlegroups.com
Well, Mix was supposed to log directly to your terminal, even more in case of failures. Eric, does Hex have a verbose or debug flag available?



José Valim
Skype: jv.ptec
Founder and Lead Developer

On Tue, Jan 6, 2015 at 6:48 PM, Zhe Wang <zhew...@gmail.com> wrote:
Thanks. Is there a place for seeing the Mix log only?

Or I have to dig the system logs?

Eric Meadows-Jönsson

unread,
Jan 7, 2015, 12:30:09 AM1/7/15
to elixir-l...@googlegroups.com
There is no special logging in Hex in addition to what Mix prints to the terminal.

Zhe, are you seeing nothing in the terminal after you run the `mix deps.get` command? If there is any output whatsoever please include it here. Remember to always try to include as much information as possible. Saying it works on one machine but not the other isn't much help for us diagnosing the problem :).

Can you verify that the project on your machine where it works and the machine where it doesn't work are exactly the same? Please also include the contents of the files `mix.exs` and `mix.lock`.

If this information doesn't help us figure out the issue we can turn on tracing of the HTTP client Hex uses or add verbose logging to Hex. 
--
Eric Meadows-Jönsson

Zhe Wang

unread,
Jan 7, 2015, 1:36:21 AM1/7/15
to elixir-l...@googlegroups.com
Thanks Eric.

There is nothing in the terminal after I run `mix deps.get`. I do can see following if I run `mix deps.clean --all` first:

* Getting bcrypt (git://github.com/opscode/erlang-bcrypt.git)

Cloning into '/root/tmp/deps/bcrypt'...

remote: Counting objects: 427, done.

remote: Compressing objects: 100% (206/206), done.

remote: Total 427 (delta 193), reused 427 (delta 193)

Receiving objects: 100% (427/427), 582.50 KiB | 546.00 KiB/s, done.

Resolving deltas: 100% (193/193), done.

Checking connectivity... done.

* Getting uuid (git://github.com/okeuday/uuid.git)

Cloning into '/root/tmp/deps/uuid'...

remote: Counting objects: 378, done.

remote: Total 378 (delta 0), reused 0 (delta 0)

Receiving objects: 100% (378/378), 96.27 KiB | 0 bytes/s, done.

Resolving deltas: 100% (176/176), done.

Checking connectivity... done.


And that is it. These two are all hosted on Github, and the remaining ones I am unable to get are all on Hex.pm (hosted by Amazon S3?). These includes:

{:phoenix, "0.7.2"}, {:linguist, "~> 0.1.4"}, {:cowboy, "~> 1.0.0"}, {:postgrex, ">= 0.0.0"}, {:ecto, "~> 0.4.0"},


The original file content can be viewed at:

https://github.com/jw2013/elixir-china/blob/master/mix.exs

https://github.com/jw2013/elixir-china/blob/master/mix.lock

----

Can you verify that the project on your machine where it works and the machine where it doesn't work are exactly the same? 

Yes, I just fetch it directly from the Github.


I will really appreciate your help!

Thanks,
Zhe

Eric Meadows-Jönsson

unread,
Jan 7, 2015, 3:47:26 AM1/7/15
to elixir-l...@googlegroups.com

Thanks for the additional information.

Can you run elixir -e ":inets_trace.enable(:max, 'trace.txt', :httpc)" -S mix deps.get. This runs the deps.get task with HTTP tracing enabled, the output will be in the trace.txt file. Please gist the file contents and link it here.

Zhe Wang

unread,
Jan 7, 2015, 4:15:32 AM1/7/15
to elixir-l...@googlegroups.com
Thanks a lot, Eric.

José Valim

unread,
Jan 7, 2015, 4:21:27 AM1/7/15
to elixir-l...@googlegroups.com
This is just a guess based on the gist... can the issue be the proxy options?

It seems it uses localhost:4001 as a proxy... are any of the http_proxy or https_proxy (or uppercase variants) environment variables set?



José Valim
Skype: jv.ptec
Founder and Lead Developer

Zhe Wang

unread,
Jan 7, 2015, 4:37:16 AM1/7/15
to elixir-l...@googlegroups.com, jose....@plataformatec.com.br
Jose, you are awesome.

Just unset it and it works like a charm. Thanks a lot.... and thanks Eric. 

José Valim

unread,
Jan 7, 2015, 4:46:20 AM1/7/15
to elixir-l...@googlegroups.com
Awesome, I have opened an issue in hex so we log when those are used:






José Valim
Skype: jv.ptec
Founder and Lead Developer

Reply all
Reply to author
Forward
0 new messages