deis / builder

Git server and application builder for Deis Workflow
https://deis.com
MIT License
40 stars 41 forks source link

fatal: The remote end hung up unexpectedly with multibuildpack #397

Closed olalonde closed 8 years ago

olalonde commented 8 years ago

I am starting to move apps to from deis v1 to deis v2 and am stuck with an app that uses heroku multi buildpack.

$ deis config
[...]
BUILDPACK_URL               https://github.com/heroku/heroku-buildpack-multi

In my repo, I have the following .buildpacks file:

https://github.com/heroku/heroku-buildpack-ruby.git
https://github.com/heroku/heroku-buildpack-nodejs.git

The build is successful on deis v1 but fails on deis v2 with a not really helpful error message:

       Resolving node version 6.x.x via semver.io...
       Downloading and installing node 6.3.1...
Connection to deis-builder.deis2.domain.com closed by remote host.
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly

Here's the full log:

$ git push deis                                                                                                                                                          master
Counting objects: 9155, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (3176/3176), done.
Writing objects: 100% (9155/9155), 56.81 MiB | 1.42 MiB/s, done.
Total 9155 (delta 6512), reused 8080 (delta 5760)
Starting build... but first, coffee!
-----> Fetching custom buildpack
-----> Multipack app detected
       =====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-ruby.git
       =====> Detected Framework: Ruby
-----> Compiling Ruby
-----> Using Ruby version: ruby-2.2.2
-----> Installing dependencies using bundler 1.12.5
       Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
       Fetching gem metadata from https://rubygems.org/
       Fetching version metadata from https://rubygems.org/
       Fetching dependency metadata from https://rubygems.org/
       Installing colorator 0.1
       Installing sass 3.4.21
       Installing ffi 1.9.10 with native extensions
       Installing rb-fsevent 0.9.7
       Installing kramdown 1.10.0
       Installing liquid 3.0.6
       Installing mercenary 0.3.5
       Installing rouge 1.10.1
       Installing safe_yaml 1.0.4
       Using bundler 1.12.5
       Installing jekyll-sass-converter 1.4.0
       Installing rb-inotify 0.9.7
       Installing listen 3.0.6
       Installing jekyll-watch 1.3.1
       Installing jekyll 3.1.2
       Bundle complete! 1 Gemfile dependency, 15 gems now installed.
       Gems in the groups development and test were not installed.
       Bundled gems are installed into ./vendor/bundle.
       Bundle completed (26.25s)
       Cleaning up the bundler cache.

       ###### WARNING:
       No Procfile detected, using the default web server.
       We recommend explicitly declaring how to boot your server process via a Procfile.
       https://devcenter.heroku.com/articles/ruby-default-web-server

       =====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-nodejs.git
       =====> Detected Framework: Node.js

-----> Creating runtime environment

       NPM_CONFIG_LOGLEVEL=error
       NPM_CONFIG_PRODUCTION=false
       NODE_ENV=production
       NODE_MODULES_CACHE=true

-----> Installing binaries
       engines.node (package.json):  6.x.x
       engines.npm (package.json):   3.8.x

       Resolving node version 6.x.x via semver.io...
       Downloading and installing node 6.3.1...
Connection to deis-builder.deis2.domain.com closed by remote host.
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly

I've succesfuly built and deployed regular Node Procfile apps so I assume this is an issue with the multi buildpack.

olalonde commented 8 years ago

The actual issue was that the AWS ELB through which git requests transit had a too low time out and would disconnect me if the build took longer than 1minute. This is explained here actually: https://deis.com/docs/workflow/managing-workflow/configuring-load-balancers/#idle-connection-timeouts

Fixed with:

# find elb name with: aws elb describe-load-balancers
ELB_NAME="a5e901f96530c11e6a5e2068755380ef"
aws elb modify-load-balancer-attributes --load-balancer-name "$ELB_NAME" --load-balancer-attributes "{\"ConnectionSettings\":{\"IdleTimeout\":1200}}"

Related: https://github.com/deis/builder/issues/140#issuecomment-178167749