Dokku无法下载buildpack

时间:2018-06-26 04:25:52

标签: ruby heroku dokku

我将红宝石应用程序部署在Dokku上
但是,Dokku似乎无法获取该URL。
我该如何解决?
谢谢。

➜  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 dokku@206.189.84.191:world-cup-json
 ! [remote rejected] tdev -> master (pre-receive hook declined)
error: failed to push some refs to 'dokku@206.189.84.191:world-cup-json'

1 个答案:

答案 0 :(得分:1)

这里的错误确实是很神秘的。而且,我还必须进行大量搜索才能找到解决方案。

但是一旦找到解决方案,它就相当简单。在您的服务器实例(已部署dokku)中,执行以下两个命令:

dokku config:set --global CURL_TIMEOUT=1200

dokku config:set --global CURL_CONNECT_TIMEOUT=180

尝试下载buildpack的curl命令没有足够的时间执行。我们只是给他们一点额外的时间。这应该可以解决您的问题。

我最初在这里找到这些命令:https://github.com/dokku/dokku/blob/master/docs/deployment/methods/buildpacks.md