本文介绍了Heroku run rake db.migrate / Error:连接尝试失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了heroku run rake db:migrate命令的问题。
它抱怨!Heroku客户端内部错误,见下面的整个事情。 Git push和heroku创建工作(见下文),但最终rake db:migrate崩溃。

I am experiencing problems with the "heroku run rake db:migrate" command.It complains about an " ! Heroku client internal error", see below for the entire thing. Git push and heroku create work (see below), but finally rake db:migrate crashes.

我能做什么?

所有最好的

Stefan

下面是我从Heroku进入和获得的。 p>

Below is what I enter and get from 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 [email protected]: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/ | [email protected]: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 [email protected]: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>


推荐答案

请参阅

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

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

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

$ 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或防火墙制造商)联系,以便解决此问题。

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.

这篇关于Heroku run rake db.migrate / Error:连接尝试失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 04:32