foreman only shows line with “started with pid #” and nothing else
I’ve been able to resolve this issue by 2 different ways:
From https://github.com/ddollar/foreman/wiki/Missing-Output:
If you are not seeing any output from your program, there is a likely
chance that it is buffering stdout. Ruby buffers stdout by default. To
disable this behavior, add this code as early as possible in your
program:# ruby
$stdout.sync = trueBy installing foreman via the heroku toolbelt package
But I still don’t know what’s happening nor why this 2 ways above resolved the issue…
Foreman start hangs
Heroku no longer supports foreman so the best approach would be to try using their recommended alternative to foreman instead: the heroku command "local".
The implementation is trivial:
Download and install the latest version of heroku toolbelt (which no longer includes foreman).
Instead of using
foreman start
useheroku local
.
See heroku's web site for full details of heroku local.
Although you don't mention it, is it possible that the reason you are getting those ERR_EMPTY_RESPONSE messages is because foreman had died (rather than "hung") while handling the request? I had the same problem with some stylesheets after foreman had logged the message "sending SIGKILL to all processes" to the console, and terminated. Regardless, my problems vanished when I used heroku local
instead of foreman start
.
And even if heroku local
also fails, that should become the issue to resolve rather than your current problem with foreman.
Can't start foreman in Heroku Tutorial using Python
I had this problem. I fixed it by uninstalling version 0.62 of the foreman gem and installing 0.61.
gem uninstall foreman
gem install foreman -v 0.61
Foreman says unexpected EOF in web.1 file - but my node app has no web.1 file
I have just answered this question here.
foreman says "unexpected EOF" in one of the SAME node app in 2 different places
Essentially, you can't have any apostrophes in your file path. (You actually have to rename you folders so they don't contain apostrophes.) It's a bug in foreman.
I'll take doubt credit for answering your double post, though. :) I need to get over 50 reputation so I can start making comments!
Problems running `foreman start` / deploying Django app to Heroku
Figured it out while writing this question!
What I had to do was set the --pythonpath
option to point to my django project root, i.e. git_root/my_django_project/
.
This is what I had in my Procfile
:
web: gunicorn -b 0.0.0.0:8000 --pythonpath=./my_django_project my_django_project.wsgi:application
Now it works locally:
$ foreman start
17:04:02 web.1 | started with pid 6327
17:04:02 web.1 | 2013-10-15 17:04:02 [6330] [INFO] Starting gunicorn 18.0
17:04:02 web.1 | 2013-10-15 17:04:02 [6330] [INFO] Listening at: http://0.0.0.0:8000 (6330)
17:04:02 web.1 | 2013-10-15 17:04:02 [6330] [INFO] Using worker: sync
17:04:02 web.1 | 2013-10-15 17:04:02 [6335] [INFO] Booting worker with pid: 6335
17:04:04 web.1 | 2013-10-15 17:04:04 [6330] [INFO] Handling signal: winch
17:04:04 web.1 | 2013-10-15 17:04:04 [6330] [INFO] SIGWINCH ignored. Not daemonized
And scaling web processes works now, too:
$ heroku ps:scale web=1 --app my-django-project
Scaling web dynos... done, now running 1
Foreman gem is not loading my services from Procfile, they always fail
Try removing your output redirects by changing the 2nd and 3rd lines to:
resque: bundle exec rake resque:start
privpub: bundle exec rackup private_pub.ru -s thin -E production
Foreman might have issues w/ redirects in commands: https://github.com/ddollar/foreman/issues/search?q=redirect
Related Topics
Ruby: Dynamically Generate Attribute_Accessor
Ruby on Rails - "Add 'Gem SQLite3'' to Your Gemfile"
How to Save an Object to a File
Problems Installing Ruby on Mountain Lion - Ruby 1.9.3 Wont' Compile
Rails Gem Rails3-Jquery-Autocomplete How to Scope by User
Ruby 1.9 + Sinatra Incompatible Character Encodings: Ascii-8Bit and Utf-8
Set Attribute Dynamically of Ruby Object
Why Does Array.Slice Behave Differently for (Length, N)
Is There an Expect Equivalent Gem for Ruby
Split String into a List, But Keeping the Split Pattern
Why Many People Use "-%>" Instead of "%>" in Rails
How to Prevent Nokogiri from Adding <Doctype> Tags
Setting Elastic Search Limit to "Unlimited"
Monkey Patching Devise (Or Any Rails Gem)