お世話になります。
capistranoを使用してAWSにデプロイしようとしています。
使用環境
・Mac
・rails
・unicorn
・nginx
ローカルで bundle exec cap production deploy した際、unicornが起動しないというエラーが表示されます。
自分で調べた結果、サーバー側でunicornが起動していないため起こるエラーだと予測しました。
現在EC2でunicornは停止済みで、unicornを起動しようとしてもエラーが表示されます。
unicorn起動コマンド
bundle exec unicorn -c /var/www/rails/myapp/current/unicorn/production.rb -E production -D
表示されたエラー
bundler: failed to load command: unicorn (/var/www/rails/myapp/shared/bundle/ruby/2.7.0/bin/unicorn)
ローカルでbundle exec cap production deployした際に表示されたログ
下記の項目で表示されたログは、サーバー側でunicornが起動していないために起こるものでしょうか?
00:13 unicorn:restart 01 kill -s USR2 $(< /var/www/rails/myapp/current/tmp/pids/unicorn.pid) 01 kill: 01 31634 へのシグナル送信に失敗しました 01 : 01 No such process #<Thread:0x00007f7f313992e0 /Users/ren/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/sshkit-1.21.0/lib/sshkit/runners/parallel.rb:10 run> terminated with exception (report_on_exception is true): Traceback (most recent call last): 10: from /Users/ren/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/sshkit-1.21.0/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute' 9: from /Users/ren/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/sshkit-1.21.0/lib/sshkit/backends/abstract.rb:31:in `run' 8: from /Users/ren/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/sshkit-1.21.0/lib/sshkit/backends/abstract.rb:31:in `instance_exec' 7: from /Users/ren/portfolio/myapp/lib/capistrano/tasks/unicorn.rb:51:in `block (3 levels) in <top (required)>' 6: from /Users/ren/portfolio/myapp/lib/capistrano/tasks/unicorn.rb:22:in `reload_unicorn' 5: from /Users/ren/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/sshkit-1.21.0/lib/sshkit/backends/abstract.rb:80:in `execute' 4: from /Users/ren/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/sshkit-1.21.0/lib/sshkit/backends/abstract.rb:148:in `create_command_and_execute' 3: from /Users/ren/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/sshkit-1.21.0/lib/sshkit/backends/abstract.rb:148:in `tap' 2: from /Users/ren/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/sshkit-1.21.0/lib/sshkit/backends/abstract.rb:148:in `block in create_command_and_execute' 1: from /Users/ren/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/sshkit-1.21.0/lib/sshkit/backends/netssh.rb:170:in `execute_command' /Users/ren/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/sshkit-1.21.0/lib/sshkit/command.rb:97:in `exit_status=': kill exit status: 1 (SSHKit::Command::Failed) kill stdout: Nothing written kill stderr: kill: 31634 へのシグナル送信に失敗しました: No such process 1: from /Users/ren/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/sshkit-1.21.0/lib/sshkit/runners/parallel.rb:11:in `block (2 levels) in execute' /Users/ren/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/sshkit-1.21.0/lib/sshkit/runners/parallel.rb:15:in `rescue in block (2 levels) in execute': Exception while executing as rentaro8@18.178.157.224: kill exit status: 1 (SSHKit::Runner::ExecuteError) kill stdout: Nothing written kill stderr: kill: 31634 へのシグナル送信に失敗しました: No such process (Backtrace restricted to imported tasks) cap aborted! SSHKit::Runner::ExecuteError: Exception while executing as rentaro8@18.178.157.224: kill exit status: 1 kill stdout: Nothing written kill stderr: kill: 31634 へのシグナル送信に失敗しました: No such process
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。