Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Heroku run console get "Timeout awaiting process"

Tags:

heroku

console

No way to have console wired with Heroku lately:

lsoave@ubuntu:~/rails/github/gitwatcher$ heroku run console
Running console attached to terminal... 
Timeout awaiting process
lsoave@ubuntu:~/rails/github/gitwatcher$ 

Does it happen to anyone else ?

like image 725
Luca G. Soave Avatar asked Dec 20 '11 22:12

Luca G. Soave


2 Answers

I had the same problem on the ISP FastWeb, which is an ISP here in Italy. Based on my Googling, it appears that they block port 5000.

To get around it for now, I am running the following:

heroku run:detached rake db:migrate

That tells it to run without waiting to connect to my machine on port 5000. Then, you can examine the logs for your process you just kicked off. (The heroku command will tell you this after you run it):

heroku logs -p run.1

That tells it to output the logs for the running process. But I found that the logs command was exiting even though my process was still running. To get around that, you can add "-t" if you want to "tail" the logs:

heroku logs -p run.1 -t   

You'll know your process is done when you see something like this in the logs:

2012-10-14T15:36:41+00:00 heroku[run.1]: Process exited with status 0
2012-10-14T15:36:41+00:00 heroku[run.1]: State changed from up to complete

I'm sure someone could whip up a script that would

  1. Run the given heroku command with run:detached
  2. Examine the output to determine what its process name was (run.1, run.2, etc)
  3. run heroku logs -p run.1 -t and show me the output
  4. exit the logs process when it sees something like State changed from up to complete
like image 176
Taytay Avatar answered Oct 07 '22 19:10

Taytay


From: http://devcenter.heroku.com/articles/oneoff-admin-ps

The heroku run process opens a connection to Heroku on port 5000. If your local network or ISP is blocking port 5000, or you are experiencing a connectivity issue, you will see an error similar to:

$ heroku run rails console
Running rails console attached to terminal... 
Timeout awaiting process

You can test your connection to Heroku by trying to connect directly to port 5000 by using telnet to rendezvous.heroku.com. A successful session will look like this:

$ telnet rendezvous.heroku.com 5000
Trying 50.19.103.36...
Connected to ec2-50-19-103-36.compute-1.amazonaws.com.
Escape character is '^]'. 

If you do not get this output, your computer is being blocked from accessing our services. We recommend contacting your IT department, ISP, or firewall manufacturer to move forward with this issue.

like image 41
Neil Middleton Avatar answered Oct 07 '22 19:10

Neil Middleton