実行環境
Ruby 2.6.2
Ruby on Rails 6.0.2
AWS EC2 Amazon Linux
Capistrano 3.11.2
nginx
unicorn 5.5.1
my歴 独学6ヶ月目
###現状
Capistranoでのデプロイを試みています。
bundle exec cap production deploy
で一度は最後まで行ったのですが、
EC2インスタンスを確認すると、nginxのホーム画面になっていたので、
unicornが起動していないのかと思い、プロセスをkillしたりしているうちに、
以下のように、unicornの再起動でエラーが出てしまいました。
正直質問するメンタルすらないぐらいエラーざんまいで果てそうなのですが、
せっかくここまで来たので、デプロイして笑いたいです。
エラー文
Masahiro:Kotosearch masahiro$ bundle exec cap production deploy 00:00 git:wrapper 01 mkdir -p /tmp ✔ 01 masahiro@18.176.74.100 0.201s Uploading /tmp/git-ssh-Kotosearch-production-masahiro.sh 100.0% 02 chmod 700 /tmp/git-ssh-Kotosearch-production-masahiro.sh ✔ 02 masahiro@18.176.74.100 0.191s 00:00 git:check 01 git ls-remote https://github.com/cutsome/Kotosearch.git HEAD 01 f56b194c37d18405476bc0e0cccb6c5612930fdd HEAD ✔ 01 masahiro@18.176.74.100 2.856s 00:03 deploy:check:directories 01 mkdir -p /var/www/rails/Kotosearch/shared /var/www/rails/Kotosearch/releases ✔ 01 masahiro@18.176.74.100 0.242s 00:03 deploy:check:linked_dirs 01 mkdir -p /var/www/rails/Kotosearch/shared/log /var/www/rails/Kotosearch/shared/tmp/pids /var/www/rails/Koto… ✔ 01 masahiro@18.176.74.100 0.194s 00:04 deploy:check:make_linked_dirs 01 mkdir -p /var/www/rails/Kotosearch/shared/config ✔ 01 masahiro@18.176.74.100 0.204s 00:05 git:clone The repository mirror is at /var/www/rails/Kotosearch/repo 00:05 git:update 01 git remote set-url origin https://github.com/cutsome/Kotosearch.git ✔ 01 masahiro@18.176.74.100 0.226s 02 git remote update --prune 02 Fetching origin ✔ 02 masahiro@18.176.74.100 2.727s 00:08 git:create_release 01 mkdir -p /var/www/rails/Kotosearch/releases/20191218124221 ✔ 01 masahiro@18.176.74.100 0.196s 02 git archive master | /usr/bin/env tar -x -f - -C /var/www/rails/Kotosearch/releases/20191218124221 ✔ 02 masahiro@18.176.74.100 0.194s 00:09 deploy:set_current_revision 01 echo "f56b194c37d18405476bc0e0cccb6c5612930fdd" > REVISION ✔ 01 masahiro@18.176.74.100 0.185s 00:09 deploy:symlink:linked_files 01 mkdir -p /var/www/rails/Kotosearch/releases/20191218124221/config ✔ 01 masahiro@18.176.74.100 0.206s 02 ln -s /var/www/rails/Kotosearch/shared/config/settings.yml /var/www/rails/Kotosearch/releases/2019121812422… ✔ 02 masahiro@18.176.74.100 0.204s 00:10 deploy:symlink:linked_dirs 01 mkdir -p /var/www/rails/Kotosearch/releases/20191218124221 /var/www/rails/Kotosearch/releases/2019121812422… ✔ 01 masahiro@18.176.74.100 0.182s 02 rm -rf /var/www/rails/Kotosearch/releases/20191218124221/log ✔ 02 masahiro@18.176.74.100 0.196s 03 ln -s /var/www/rails/Kotosearch/shared/log /var/www/rails/Kotosearch/releases/20191218124221/log ✔ 03 masahiro@18.176.74.100 0.209s 04 ln -s /var/www/rails/Kotosearch/shared/tmp/pids /var/www/rails/Kotosearch/releases/20191218124221/tmp/pids ✔ 04 masahiro@18.176.74.100 0.212s 05 ln -s /var/www/rails/Kotosearch/shared/tmp/cache /var/www/rails/Kotosearch/releases/20191218124221/tmp/cache ✔ 05 masahiro@18.176.74.100 0.201s 06 ln -s /var/www/rails/Kotosearch/shared/tmp/sockets /var/www/rails/Kotosearch/releases/20191218124221/tmp/so… ✔ 06 masahiro@18.176.74.100 0.226s 07 ln -s /var/www/rails/Kotosearch/shared/vendor/bundle /var/www/rails/Kotosearch/releases/20191218124221/vend… ✔ 07 masahiro@18.176.74.100 0.181s 08 ln -s /var/www/rails/Kotosearch/shared/public/system /var/www/rails/Kotosearch/releases/20191218124221/publ… ✔ 08 masahiro@18.176.74.100 0.249s 00:16 bundler:install 01 $HOME/.rbenv/bin/rbenv exec bundle install --path /var/www/rails/Kotosearch/shared/bundle --jobs 4 --withou… ✔ 01 masahiro@18.176.74.100 0.858s 00:16 deploy:migrate [deploy:migrate] Run `rake db:migrate` 00:17 deploy:migrating 01 $HOME/.rbenv/bin/rbenv exec bundle exec rake db:migrate ✔ 01 masahiro@18.176.74.100 1.371s 00:18 deploy:symlink:release 01 ln -s /var/www/rails/Kotosearch/releases/20191218124221 /var/www/rails/Kotosearch/releases/current ✔ 01 masahiro@18.176.74.100 0.188s 02 mv /var/www/rails/Kotosearch/releases/current /var/www/rails/Kotosearch ✔ 02 masahiro@18.176.74.100 0.196s 00:19 unicorn:restart 01 kill -s USR2 $(< /var/www/rails/Kotosearch/current/tmp/pids/unicorn.pid) 01 kill: 01 sending signal to 21021 failed 01 : 01 そのようなプロセスはありません #<Thread:0x00007fced0cb7ef0@/Users/masahiro/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/sshkit-1.20.0/lib/sshkit/runners/parallel.rb:10 run> terminated with exception (report_on_exception is true): Traceback (most recent call last): 10: from /Users/masahiro/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/sshkit-1.20.0/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute' 9: from /Users/masahiro/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/sshkit-1.20.0/lib/sshkit/backends/abstract.rb:31:in `run' 8: from /Users/masahiro/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/sshkit-1.20.0/lib/sshkit/backends/abstract.rb:31:in `instance_exec' 7: from /Users/masahiro/Desktop/environment/Kotosearch/lib/capistrano/tasks/unicorn.rake:51:in `block (3 levels) in <top (required)>' 6: from /Users/masahiro/Desktop/environment/Kotosearch/lib/capistrano/tasks/unicorn.rake:22:in `reload_unicorn' 5: from /Users/masahiro/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/sshkit-1.20.0/lib/sshkit/backends/abstract.rb:80:in `execute' 4: from /Users/masahiro/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/sshkit-1.20.0/lib/sshkit/backends/abstract.rb:148:in `create_command_and_execute' 3: from /Users/masahiro/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/sshkit-1.20.0/lib/sshkit/backends/abstract.rb:148:in `tap' 2: from /Users/masahiro/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/sshkit-1.20.0/lib/sshkit/backends/abstract.rb:148:in `block in create_command_and_execute' 1: from /Users/masahiro/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/sshkit-1.20.0/lib/sshkit/backends/netssh.rb:170:in `execute_command' /Users/masahiro/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/sshkit-1.20.0/lib/sshkit/command.rb:97:in `exit_status=': kill exit status: 1 (SSHKit::Command::Failed) kill stdout: Nothing written kill stderr: kill: sending signal to 21021 failed: そのようなプロセスはありません 1: from /Users/masahiro/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/sshkit-1.20.0/lib/sshkit/runners/parallel.rb:11:in `block (2 levels) in execute' /Users/masahiro/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/sshkit-1.20.0/lib/sshkit/runners/parallel.rb:15:in `rescue in block (2 levels) in execute': Exception while executing as masahiro@18.176.74.100: kill exit status: 1 (SSHKit::Runner::ExecuteError) kill stdout: Nothing written kill stderr: kill: sending signal to 21021 failed: そのようなプロセスはありません (Backtrace restricted to imported tasks) cap aborted! SSHKit::Runner::ExecuteError: Exception while executing as masahiro@18.176.74.100: kill exit status: 1 kill stdout: Nothing written kill stderr: kill: sending signal to 21021 failed: そのようなプロセスはありません Caused by: SSHKit::Command::Failed: kill exit status: 1 kill stdout: Nothing written kill stderr: kill: sending signal to 21021 failed: そのようなプロセスはありません /Users/masahiro/Desktop/environment/Kotosearch/lib/capistrano/tasks/unicorn.rake:22:in `reload_unicorn' /Users/masahiro/Desktop/environment/Kotosearch/lib/capistrano/tasks/unicorn.rake:51:in `block (3 levels) in <top (required)>' Tasks: TOP => unicorn:restart (See full trace by running task with --trace) The deploy has failed with an error: Exception while executing as masahiro@18.176.74.100: kill exit status: 1 kill stdout: Nothing written kill stderr: kill: sending signal to 21021 failed: そのようなプロセスはありません ** DEPLOY FAILED ** Refer to log/capistrano.log for details. Here are the last 20 lines: ~省略~ DEBUG [5c9877a7] Running [ -f /var/www/rails/Kotosearch/current/tmp/pids/unicorn.pid ] as masahiro@18.176.74.100 DEBUG [5c9877a7] Command: [ -f /var/www/rails/Kotosearch/current/tmp/pids/unicorn.pid ] DEBUG [5c9877a7] Finished in 0.167 seconds with exit status 0 (successful). INFO [235ce5ce] Running /usr/bin/env kill -s USR2 $(< /var/www/rails/Kotosearch/current/tmp/pids/unicorn.pid) as masahiro@18.176.74.100 DEBUG [235ce5ce] Command: ( export RBENV_ROOT="$HOME/.rbenv" RBENV_VERSION="2.6.2" ; /usr/bin/env kill -s USR2 $(< /var/www/rails/Kotosearch/current/tmp/pids/unicorn.pid) ) DEBUG [235ce5ce] kill: DEBUG [235ce5ce] sending signal to 21021 failed DEBUG [235ce5ce] : DEBUG [235ce5ce] そのようなプロセスはありません Masahiro:Kotosearch masahiro$
こんな雑な質問で大変恐縮ですが、頭の中が真っ白で解決策が全くわからないので、
どなたかヒントをいいただけましたら大変幸いです、、
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。