所以我最近建立了一个Azure VM,并且一直在努力让我们的应用程序部署到Azure。我纠结了一堆错误,但是在我运行cap production deploy:check --trace
我们使用Ansible来设置服务器,nginx在服务器上正常运行。现在我们只是试图让部署到机器上的蠢货,但是我们遇到了一个奇怪的问题,即无论出于何种原因它无法以部署用户身份执行没有写任何东西。
非常感谢任何帮助。
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as cow@goat.cloudapp.net: bundle exit status: 18
bundle stdout: Nothing written
bundle stderr: Nothing written
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/sshkit-1.6.1/lib/sshkit/command.rb:97:in `exit_status='
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/sshkit-1.6.1/lib/sshkit/backends/netssh.rb:153:in `block (5 levels) in _execute'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/channel.rb:551:in `call'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/channel.rb:551:in `do_request'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:562:in `channel_request'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:466:in `dispatch_incoming_packets'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:222:in `preprocess'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:206:in `process'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:170:in `block in loop'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:170:in `loop'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:170:in `loop'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/channel.rb:269:in `wait'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/sshkit-1.6.1/lib/sshkit/backends/netssh.rb:175:in `block (3 levels) in _execute'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/channel.rb:514:in `call'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/channel.rb:514:in `do_open_confirmation'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:546:in `channel_open_confirmation'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:466:in `dispatch_incoming_packets'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:222:in `preprocess'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:206:in `process'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:170:in `block in loop'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:170:in `loop'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:170:in `loop'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/sshkit-1.6.1/lib/sshkit/backends/netssh.rb:177:in `block (2 levels) in _execute'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/sshkit-1.6.1/lib/sshkit/backends/netssh.rb:191:in `with_ssh'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/sshkit-1.6.1/lib/sshkit/backends/netssh.rb:136:in `block in _execute'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/sshkit-1.6.1/lib/sshkit/backends/netssh.rb:133:in `tap'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/sshkit-1.6.1/lib/sshkit/backends/netssh.rb:133:in `_execute'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/sshkit-1.6.1/lib/sshkit/backends/netssh.rb:66:in `execute'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/capistrano-bundler-1.1.4/lib/capistrano/tasks/bundler.cap:35:in `block (5 levels) in <top (required)>'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/sshkit-1.6.1/lib/sshkit/backends/abstract.rb:85:in `with'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/capistrano-bundler-1.1.4/lib/capistrano/tasks/bundler.cap:26:in `block (4 levels) in <top (required)>'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/sshkit-1.6.1/lib/sshkit/backends/abstract.rb:77:in `within'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/capistrano-bundler-1.1.4/lib/capistrano/tasks/bundler.cap:25:in `block (3 levels) in <top (required)>'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/sshkit-1.6.1/lib/sshkit/backends/netssh.rb:54:in `instance_exec'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/sshkit-1.6.1/lib/sshkit/backends/netssh.rb:54:in `run'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/sshkit-1.6.1/lib/sshkit/runners/parallel.rb:13:in `block (2 levels) in execute'
SSHKit::Command::Failed: bundle exit status: 18
bundle stdout: Nothing written
bundle stderr: Nothing written
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/sshkit-1.6.1/lib/sshkit/command.rb:97:in `exit_status='
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/sshkit-1.6.1/lib/sshkit/backends/netssh.rb:153:in `block (5 levels) in _execute'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/channel.rb:551:in `call'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/channel.rb:551:in `do_request'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:562:in `channel_request'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:466:in `dispatch_incoming_packets'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:222:in `preprocess'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:206:in `process'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:170:in `block in loop'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:170:in `loop'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:170:in `loop'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/channel.rb:269:in `wait'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/sshkit-1.6.1/lib/sshkit/backends/netssh.rb:175:in `block (3 levels) in _execute'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/channel.rb:514:in `call'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/channel.rb:514:in `do_open_confirmation'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:546:in `channel_open_confirmation'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:466:in `dispatch_incoming_packets'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:222:in `preprocess'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:206:in `process'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:170:in `block in loop'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:170:in `loop'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:170:in `loop'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/sshkit-1.6.1/lib/sshkit/backends/netssh.rb:177:in `block (2 levels) in _execute'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/sshkit-1.6.1/lib/sshkit/backends/netssh.rb:191:in `with_ssh'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/sshkit-1.6.1/lib/sshkit/backends/netssh.rb:136:in `block in _execute'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/sshkit-1.6.1/lib/sshkit/backends/netssh.rb:133:in `tap'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/sshkit-1.6.1/lib/sshkit/backends/netssh.rb:133:in `_execute'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/sshkit-1.6.1/lib/sshkit/backends/netssh.rb:66:in `execute'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/capistrano-bundler-1.1.4/lib/capistrano/tasks/bundler.cap:35:in `block (5 levels) in <top (required)>'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/sshkit-1.6.1/lib/sshkit/backends/abstract.rb:85:in `with'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/capistrano-bundler-1.1.4/lib/capistrano/tasks/bundler.cap:26:in `block (4 levels) in <top (required)>'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/sshkit-1.6.1/lib/sshkit/backends/abstract.rb:77:in `within'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/capistrano-bundler-1.1.4/lib/capistrano/tasks/bundler.cap:25:in `block (3 levels) in <top (required)>'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/sshkit-1.6.1/lib/sshkit/backends/netssh.rb:54:in `instance_exec'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/sshkit-1.6.1/lib/sshkit/backends/netssh.rb:54:in `run'
/Users/macbook/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/sshkit-1.6.1/lib/sshkit/runners/parallel.rb:13:in `block (2 levels) in execute'
Tasks: TOP => deploy:updated => bundler:install
The deploy has failed with an error: Exception while executing as cow@goat.cloudapp.net: bundle exit status: 18
bundle stdout: Nothing written
bundle stderr: Nothing written
** Invoke deploy:failed (first_time)
** Execute deploy:failed
答案 0 :(得分:1)
根据the source退出状态18表示Ruby版本不匹配。通常,这表示您ruby
中的Gemfile
行需要的版本与您用于执行Bundler的版本不同(在本例中为2.2.0)。
令人惊讶的是,它表示没有任何内容写入stdout或stderr,因为在这种情况下Bundler通常会打印错误。可能存在另一个导致错误输出被抑制的问题。