1

我遇到了“heroku run rake db:migrate”命令的问题。它抱怨“!Heroku 客户端内部错误”,请参阅下文了解全部内容。Git push 和 heroku 创建工作(见下文),但最终 rake db:migrate 崩溃。

我能做些什么?

一切顺利

斯特凡

以下是我从 Heroku 输入和获得的内容。

C:\Sites\demo_app_rt32>git push -u  origin master
Enter passphrase for key '/z/.ssh/id_rsa':
Counting objects: 102, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (91/91), done.
Writing objects: 100% (102/102), 32.37 KiB, done.
Total 102 (delta 8), reused 0 (delta 0)
To git@github.com:StefanHelber/demo_app_rt32.git
 * [new branch]      master -> master
Branch master set up to track remote branch master from origin.

C:\Sites\demo_app_rt32>heroku create --stack cedar
Creating murmuring-thicket-9165... done, stack is cedar
http://murmuring-thicket-9165.herokuapp.com/ | git@heroku.com:murmuring-thicket-
9165.git
Git remote heroku added

C:\Sites\demo_app_rt32>git push heroku master
Enter passphrase for key '/z/.ssh/id_rsa':
Counting objects: 102, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (91/91), done.
Writing objects: 100% (102/102), 32.37 KiB, done.
Total 102 (delta 8), reused 0 (delta 0)

-----> Heroku receiving push
-----> Ruby/Rails app detected
-----> Installing dependencies using Bundler version 1.2.1
       Running: bundle install --without development:test --path vendor/bundle -
-binstubs bin/
       Fetching gem metadata from https://rubygems.org/.........
       Installing rake (0.9.2.2)
       Installing i18n (0.6.1)
       Installing multi_json (1.3.6)
       Installing activesupport (3.2.3)
       Installing builder (3.0.3)
       Installing activemodel (3.2.3)
       Installing erubis (2.7.0)
       Installing journey (1.0.4)
       Installing rack (1.4.1)
       Installing rack-cache (1.2)
       Installing rack-test (0.6.2)
       Installing hike (1.2.1)
       Installing tilt (1.3.3)
       Installing sprockets (2.1.3)
       Installing actionpack (3.2.3)
       Installing mime-types (1.19)
       Installing polyglot (0.3.3)
       Installing treetop (1.4.10)
       Installing mail (2.4.4)
       Installing actionmailer (3.2.3)
       Installing arel (3.0.2)
       Installing tzinfo (0.3.33)
       Installing activerecord (3.2.3)
       Installing activeresource (3.2.3)
       Using bundler (1.2.1)
       Installing coffee-script-source (1.3.3)
       Installing execjs (1.4.0)
       Installing coffee-script (2.2.0)
       Installing rack-ssl (1.3.2)
       Installing json (1.7.5) with native extensions
       Installing rdoc (3.12)
       Installing thor (0.14.6)
       Installing railties (3.2.3)
       Installing coffee-rails (3.2.2)
       Installing jquery-rails (2.0.2)
       Installing pg (0.12.2) with native extensions
       Installing rails (3.2.3)
       Installing sass (3.2.1)
       Installing sass-rails (3.2.4)
       Installing uglifier (1.2.3)
       Your bundle is complete! It was installed into ./vendor/bundle
       Post-install message from rdoc:
       Depending on your version of ruby, you may need to install ruby rdoc/ri data:
       <= 1.8.6 : unsupported
       = 1.8.7 : gem install rdoc-data; rdoc-data --install
       = 1.9.1 : gem install rdoc-data; rdoc-data --install
       >= 1.9.2 : nothing to do! Yay!

       Cleaning up the bundler cache.
-----> Writing config/database.yml to read from DATABASE_URL
-----> Preparing app for Rails asset pipeline
       Running: rake assets:precompile
       Asset precompilation completed (13.78s)
-----> Rails plugin injection
       Injecting rails_log_stdout
       Injecting rails3_serve_static_assets
-----> Discovering process types
       Procfile declares types      -> (none)
       Default types for Ruby/Rails -> console, rake, web, worker
-----> Compiled slug size: 9.0MB
-----> Launching... done, v5
       http://murmuring-thicket-9165.herokuapp.com deployed to Heroku

To git@heroku.com:murmuring-thicket-9165.git
 * [new branch]      master -> master

C:\Sites\demo_app_rt32>heroku run rake db:migrate
Running `rake db:migrate` attached to terminal... up, run.1
 !    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:       A connection attempt failed because the connected party did not
 properly respond after a period of time, or established connection failed becau
se connected host has failed to respond. - connect(2) (Errno::ETIMEDOUT)
    Backtrace:   C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/heroku-2.3
2.4/lib/heroku/client/rendezvous.rb:39:in `initialize'
                 C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/heroku-2.3
2.4/lib/heroku/client/rendezvous.rb:39:in `open'
                 C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/heroku-2.3
2.4/lib/heroku/client/rendezvous.rb:39:in `block in start'
                 C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/timeout.rb:68:in `ti
meout'
                 C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/heroku-2.3
2.4/lib/heroku/client/rendezvous.rb:31:in `start'
                 C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/heroku-2.3
2.4/lib/heroku/command/run.rb:125:in `rendezvous_session'
                 C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/heroku-2.3
2.4/lib/heroku/command/run.rb:112:in `run_attached'
                 C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/heroku-2.3
2.4/lib/heroku/command/run.rb:21:in `index'
                 C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/heroku-2.3
2.4/lib/heroku/command.rb:206:in `run'
                 C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/heroku-2.3
2.4/lib/heroku/cli.rb:28:in `start'
                 C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/heroku-2.3
2.4/bin/heroku:16:in `<top (required)>'
                 C:/RailsInstaller/Ruby1.9.3/bin/heroku:19:in `load'
                 C:/RailsInstaller/Ruby1.9.3/bin/heroku:19:in `<main>'

    Command:     heroku run rake db:migrate
    Version:     heroku-toolbelt/2.32.4 (i386-mingw32) ruby/1.9.3 autoupdate


C:\Sites\demo_app_rt32>
4

1 回答 1

1

请参阅https://devcenter.heroku.com/articles/oneoff-admin-ps

heroku 运行进程在端口 5000 上打开与 Heroku 的连接。如果您的本地网络或 ISP 阻塞了端口 5000,或者您遇到连接问题,您将看到类似于以下内容的错误:

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

您可以通过尝试使用 telnet 到rendezvous.runtime.heroku.com 直接连接到端口5000 来测试您与Heroku 的连接。成功的会话将如下所示:

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

如果您没有得到此输出,您的计算机将被阻止访问我们的服务。我们建议与您的 IT 部门、ISP 或防火墙制造商联系以解决此问题。

于 2012-09-27T14:44:49.740 回答