herokuにデプロイ下後にログを確認すると
No such file or directory - ./log/sidekiq.logとなります。
procfileに書いたコードが正しく動いていません
プロセスを確認したらクラッシュしています。構成はheroku sidekiqです。
ruby
1worker: bundle exec sidekiq -q carrierwave
ruby
1 2#config/initializers/sidkiq.rb 3Sidekiq.configure_server do |config| 4 case Rails.env 5 when 'production' then 6 config.redis = { url: ENV['REDISCLOUD_URL'], namespace: 'sidekiq' } 7 when 'staging' then 8 config.redis = { url: 'redis://stg.redis-example.com:6379', namespace: 'sidekiq' } 9 else 10 config.redis = { url: 'redis://localhost:6379', namespace: 'sidekiq' } 11 end 12end 13 14Sidekiq.configure_client do |config| 15 case Rails.env 16 when 'production' then 17 config.redis = { url: ENV['REDISCLOUD_URL'], namespace: 'sidekiq' } 18 when 'staging' then 19 config.redis = { url: 'redis://stg.redis-example.com:6379', namespace: 'sidekiq' } 20 else 21 config.redis = { url: 'redis://localhost:6379', namespace: 'sidekiq' } 22 end 23end 24 25 26# heroku ps 27=== web (Free): `bin/rails server -p $PORT -e $RAILS_ENV` 28web.1: up 2015/07/18 18:17:11 (~ 7m ago) 29 30=== worker (Free): `bundle exec sidekiq -q carrierwave` 31worker.1: crashed 2015/07/18 18:17:00 (~ 7m ago) 32 33 34 35#ログ 36 372015-07-18T10:23:42.061270+00:00 heroku[slug-compiler]: Slug compilation started 382015-07-18T10:23:42.061295+00:00 heroku[slug-compiler]: Slug compilation finished 392015-07-18T10:23:42.021143+00:00 heroku[api]: Deploy f93ebd5 by emial@gmail.com 402015-07-18T10:23:42.021143+00:00 heroku[api]: Release v21 created by emial@gmail.com 412015-07-18T10:23:42.123744+00:00 heroku[web.1]: State changed from up to starting 422015-07-18T10:23:42.177341+00:00 heroku[worker.1]: State changed from crashed to starting 432015-07-18T10:23:44.617806+00:00 heroku[web.1]: Stopping all processes with SIGTERM 442015-07-18T10:23:45.267925+00:00 app[web.1]: [2015-07-18 10:23:45] FATAL SignalException: SIGTERM 452015-07-18T10:23:45.267930+00:00 app[web.1]: /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:170:in `select' 462015-07-18T10:23:45.267934+00:00 app[web.1]: /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:170:in `block in start' 472015-07-18T10:23:45.267935+00:00 app[web.1]: /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:32:in `start' 482015-07-18T10:23:45.267937+00:00 app[web.1]: /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:160:in `start' 492015-07-18T10:23:45.267938+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/handler/webrick.rb:34:in `run' 502015-07-18T10:23:45.267940+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/server.rb:286:in `start' 512015-07-18T10:23:45.267942+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/server.rb:80:in `start' 522015-07-18T10:23:45.267944+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:80:in `block in server' 532015-07-18T10:23:45.267945+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `tap' 542015-07-18T10:23:45.267947+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `server' 552015-07-18T10:23:45.267948+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!' 562015-07-18T10:23:45.267949+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>' 572015-07-18T10:23:45.267951+00:00 app[web.1]: bin/rails:4:in `require' 582015-07-18T10:23:45.267953+00:00 app[web.1]: bin/rails:4:in `<main>' 592015-07-18T10:23:45.267959+00:00 app[web.1]: [2015-07-18 10:23:45] INFO going to shutdown ... 602015-07-18T10:23:45.267990+00:00 app[web.1]: [2015-07-18 10:23:45] INFO WEBrick::HTTPServer#start done. 612015-07-18T10:23:45.268011+00:00 app[web.1]: Exiting 622015-07-18T10:23:46.415651+00:00 heroku[web.1]: Process exited with status 143 632015-07-18T10:23:47.535914+00:00 heroku[worker.1]: Starting process with command `bundle exec sidekiq -q carrierwave` 642015-07-18T10:23:48.098136+00:00 heroku[worker.1]: State changed from starting to up 652015-07-18T10:23:50.030358+00:00 app[worker.1]: No such file or directory - ./log/sidekiq.log 662015-07-18T10:23:50.030383+00:00 app[worker.1]: /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/logger.rb:601:in `initialize' 672015-07-18T10:23:50.030385+00:00 app[worker.1]: /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/logger.rb:601:in `open' 682015-07-18T10:23:50.030386+00:00 app[worker.1]: /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/logger.rb:601:in `create_logfile' 692015-07-18T10:23:50.030387+00:00 app[worker.1]: /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/logger.rb:596:in `open_logfile' 702015-07-18T10:23:50.030388+00:00 app[worker.1]: /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/logger.rb:551:in `initialize' 712015-07-18T10:23:50.030389+00:00 app[worker.1]: /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/logger.rb:318:in `new' 722015-07-18T10:23:50.030390+00:00 app[worker.1]: /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/logger.rb:318:in `initialize' 732015-07-18T10:23:50.030391+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.0.0/gems/sidekiq-3.3.4/lib/sidekiq/logging.rb:31:in `new' 742015-07-18T10:23:50.030393+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.0.0/gems/sidekiq-3.3.4/lib/sidekiq/logging.rb:31:in `initialize_logger' 752015-07-18T10:23:50.030394+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.0.0/gems/sidekiq-3.3.4/lib/sidekiq/cli.rb:344:in `initialize_logger' 762015-07-18T10:23:50.030395+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.0.0/gems/sidekiq-3.3.4/lib/sidekiq/cli.rb:39:in `parse' 772015-07-18T10:23:50.030396+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.0.0/gems/sidekiq-3.3.4/bin/sidekiq:7:in `<top (required)>' 782015-07-18T10:23:50.030397+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.0.0/bin/sidekiq:23:in `load' 792015-07-18T10:23:50.030398+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.0.0/bin/sidekiq:23:in `<main>' 802015-07-18T10:23:50.723134+00:00 heroku[worker.1]: State changed from up to crashed 812015-07-18T10:23:50.712026+00:00 heroku[worker.1]: Process exited with status 1 822015-07-18T10:23:52.176177+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 46937 -e production` 832015-07-18T10:24:04.392037+00:00 heroku[web.1]: State changed from starting to up 842015-07-18T10:24:04.241645+00:00 app[web.1]: [2015-07-18 10:24:04] INFO WEBrick 1.3.1 852015-07-18T10:24:04.241670+00:00 app[web.1]: [2015-07-18 10:24:04] INFO ruby 2.0.0 (2015-04-13) [x86_64-linux] 862015-07-18T10:24:04.242017+00:00 app[web.1]: [2015-07-18 10:24:04] INFO WEBrick::HTTPServer#start: pid=3 port=46937 87 88 89
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。