heroku运行控制台返回'连接到进程时出错' [英] heroku run console returns 'Error connecting to process'

查看:119
本文介绍了heroku运行控制台返回'连接到进程时出错'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经为Heroku Cedar堆栈部署了一个rails 3.1应用程序,并试图执行:

  heroku run rake db :迁移

返回:

<$ p $
连接到进程的错误

我也尝试启动控制台:

  heroku运行控制台

任何运行命令都会返回相同的错误。

 连接到终端的运行控制台... 
连接到进程

查看日志,我得到错误代码:

  2011-09-25T16:04:52 + 00:00 app [run.2]:Error R13(Attach error) - >无法附加到进程

当我 heroku ps 看到当前的进程,我可以看到我的尝试正在运行:

 进程状态命令
---- -------- ------------------ ------------------------ ------
run.2完成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 ..

但是他们每个人都提出异常:

  2011-09-25T16:31:47 + 00:00 app [run .3]:错误R13(附加错误) - >无法附加到进程
2011-09-25T16:31:47 + 00:00 heroku [run.3]:进程已退出
2011-09-25T16:31:48 + 00:00 heroku [ run.3]:状态从up更改为完成
2011-09-25T16:32:11 + 00:00 app [run.4]:错误R13(附加错误) - >无法附加到进程
2011-09-25T16:32:11 + 00:00 heroku [run.4]:进程已退出
2011-09-25T16:32:12 + 00:00 heroku [ run.4]:状态从up改为完成

Server Admin不是我的一杯茶,因此决定使用Heroku。

Heroku的文档和谷歌搜索都没有让我走上一条让我继续前进的道路。


有什么想法?这并不是我在竹堆上的经验。

我的其他错误显然与数据库迁移未执行有关。直到我可以运行rake任务时,我都卡在前进。

解决方案

我有同样的问题,虽然我没有解决问题,但我找到了解决方法。 b
$ b

而不是使用:


heroku运行rake db:migrate


您可以使用:

lockquote
heroku run:detached rake db:migrate


这将在后台运行该命令,将输出写入日志。完成后,您可以查看结果的日志。



不理想,但是当您的网络不足时,它会让您摆脱困境:)

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.

解决方案

I had the same problem, and although I did not solve the problem, I found a workaround.

Instead of using:

heroku run rake db:migrate

You can use:

heroku run:detached rake db:migrate

This runs the command in the background, writing the output to the log. When it is finished you can view the log for the result.

Not ideal, but when you are on an inadequate network, it will get you out of a hole :)

这篇关于heroku运行控制台返回'连接到进程时出错'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆