Heroku Foreman以错误代码5退出 [英] Heroku Foreman exits with an error code 5

查看:252
本文介绍了Heroku Foreman以错误代码5退出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  15:05:09 web.1 |开始于pid 4888 
15:05:10 web.1 |
15:05:10 web.1 | > finext_server@0.0.1测试F:\Projects\finext\server
15:05:10 web.1 | >设置NODE_ENV =开发&&节点./bin/www.js
15:05:11 web.1 |
15:05:12 web.1 |退出代码5
15:05:12 system |发送SIGKILL到所有进程
15:05:12 | app.get('env'):development

这是我得到的输出,它是一个在SIGKILL之后执行的代码方面很少变量。有时,再次看到命令提示符之前,再执行几行代码。

我尝试使用node-foreman,并且我的应用程序在那里工作正常。所以我猜测它与工头有关。我的代码和procfile可以在这里找到: https://github.com/chintanp/finext



这也是过程无法在heroku上启动的原因。

另一个世界中的某个人也有类似的问题。 快速Hello World - Heroku Foreman Returns Code 5,'npm start'works just well

解决方案

我最近遇到和你一样的情况当运行我的应用程序时:


  • foreman记录了用代码5退出和发送SIGKILL到所有进程 / p>


  • 如果我使用npm(npm start)或node-foreman(nf start)代替工头,我的应用工作正常。 / li>



该应用程序还使用放弃,这是一份由领班作者撰写的应用程序。

但几周前,heroku添加了新的命令 heroku local ,它在幕后使用,并正式取代使用工头:


从今天开始,新的Heroku Toolbelt安装将不会带有
Foreman。 命令heroku local取代了工头。 Heroku Local
利用Forego完成任务,速度更快,同时拥有
更好的跨平台支持。


请注意,heroku现在也声明领班是不正式支持



所以解决问题的方法是:




  • 停止使用工头。

  • 下载并安装最新版本的heroku toolbelt 。
  • 将foreman start替换为heroku local。


这种方法在Windows 7上适用于我。


15:05:09 web.1  | started with pid 4888
15:05:10 web.1  | 
15:05:10 web.1  | > finext_server@0.0.1 test F:\Projects\finext\server
15:05:10 web.1  | > set NODE_ENV=development && node ./bin/www.js
15:05:11 web.1  | 
15:05:12 web.1  | exited with code 5
15:05:12 system | sending SIGKILL to all processes
15:05:12        | app.get('env'): development 

This is the output I get, and it is a little variable in terms of the code that gets executed after SIGKILL. Sometimes, a few more lines of coide get executed before I see the command prompt again.

I tried using node-foreman, and my application works fine there. So i am guessing it has something to do with foreman. My code and procfile can be found here: https://github.com/chintanp/finext

This is the reason that the process cannot start on heroku as well.

Someone in another world had a similar problem. Express Hello World -- Heroku Foreman Returns Code 5, 'npm start' works just fine

解决方案

I recently faced exactly the same situation as you when running my application:

  • foreman logged the messages "exited with code 5" and "sending SIGKILL to all processes".

  • My app worked fine if I used npm ("npm start") or node-foreman ("nf start") instead of foreman.

The app also worked using forego, a go application written by the author of foreman.

But a couple of weeks ago heroku added the new command "heroku local", which uses forego behind the scenes, and formally supersedes the use of foreman:

Starting today, new Heroku Toolbelt installs will not come with Foreman. The command heroku local has replaced foreman. Heroku Local makes use of Forego to accomplish its tasks and it’s faster and has better cross-platform support.

Note that heroku also now state that foreman is "not officially supported".

So the way to resolve your problem is:

  • Stop using foreman.

  • Download and install the latest version of heroku toolbelt.

  • Replace "foreman start" with "heroku local".

This approach worked for me on Windows 7.

这篇关于Heroku Foreman以错误代码5退出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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