I have deployed a rails 3.1 app to Heroku Cedar stack, and am trying to perform a:
heroku run rake db:migrate
it returns:
Running console attached to terminal...
Error connecting to process
I also try to simply launch the console:
heroku run console
Any run command returns the same error.
Running console attached to terminal...
Error connecting to process
Looking at the logs I get the error code:
2011-09-25T16:04:52+00:00 app[run.2]: Error R13 (Attach error) -> Failed to attach to process
When I heroku ps
to see the current processes, I can see my attempts are running:
Process State Command
------------ ------------------ ------------------------------
run.2 complete for 26m bundle exec rails console
run.3 up for 27s bundle exec rails console
run.4 up for 3s bundle exec rake db:create
web.1 up for 46s bundle exec thin start -p $PORT -e..
But again each of them are raising exceptions:
2011-09-25T16:31:47+00:00 app[run.3]: Error R13 (Attach error) -> Failed to attach to process
2011-09-25T16:31:47+00:00 heroku[run.3]: Process exited
2011-09-25T16:31:48+00:00 heroku[run.3]: State changed from up to complete
2011-09-25T16:32:11+00:00 app[run.4]: Error R13 (Attach error) -> Failed to attach to process
2011-09-25T16:32:11+00:00 heroku[run.4]: Process exited
2011-09-25T16:32:12+00:00 heroku[run.4]: State changed from up to complete
Server Admin isnt my cup of tea, hence the decision to use Heroku.
Both Heroku docs and Googling have not led me down a path that give me much to go on.
Any ideas? This has not been my experience on the Bamboo stack.
My other errors are obviously related to DB migrations not being performed. Until I can run the rake tasks, I'm stuck moving forward.
This problem is typically caused by a connectivity or firewall issue. You can test your connection to the
heroku run
andheroku console
servers by running the following commands:(If you are successfully able to connect, press Ctrl+] and then type
quit
to exit the telnet session.)Some users have success after whitelisting these hostname+port combinations in their firewall.
Heroku mentions this in the troubleshooting section of one-off processes: http://devcenter.heroku.com/articles/oneoff-admin-ps
An application which takes a long time to boot can also exasperate connectivity issues. If the server does not respond quickly enough, your local connection will timeout before the app can boot.