Докку не удалось скачать buildpack - PullRequest
0 голосов
/ 26 июня 2018

Я развернул мое приложение ruby ​​на 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 голосов
/ 20 июля 2018

Ошибка здесь действительно довольно загадочная.И мне также пришлось много искать, чтобы найти решение этой проблемы.

Но решение довольно простое, когда вы его найдете.В вашем экземпляре сервера (где развернута 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

...