7

I am trying to run Heroku console, but in the console, I get the message "Running console attached to terminal" but the console doesn't start.

In the Heroku logs, I get the error:

 Error: no child processes attached.

Any help?

Kick Buttowski
  • 6,709
  • 13
  • 37
  • 58
Tony
  • 10,088
  • 20
  • 85
  • 139
  • I'm encountering similar issue; Output from my Heroku logs: 2012-02-24T07:54:31+00:00 heroku[run.1]: State changed from created to starting 2012-02-24T07:54:38+00:00 app[run.1]: Awaiting client 2012-02-24T07:54:38+00:00 app[run.1]: Starting process with command `rails console` 2012-02-24T07:54:39+00:00 heroku[run.1]: State changed from starting to up 2012-02-24T07:54:39+00:00 app[run.1]: Error: undefined method `exitstatus' for nil:NilClass 2012-02-24T07:54:40+00:00 heroku[run.1]: Process exited with status 0 2012-02-24T07:54:40+00:00 heroku[run.1]: State changed from up to complete – Paul Pettengill Feb 24 '12 at 07:55
  • ~/rails/recruits => heroku run rails console Running rails console attached to terminal... up, run.1 ~/rails/recruits => – Paul Pettengill Feb 24 '12 at 07:57

6 Answers6

17

I just had a thread with Heroku support about my similar issue, here was their response, which worked for me.

So this is a bamboo app. You can either do

$ heroku console

which will tap into a running web dyno, or you can run a new console as a one-off process with:

$ heroku run bundle exec rails console

On cedar apps you'd also be able to do

$ heroku run console

which also starts a one-off process, because the console process type would be implied by the rails buildpack or declared in your Procfile. It amounts to the same as the previous line.

Paul Pettengill
  • 4,843
  • 1
  • 29
  • 33
3

I was experiencing same issues.
Try

heroku run rails console

in Rails >=3

Happy coding :)

mrudult
  • 2,480
  • 3
  • 35
  • 54
2

Try

$ telnet rendezvous.heroku.com 5000 

to test the net enabled access to that port. They mention that filtered-port issue on their guide

robermorales
  • 3,293
  • 2
  • 27
  • 36
  • Ultimately, this is heroku not taking responsibility to help users workaround draconian environments. They need to fix this by adding a port 80 or 443 solution. –  Apr 11 '13 at 21:11
  • I think port 80 should not be used for non-http communications. – robermorales Apr 14 '13 at 15:53
  • Then don't use websockets. :) Sometimes you have to work around the way things are to get a job done so you can get home. –  Apr 14 '13 at 19:52
  • Check out corkscrew http://www.mtu.net/~engstrom/ssh-proxy.php and http://stackoverflow.com/questions/10555546/error-in-git-push-heroku-master-through-ssh-behind-proxy –  Apr 14 '13 at 19:57
0

I think this is the same problem you're describing and it has an accepted answer which seemed to fix the issue for the guy that posted the question :-)

heroku run console returns 'Error connecting to process'

Community
  • 1
  • 1
Radu Cugut
  • 1,663
  • 1
  • 16
  • 18
0

I had this problem before I'd actually pushed my code to heroku.

Once I successfully pushed and started everything (bundle, rake etc.) the console actually worked.

Stu
  • 1,497
  • 1
  • 13
  • 24
-1

Do this and then try In Procfile

web: bundle exec unicorn_rails -p $PORT -c config/unicorn.rb

In unicorn.rb

worker_processes 2 preload_app true timeout 30

@resque_pid = nil

before_fork do |server, worker| @resque_pid ||= spawn("bundle exec rake environment resque:work QUEUE=*") end

after_fork do |server, worker| ActiveRecord::Base.establish_connection end

karnhick
  • 255
  • 1
  • 2
  • 8