Problems with Heroku-Ruby

0

yesterday trying to push my project to heroku and to enter the domain, I realize that my application was not working, everything worked perfectly until I pushie a branch that had private_pub gem that uses faye for real-time chat, then I got to do it with actioncable and delete the files generated by private_pub, the application does the bundle install correctly and this is the db: migrate also done, what amazes me most is that everything works perfectly and I do not get any problem, the last branch that pushie has redis, also configured for production config / environments / production.rb as well as in config / cable.yml using Redis Lab's redis adapter I leave the heroku log since thank you very much!

2017-02-25T19:54:55.210147+00:00 app[web.1]: => Booting Puma
2017-02-25T19:54:55.210159+00:00 app[web.1]: => Rails 5.1.0.beta1 application starting in production on http://localhost:28307
2017-02-25T19:54:55.210160+00:00 app[web.1]: => Run 'rails server -h' for more startup options
2017-02-25T19:54:55.210161+00:00 app[web.1]: Puma starting in single mode...
2017-02-25T19:54:55.210166+00:00 app[web.1]: * Version 3.7.1 (ruby 2.3.1-p112), codename: Snowy Sagebrush
2017-02-25T19:54:55.210167+00:00 app[web.1]: * Min threads: 5, max threads: 5
2017-02-25T19:54:55.210169+00:00 app[web.1]: * Environment: production
2017-02-25T19:54:55.210311+00:00 app[web.1]: * Listening on tcp://localhost:28307
2017-02-25T19:54:55.211136+00:00 app[web.1]: Use Ctrl-C to stop
2017-02-25T19:55:51.654696+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2017-02-25T19:55:51.654835+00:00 heroku[web.1]: Stopping process with SIGKILL
2017-02-25T19:55:51.761922+00:00 heroku[web.1]: State changed from starting to crashed
2017-02-25T19:55:51.763287+00:00 heroku[web.1]: State changed from crashed to starting
2017-02-25T19:55:51.766138+00:00 heroku[web.1]: Process exited with status 137
2017-02-25T19:55:56.264770+00:00 heroku[web.1]: Starting process with command 'bin/rails server -p 29901 -e production'
2017-02-25T19:56:01.901976+00:00 app[web.1]: => Booting Puma
2017-02-25T19:56:01.902007+00:00 app[web.1]: => Rails 5.1.0.beta1 application starting in production on http://localhost:29901
2017-02-25T19:56:01.902014+00:00 app[web.1]: => Run 'rails server -h' for more startup options
2017-02-25T19:56:01.902015+00:00 app[web.1]: Puma starting in single mode...
2017-02-25T19:56:01.902020+00:00 app[web.1]: * Version 3.7.1 (ruby 2.3.1-p112), codename: Snowy Sagebrush
2017-02-25T19:56:01.902028+00:00 app[web.1]: * Min threads: 5, max threads: 5
2017-02-25T19:56:01.902029+00:00 app[web.1]: * Environment: production
2017-02-25T19:56:01.902108+00:00 app[web.1]: * Listening on tcp://localhost:29901
2017-02-25T19:56:01.902707+00:00 app[web.1]: Use Ctrl-C to stop
2017-02-25T19:56:04.448511+00:00 heroku[router]: at=error code=H20 desc="App boot timeout" method=GET path="/" host=carmeloapp.herokuapp.com request_id=f6fe0ac3-8307-4d42-9875-c133e0f2daa8 fwd="152.170.14.185" dyno= connect= service= status=503 bytes=
2017-02-25T19:56:56.679884+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2017-02-25T19:56:56.679939+00:00 heroku[web.1]: Stopping process with SIGKILL
2017-02-25T19:56:56.785791+00:00 heroku[web.1]: Process exited with status 137
2017-02-25T19:56:56.796102+00:00 heroku[web.1]: State changed from starting to crashed
2017-02-25T20:05:48.214407+00:00 heroku[worker.1]: State changed from crashed to starting
2017-02-25T20:05:53.559843+00:00 heroku[worker.1]: Starting process with command 'bundle exec rake jobs:work'
2017-02-25T20:05:54.258262+00:00 heroku[worker.1]: State changed from starting to up
2017-02-25T20:05:59.687811+00:00 heroku[worker.1]: Process exited with status 1
2017-02-25T20:05:59.740228+00:00 heroku[worker.1]: State changed from up to crashed
2017-02-25T20:05:59.553953+00:00 app[worker.1]: rake aborted!
2017-02-25T20:05:59.553982+00:00 app[worker.1]: Don't know how to build task 'jobs:work' (see --tasks)
2017-02-25T20:05:59.554201+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.3.0/gems/rake-12.0.0/exe/rake:27:in ''
2017-02-25T20:05:59.554202+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/cli/exec.rb:74:in 'load'
2017-02-25T20:05:59.554203+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/cli/exec.rb:74:in 'kernel_load'
2017-02-25T20:05:59.554204+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/cli/exec.rb:27:in 'run'
2017-02-25T20:05:59.554205+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/cli.rb:332:in 'exec'
2017-02-25T20:05:59.554211+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor/command.rb:27:in 'run'
2017-02-25T20:05:59.554221+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in 'invoke_command'
2017-02-25T20:05:59.554222+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor.rb:359:in 'dispatch'
2017-02-25T20:05:59.554222+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/cli.rb:20:in 'dispatch'
2017-02-25T20:05:59.554223+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor/base.rb:440:in 'start'
2017-02-25T20:05:59.554223+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/cli.rb:11:in 'start'
2017-02-25T20:05:59.554224+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.3.0/gems/bundler-1.13.7/exe/bundle:34:in 'block in '
2017-02-25T20:05:59.554224+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/friendly_errors.rb:100:in 'with_friendly_errors'
2017-02-25T20:05:59.554225+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.3.0/gems/bundler-1.13.7/exe/bundle:26:in ''
2017-02-25T20:05:59.554226+00:00 app[worker.1]: /app/bin/bundle:3:in 'load'
2017-02-25T20:05:59.554227+00:00 app[worker.1]: /app/bin/bundle:3:in ''
2017-02-25T20:05:59.554292+00:00 app[worker.1]: (See full trace by running task with --trace)
    
asked by Juanse Gimenez 25.02.2017 в 21:12
source

1 answer

0

Do not deliver too much information, in fact my answer is only based on assumptions, since you do not show gem information, deploy the app, heroku configuration or your application that can give some clue to the cause of the problem. The first problem that your log shows is:

heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch

Apparently you are setting up a port for the application, being Heroku automatically assign it. Check the heroku dashboard if you have the variable PORT in Config variables or in your code in general, maybe in config/application.rb , I do not know the truth, as I say this answer goes completely to Blind Your other problem is:

app[worker.1]: Don't know how to build task 'jobs:work' (see --tasks)

With this I assume that you are using some gem to run processes in 2nd plane as delayed-job or resque . The problem may be that you do not have a worker available to run this process. Remember that the free version comes with one available, which is used in the web application.

Now, I think you should add a Procfile to your project, where you specify which processes heroku will run and in what form. Something like:

web: bundle exec rails server -p $PORT
worker:  bundle exec rake jobs:work

On a par with the Procfile, also add foreman to your Gemfile to run the application locally as similar as possible to how it would run in Heroku.

Finally, if none of this works. If you say that the application worked before, you have a git revert of the changes until the commit that worked and from there go see what changes could have caused the problem.

    
answered by 27.02.2017 в 05:12