Reputation: 5556
I deploy my ruby app on Dokku
However, seem that Dokku cannot fetch the url.
How can I fix ?
Thank you.
➜ world_cup_json git:(tdev) git push dokku tdev:master
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_PAPER = "vi_VN",
LC_ADDRESS = "vi_VN",
LC_MONETARY = "vi_VN",
LC_NUMERIC = "vi_VN",
LC_TELEPHONE = "vi_VN",
LC_IDENTIFICATION = "vi_VN",
LC_MEASUREMENT = "vi_VN",
LC_CTYPE = "en_US.UTF-8",
LC_TIME = "vi_VN",
LC_NAME = "vi_VN",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
Counting objects: 2584, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (1009/1009), done.
Writing objects: 100% (2584/2584), 4.34 MiB | 0 bytes/s, done.
Total 2584 (delta 1525), reused 2536 (delta 1498)
-----> Cleaning up...
-----> Building world-cup-json from herokuish...
-----> Adding BUILD_ENV to build environment...
-----> Ruby app detected
Command: 'set -o pipefail; curl -L --fail --retry 5 --retry-delay 1 --connect-timeout 90 --max-time 60 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/cedar-14/ruby-2.3.4.tgz -s -o - | tar zxf - ' failed on attempt 1 of 3.
Command: 'set -o pipefail; curl -L --fail --retry 5 --retry-delay 1 --connect-timeout 90 --max-time 60 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/cedar-14/ruby-2.3.4.tgz -s -o - | tar zxf - ' failed on attempt 2 of 3.
remote: /tmp/buildpacks/01_buildpack-ruby/lib/language_pack/shell_helpers.rb:58:in `block in run!': Command: 'set -o pipefail; curl -L --fail --retry 5 --retry-delay 1 --connect-timeout 90 --max-time 60 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/cedar-14/ruby-2.3.4.tgz -s -o - | tar zxf - ' failed unexpectedly: (LanguagePack::Fetcher::FetchError)
remote:
remote: gzip: stdin: invalid compressed data--format violated
remote: tar: Unexpected EOF in archive
remote: tar: Unexpected EOF in archive
remote: tar: Error is not recoverable: exiting now
remote: from /tmp/buildpacks/01_buildpack-ruby/lib/language_pack/shell_helpers.rb:52:in `times'
remote: from /tmp/buildpacks/01_buildpack-ruby/lib/language_pack/shell_helpers.rb:52:in `run!'
remote: from /tmp/buildpacks/01_buildpack-ruby/lib/language_pack/fetcher.rb:24:in `fetch_untar'
remote: from /tmp/buildpacks/01_buildpack-ruby/lib/language_pack/installers/heroku_ruby_installer.rb:22:in `block in fetch_unpack'
remote: from /tmp/buildpacks/01_buildpack-ruby/lib/language_pack/installers/heroku_ruby_installer.rb:16:in `chdir'
remote: from /tmp/buildpacks/01_buildpack-ruby/lib/language_pack/installers/heroku_ruby_installer.rb:16:in `fetch_unpack'
remote: from /tmp/buildpacks/01_buildpack-ruby/bin/support/download_ruby:14:in `<main>'
remote: <internal:gem_prelude>:4:in `require': cannot load such file -- rubygems.rb (LoadError)
remote: from <internal:gem_prelude>:4:in `<internal:gem_prelude>'
To [email protected]:world-cup-json
! [remote rejected] tdev -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:world-cup-json'
Upvotes: 2
Views: 1138
Reputation: 26
The error here is indeed fairly cryptic. And I also had to do a lot of searching to find the solution to this.
But the solution is fairly simple once you find it. In your server instance (where dokku is deployed), execute these two following commands:
dokku config:set --global CURL_TIMEOUT=1200
dokku config:set --global CURL_CONNECT_TIMEOUT=180
The curl command trying to download the buildpacks aren't getting enough time to execute. We simply give them a little extra time. This should solve your problem.
I originally found these commands here: https://github.com/dokku/dokku/blob/master/docs/deployment/methods/buildpacks.md
Upvotes: 1