elm-package
elm-package copied to clipboard
elm package install fails in vagrant ssh
When attempting to run elm package install for the first time on a project I received the following error
Error: failed with 'FailedConnectionException "codeload.github.com" 443' when sending request to
<http://github.com/elm-lang/core/zipball/2.1.0/>
I found a similar issue at https://groups.google.com/forum/#!topic/elm-discuss/I6TUhuBRcMI. The suggest provided works; if I load the box through VirtualBox and run the same command, everything runs smoothly.
Elm Platform: 0.15.1 Vagrant: 1.6.5 Host: Debian 8.1 Vagrant Provider: VirtualBox 4.3.1.8_Debian r96516 Vagrant File:
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
hostname = "elm.box"
locale = "en_US.UTF.8"
# Box
config.vm.box = "ubuntu/vivid64"
# Shared folders
config.vm.synced_folder ".", "/srv"
# Setup
config.vm.provision :shell, :inline => "touch .hushlogin"
config.vm.provision :shell, :inline => "hostnamectl set-hostname #{hostname} && locale-gen #{locale}"
config.vm.provision :shell, :inline => "apt-get update --fix-missing"
config.vm.provision :shell, :inline => "apt-get install -q -y g++ make git curl vim"
# Lang
config.vm.provision :shell, :inline => "apt-get install -q -y nodejs-legacy"
config.vm.provision :shell, :inline => "apt-get install -q -y npm"
config.vm.provision :shell, :inline => "npm install --global elm"
# VirtualBox
config.vm.provider "virtualbox" do |v|
v.memory = 1024
end
end
p.s. A big thank you to anyone developing or promoting Elm. It is by far the most fun language I have ever used.
Further development, I can install elm-core using the work around but evancz/elm-html still fails with the error:
Error: failed with 'FailedConnectionException "codeload.github.com" 443' when sending request to
<http://github.com/evancz/elm-html/zipball/4.0.1/>
Zipball is a problem for some reason.
This also happens when building using a Dockerfile or running the command in a Docker container. It would be very useful if there was a --verbose flag for debugging.
Here's a small script as workaround: https://gist.github.com/agrafix/11d33acb137646b317d1
Usage:
./elm-install.py circuithub/elm-bootstrap-html 6.3.1
Thanks @b1collector :D
Does @agrafix's workaround sort this out for you?
I have seen folks run into this in docker containers where it mattered whether or not there was other network traffic in other docker containers. So my theory is that the root problem is in the underlying HTTP library in Haskell, some weird corner case there. If that is a plausible theory, I'm not sure if we have the power to fix this in Elm land and should close this issue and track it down to http://hackage.haskell.org/package/http-client
Are there any issues open in relation to http://hackage.haskell.org/package/http-client that are similar to this?
@evancz in my script I have to retry the download in some cases. Maybe that would be a possible quick fix for elm-package, too?
@agrafix Thank you. Your script works like a charm.
@evancz I checked the http-client's github and none of the issues appear related to this. Maybe they have a separate bug tracker somewhere else?
@agrafix thank you for this script.
This is becoming a problem for our build servers as our number of dependencies increases. If any one of the dependencies fails to download, the whole build dies, so we're starting to see a lot of failures.
Would some sort of "retry up to 3 times" logic (on a per-package basis) seem like reasonable behavior here?
Does this still happen with 0.17?
I no longer have the issue with 0.17 on Vagrant 1.7.4. Thanks!
I just started experiencing this issue both inside of Docker and outside of it using elm 0.18.0:
> elm-make elm/*.elm --yes --output public/assets/javascripts/elm.js && uglifyjs public/assets/javascripts/elm.js --output public/assets/javascripts/elm.js --compress --mangle
Starting downloads...
● Bogdanp/elm-time 1.4.0
● Bogdanp/elm-datepicker 3.0.2
● Bogdanp/elm-combine 3.1.1
● elm-lang/dom 1.1.1
● elm-lang/core 5.1.1
● elm-lang/http 1.0.0
● myrho/elm-round 1.0.1
● elm-lang/html 2.0.0
● elm-lang/virtual-dom 2.0.4
● krisajenkins/remotedata 4.3.0
● cuducos/elm-format-number 2.0.0
● elm-lang/lazy 2.0.0
✗ elm-community/list-extra 5.0.1
Error: The following HTTP request failed.
<https://github.com/elm-community/list-extra/zipball/5.0.1/>
FailedConnectionException "codeload.github.com" 443
Edit: nevermind, looks like the issue cleared itself up pretty quickly.
This is adversely affecting the reliability of our production deploys as well. codeload.github.com seems to go through occasional periods of instability, during which times dependencies randomly fail to download with FailedConnectionException. We’ve mostly mitigated it by re-trying elm-package install --yes if it fails on the first attempt, and not clearing elm-stuff before the retry (which we do before the deploy).
I'm hitting this right now as well...