Amazon S3 which Hex uses to host all packages is having an outage: https://status.aws.amazon.com/. Until it’s back up the package repository will be unavailable.
We don’t know if the error is due to an outage so giving an “outage error” in mix would be hard. I’m currently investigating why Hex is timing out internally instead of showing an error message. You can set HEX_OFFLINE=1 to force Hex into offline mode and use the local cache when available.
Even when specified it does not work once you’ve ran it normally… Why is certifi not cached locally when I’ve not cleaned my deps?!? My build is hosed right now at work, blah…
$ HEX_OFFLINE=1 mix compile
Unchecked dependencies for environment dev:
* plug (Hex package)
the dependency is not available, run "mix deps.get"
** (Mix) Can't continue due to errors on dependencies
$ HEX_OFFLINE=1 mix deps.get
** (Mix) Hex is running in offline mode and the registry entry for package certifi is not cached locally
$ mix deps.get
** (exit) exited in: GenServer.call(#PID<0.118.0>, {:versions, "certifi"}, 60000)
** (EXIT) time out
(elixir) lib/gen_server.ex:737: GenServer.call/3
(hex) lib/hex/remote_converger.ex:208: Hex.RemoteConverger.check_dep/2
(elixir) lib/enum.ex:651: anonymous fn/3 in Enum.each/2
(stdlib) lists.erl:1263: :lists.foldl/3
(elixir) lib/enum.ex:1772: Enum.each/2
(hex) lib/hex/remote_converger.ex:38: Hex.RemoteConverger.converge/2
(mix) lib/mix/dep/converger.ex:91: Mix.Dep.Converger.all/4
(mix) lib/mix/dep/converger.ex:50: Mix.Dep.Converger.converge/4
I’m guessing by registry you do not mean a global one like maven uses (I’ve not looked into how hex stores things locally beyond it ending up in deps) so… my work is stuck… >.<
Hmm, I could switch everything to git I guess… >.>
To elaborate on @wojtekmach’s response to cache ~/.hex/packages you should also cache ~/.hex/cache.ets for Hex to work without being able to connect to the repository.
We have some ideas for making the repository more resilient for future incidents.
As a first step we will add S3 replication to buckets in Europe and Asia and set Fastly (our CDN in front of S3) to fail over to the other regions if the main origin start erroring out.
Another thing would be for the community to help out with providing mirrors. We have some unofficial mirrors already [1] but AFAIK they are all basically caching HTTP proxies so they may not help if the origin goes down. We have specified in the docs everything needed to run a mirror [2] so if anyone wants to create and host a mirror that would be really helpful for the future.
Certifi is a very big package so it’s likely it’s the only that breaks because the other’s are much smaller. Are you using latest version of Hex and how long does it take until the request times out?
Should I try with latest version of elixir and hex? The timeout is really small but I can’t find a way to make it longer (it’s less than 10sec I think)