hasyrails / calendar-vue-original

0 stars 0 forks source link

unicornがEC2上で再起動できない→デプロイできない #364

Open hasyrails opened 3 years ago

hasyrails commented 3 years ago

(local) calendar-vue-original/log/capistrano.log

  INFO [73cdc7bd] Running /usr/bin/env kill -s USR2 $(< /var/www/calendar-vue-original/current/tmp/pids/unicorn.pid) as hasyrails@18.178.224.137
 DEBUG [73cdc7bd] Command: ( export RBENV_ROOT="$HOME/.rbenv" RBENV_VERSION="2.6.4" ; /usr/bin/env kill -s USR2 $(< /var/www/calendar-vue-original/current/tmp/pids/unicorn.pid) )
 DEBUG [73cdc7bd]       kill:
 DEBUG [73cdc7bd]       9113 へのシグナル送信に失敗しました
 DEBUG [73cdc7bd]       :
 DEBUG [73cdc7bd]       No such process
hasyrails commented 3 years ago

/var/www/calendar-vue-original/current/log/unicorn.log

$ cat /var/www/calendar-vue-original/current/log/unicorn.log
I, [2020-11-12T22:01:59.379702 #6075]  INFO -- : Refreshing Gem list
F, [2020-11-12T22:02:00.450296 #6075] FATAL -- : error adding listener addr=/tmp/sockets/.unicorn.sock
bundler: failed to load command: unicorn_rails (/home/hasyrails/.rbenv/versions/2.6.4/bin/unicorn_rails)
Errno::ENOENT: No such file or directory - connect(2) for /tmp/sockets/.unicorn.sock
  /home/hasyrails/.rbenv/versions/2.6.4/lib/ruby/gems/2.6.0/gems/unicorn-5.7.0/lib/unicorn/socket_helper.rb:138:in `initialize'
  /home/hasyrails/.rbenv/versions/2.6.4/lib/ruby/gems/2.6.0/gems/unicorn-5.7.0/lib/unicorn/socket_helper.rb:138:in `new'
  /home/hasyrails/.rbenv/versions/2.6.4/lib/ruby/gems/2.6.0/gems/unicorn-5.7.0/lib/unicorn/socket_helper.rb:138:in `bind_listen'
  /home/hasyrails/.rbenv/versions/2.6.4/lib/ruby/gems/2.6.0/gems/unicorn-5.7.0/lib/unicorn/http_server.rb:243:in `listen'
  /home/hasyrails/.rbenv/versions/2.6.4/lib/ruby/gems/2.6.0/gems/unicorn-5.7.0/lib/unicorn/http_server.rb:878:in `block in bind_new_listeners!'
  /home/hasyrails/.rbenv/versions/2.6.4/lib/ruby/gems/2.6.0/gems/unicorn-5.7.0/lib/unicorn/http_server.rb:878:in `each'
  /home/hasyrails/.rbenv/versions/2.6.4/lib/ruby/gems/2.6.0/gems/unicorn-5.7.0/lib/unicorn/http_server.rb:878:in `bind_new_listeners!'
  /home/hasyrails/.rbenv/versions/2.6.4/lib/ruby/gems/2.6.0/gems/unicorn-5.7.0/lib/unicorn/http_server.rb:142:in `start'
  /home/hasyrails/.rbenv/versions/2.6.4/lib/ruby/gems/2.6.0/gems/unicorn-5.7.0/bin/unicorn_rails:209:in `<top (required)>'
  /home/hasyrails/.rbenv/versions/2.6.4/bin/unicorn_rails:23:in `load'
  /home/hasyrails/.rbenv/versions/2.6.4/bin/unicorn_rails:23:in `<top (required)>'

これか?

Errno::ENOENT: No such file or directory - connect(2) for /tmp/sockets/.unicorn.sock
hasyrails commented 3 years ago

■エラーメッセージ

kill sending signal to 21214 failed No such process

■エラーの意味

プロセスがない状態です。

■対策

/var/www/rails/'アプリケーション名'/current/tmp/pids/unicorn.pid を削除

Capistranoのデプロイのエラー集

unicorn.pidを削除した→解決