heroku运行python manage.py syncdb:超时错误

时间:2014-01-15 13:57:45

标签: python django heroku django-syncdb

当我在终端运行“heroku run python manage.py syncdb”时出现错误

Running `python manage.py syncdb` attached to terminal... up, run.4140
!    Heroku client internal error.
!    Search for help at: https://help.heroku.com
!    Or report a bug at: https://github.com/heroku/heroku/issues/new
Error:       Connection timed out - connect(2) (Errno::ETIMEDOUT)
Backtrace:   /usr/local/heroku/lib/heroku/client/rendezvous.rb:40:in `initialize'
             /usr/local/heroku/lib/heroku/client/rendezvous.rb:40:in `open'
             /usr/local/heroku/lib/heroku/client/rendezvous.rb:40:in `block in start'
             /usr/lib/ruby/1.9.1/timeout.rb:68:in `timeout'
             /usr/local/heroku/lib/heroku/client/rendezvous.rb:31:in `start'
             /usr/local/heroku/lib/heroku/command/run.rb:132:in `rendezvous_session'
             /usr/local/heroku/lib/heroku/command/run.rb:119:in `run_attached'
             /usr/local/heroku/lib/heroku/command/run.rb:24:in `index'
             /usr/local/heroku/lib/heroku/command.rb:213:in `run'
             /usr/local/heroku/lib/heroku/cli.rb:28:in `start'
             /usr/local/heroku/bin/heroku:25:in `<main>'

Command:     heroku run python manage.py syncdb
Version:     heroku-toolbelt/3.1.1 (i686-linux) ruby/1.9.3

1 个答案:

答案 0 :(得分:6)

也许它与此无关,但有人遇到同样的问题(使用Rails)并在此处发布了一个解决方案: http://www.orhancanceylan.com/heroku-run-command-operation-timed-out/

它说:

“当我试图运行”heroku run rake db:migrate“命令时,我得到了”操作超时 - 连接(2)(Errno :: ETIMEDOUT)“错误。我花了几个小时来弄清楚原因是什么为此,意识到意大利的互联网服务提供商,FASTWEB阻止了端口号5000.因此无法执行run命令。要解决这个问题,你需要做的很简单:只需使用“run:detached”即“

试试这个:

  

heroku run:detached python manage.py syncdb