Dokku 无法下载构建包



>我在 Dokku
上部署我的 ruby 应用程序 但是,似乎 Dokku 无法获取网址。
我该如何解决?
谢谢。

➜  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'

这里的错误确实相当神秘。我还必须做很多搜索来找到解决这个问题的方法。

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

dokku config:set --global CURL_TIMEOUT=1200
dokku config:set --global CURL_CONNECT_TIMEOUT=180

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

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

相关内容

  • 没有找到相关文章

最新更新