上限部署在预编译资产上失败,但上限<env> deploy:precompile:assets起作用

时间:2020-04-18 23:34:53

标签: ruby-on-rails deployment capistrano rvm-capistrano

我删除了一些文件,然后将它们重新添加到github,以便gitignore可以正常工作,然后通过capistrano将这些文件上传到服务器。

然后开始在precompile:assets上部署失败。

我能够找到问题,解决,现在cap env deploy:precompile:assets使我全都绿了。但是当我运行cap env deploy时,我仍然得到:

Traceback (most recent call last):
    1: from /Users/user/.rvm/gems/ruby-2.5.1/gems/sshkit-1.18.2/lib/sshkit/runners/parallel.rb:11:in `block (2 levels) in execute'
/Users/user/.rvm/gems/ruby-2.5.1/gems/sshkit-1.18.2/lib/sshkit/runners/parallel.rb:15:in `rescue in block (2 levels) in execute': Exception while executing as deploy@staging.myapp.com: Connection reset by peer - recvfrom(2) (SSHKit::Runner::ExecuteError)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as deploy@staging.myapp.com: Connection reset by peer - recvfrom(2)
/Users/user/.rvm/gems/ruby-2.5.1/gems/sshkit-1.18.2/lib/sshkit/runners/parallel.rb:15:in `rescue in block (2 levels) in execute'
/Users/user/.rvm/gems/ruby-2.5.1/gems/sshkit-1.18.2/lib/sshkit/runners/parallel.rb:11:in `block (2 levels) in execute'

Caused by:
Errno::ECONNRESET: Connection reset by peer - recvfrom(2)
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/buffered_io.rb:66:in `recv'
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/buffered_io.rb:66:in `fill'
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/connection/session.rb:275:in `block in ev_do_handle_events'
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/connection/session.rb:271:in `each'
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/connection/session.rb:271:in `ev_do_handle_events'
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/connection/event_loop.rb:112:in `ev_select_and_postprocess'
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/connection/event_loop.rb:31:in `process'
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/connection/session.rb:228:in `process'
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/connection/session.rb:181:in `block in loop'
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/connection/session.rb:181:in `loop'
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/connection/session.rb:181:in `loop'
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/connection/channel.rb:272:in `wait'
/Users/user/.rvm/gems/ruby-2.5.1/gems/sshkit-1.18.2/lib/sshkit/backends/netssh.rb:163:in `block (2 levels) in execute_command'
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/connection/channel.rb:533:in `do_open_confirmation'
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/connection/session.rb:644:in `channel_open_confirmation'
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/connection/session.rb:549:in `dispatch_incoming_packets'
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/connection/session.rb:249:in `ev_preprocess'
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/connection/event_loop.rb:101:in `each'
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/connection/event_loop.rb:101:in `ev_preprocess'
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/connection/event_loop.rb:29:in `process'
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/connection/session.rb:228:in `process'
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/connection/session.rb:181:in `block in loop'
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/connection/session.rb:181:in `loop'
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/connection/session.rb:181:in `loop'
/Users/user/.rvm/gems/ruby-2.5.1/gems/sshkit-1.18.2/lib/sshkit/backends/netssh.rb:165:in `block in execute_command'
/Users/user/.rvm/gems/ruby-2.5.1/gems/sshkit-1.18.2/lib/sshkit/backends/connection_pool.rb:65:in `with'
/Users/user/.rvm/gems/ruby-2.5.1/gems/sshkit-1.18.2/lib/sshkit/backends/netssh.rb:176:in `with_ssh'
/Users/user/.rvm/gems/ruby-2.5.1/gems/sshkit-1.18.2/lib/sshkit/backends/netssh.rb:129:in `execute_command'
/Users/user/.rvm/gems/ruby-2.5.1/gems/sshkit-1.18.2/lib/sshkit/backends/abstract.rb:145:in `block in create_command_and_execute'
/Users/user/.rvm/gems/ruby-2.5.1/gems/sshkit-1.18.2/lib/sshkit/backends/abstract.rb:145:in `tap'
/Users/user/.rvm/gems/ruby-2.5.1/gems/sshkit-1.18.2/lib/sshkit/backends/abstract.rb:145:in `create_command_and_execute'
/Users/user/.rvm/gems/ruby-2.5.1/gems/sshkit-1.18.2/lib/sshkit/backends/abstract.rb:78:in `execute'
/Users/user/.rvm/gems/ruby-2.5.1/gems/capistrano-rails-1.4.0/lib/capistrano/tasks/assets.rake:69:in `block (6 levels) in <top (required)>'
/Users/user/.rvm/gems/ruby-2.5.1/gems/sshkit-1.18.2/lib/sshkit/backends/abstract.rb:97:in `with'
/Users/user/.rvm/gems/ruby-2.5.1/gems/capistrano-rails-1.4.0/lib/capistrano/tasks/assets.rake:68:in `block (5 levels) in <top (required)>'
/Users/user/.rvm/gems/ruby-2.5.1/gems/sshkit-1.18.2/lib/sshkit/backends/abstract.rb:89:in `within'
/Users/user/.rvm/gems/ruby-2.5.1/gems/capistrano-rails-1.4.0/lib/capistrano/tasks/assets.rake:67:in `block (4 levels) in <top (required)>'
/Users/user/.rvm/gems/ruby-2.5.1/gems/sshkit-1.18.2/lib/sshkit/backends/abstract.rb:29:in `instance_exec'
/Users/user/.rvm/gems/ruby-2.5.1/gems/sshkit-1.18.2/lib/sshkit/backends/abstract.rb:29:in `run'
/Users/user/.rvm/gems/ruby-2.5.1/gems/sshkit-1.18.2/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
Tasks: TOP => deploy:assets:precompile
The deploy has failed with an error: Exception while executing as deploy@staging.myapp.com: Connection reset by peer - recvfrom(2)
** Invoke deploy:failed (first_time)
** Execute deploy:failed


** DEPLOY FAILED

由于任务似乎可以正常工作,因此不确定如何进行故障排除,而且我肯定可以连接到服务器(通过上限等方式上传文件...)

感谢任何提示

0 个答案:

没有答案