【问题标题】:Rails 6 Capistrano Deploy Failing: corrupted hmac detectedRails 6 Capistrano 部署失败:检测到损坏的 hmac
【发布时间】:2020-04-22 20:58:01
【问题描述】:

我正在尝试使用 Capistrano + Nginx + Puma 部署 Rails 6 应用程序。过去(在这种情况下是 Rail 4)我使用了这个教程 https://www.digitalocean.com/community/tutorials/deploying-a-rails-app-on-ubuntu-14-04-with-capistrano-nginx-and-puma 并且效果很好。

但是,当我尝试运行 cap production deploy:initial(or without the initial namespace) 时,我收到以下错误:The deploy has failed with an error: Exception while executing on host 31.220.51.222: Exception while executing on host 31.220.51.222: corrupted hmac detected ** Invoke deploy:failed (first_time) ** Execute deploy:failed

所以我不确定这是否是 NET::SSH 的问题以及它来自何处,或者是否是与此消息无关的问题。

以下是 capistrano.log 的最后几行,启用了 -t 选项。

 DEBUG [daa21174] Command: cd /home/deploy/apps/market_backend/releases/20200422204058 && /usr/local/rvm/bin/rvm default do bundle check --path /home/deploy/apps/market_backend/shared/bundle
 DEBUG [daa21174]   [33m[DEPRECATED] The `--path` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set path '/home/deploy/apps/market_backend/shared/bundle'`, and stop using this flag[0m
 DEBUG [daa21174]   
 DEBUG [daa21174]   [33mThe dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.[0m
 DEBUG [daa21174]   
 DEBUG [daa21174]   [31mThe following gems are missing[0m
 DEBUG [daa21174]   
 DEBUG [daa21174]   [31m * public_suffix (4.0.4)[0m
 DEBUG [daa21174]   
 DEBUG [daa21174]   [31m * addressable (2.7.0)[0m
 DEBUG [daa21174]   
 DEBUG [daa21174]   [31m * net-ssh (6.0.0)[0m
 DEBUG [daa21174]   
 DEBUG [daa21174]   [31m * net-scp (1.2.1)[0m
 DEBUG [daa21174]   
 DEBUG [daa21174]   [31m * sshkit (1.21.0)[0m
 DEBUG [daa21174]   
 DEBUG [daa21174]   [31m * airbrussh (1.4.0)[0m
 DEBUG [daa21174]   
 DEBUG [daa21174]   [31m * bindex (0.8.1)[0m
 DEBUG [daa21174]   
 DEBUG [daa21174]   [31m * byebug (11.1.2)[0m
 DEBUG [daa21174]   
 DEBUG [daa21174]   [31m * capistrano (3.13.0)[0m
 DEBUG [daa21174]   
 DEBUG [daa21174]   [31m * capistrano-bundler (1.6.0)[0m
 DEBUG [daa21174]   
 DEBUG [daa21174]   [31m * capistrano-rails (1.4.0)[0m
 DEBUG [daa21174]   
 DEBUG [daa21174]   [31m * capistrano-rvm (0.1.2)[0m
 DEBUG [daa21174]   
 DEBUG [daa21174]   [31m * capistrano-yarn (2.0.2)[0m```



The strange thing is that the log suddently finishes without saying anything about the problem.

Does someone has any clue on how to solve this?

【问题讨论】:

    标签: ruby-on-rails capistrano


    【解决方案1】:

    这似乎是 net-ssh gem 的最新更新版本的问题,我降级后也遇到了同样的问题。

    你在这里找到它:

    https://github.com/net-ssh/net-ssh/issues/728

    【讨论】:

    • 你好@Max 我设法通过将旧教程与这个onebitcode.com/deploy-rails-digital-ocean-capistrano 混合来使其工作,但是,这对我来说没有任何意义,有时仍然会发生,我只需要尝试一次又一次,直到工作。我按照您的建议降级了,并且似乎也可以正常工作。非常感谢。 :D
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-12-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多