Python heroku 中的 H14 错误 - “没有网络进程正在运行”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/41804507/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 01:38:35  来源:igfitidea点击:

H14 error in heroku - "no web processes running"

pythonhtmldjangoherokuweb-deployment

提问by Ron Miles

error H14 happen while deploying to heroku this is my procfile:

部署到 heroku 时发生错误 H14 这是我的 procfile:

web: gunicorn -w 4 -b 0.0.0.0:$PORT -k gevent main:app

log on heroku:

登录heroku:

2017-01-23T10:42:58.904480+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=meetcapstone.herokuapp.com request_id=df88efb5-a81a-4ac0-86dc-4e03d71266bb fwd="81.218.117.137" dyno= connect= service= status=503 bytes=
2017-01-23T10:42:59.009135+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=meetcapstone.herokuapp.com request_id=21cea981-36b0-4410-891f-548bbc29f0ee fwd="81.218.117.137" dyno= connect= service= status=503 bytes=

requirements:

要求:

Flask==0.11.1
passlib==1.7.0
SQLAlchemy==1.1.5
Werkzeug==0.11.15
gunicorn==19.0.0
gevent==1.2.1

回答by rdegges

The issue here is that you're not running any web dynos. You can tell Heroku to do this via:

这里的问题是您没有运行任何网络测功机。您可以通过以下方式告诉 Heroku 执行此操作:

$ heroku ps:scale web=1

This will force Heroku to spin up a web dyno, thereby executing your gunicorn command.

这将强制 Heroku 启动一个 web dyno,从而执行您的 gunicorn 命令。

回答by Yaakov Bressler

After 3 hours of debugging, I've figured out why my appwas causing this error:

经过 3 个小时的调试,我已经弄清楚我的应用程序导致此错误的原因:

  1. My Procfilewas incorrectly cased
  2. gunicornwasn't installed in my venv
  1. 我的Procfile大小写不正确
  2. gunicorn没有安装在我的 venv

Pretty basic errors not to have caught on Heroku's end, pretty obnoxious of them not to include in some error readout.

非常基本的错误没有在 Heroku 结束时出现,它们非常令人讨厌,没有包含在某些错误读数中。

More info on dyno configuration– more on initializing your heroku app.

更多关于dyno 配置的信息——更多关于初始化你的heroku 应用程序

回答by bsh

Before this command:

在此命令之前:

heroku ps:scale web=1

I had to remove and add buildpacks again and empty commit it and redeploy it to heroku.

我不得不再次删除并添加 buildpack,然后清空提交并将其重新部署到 heroku。

heroku buildpacks:clear
heroku buildpacks:add --index heroku/python

回答by theMikus

I was having an issue here too. My problem was that my Procfile was "Procfile.txt" . What solved my issue was to remove the file extension from Procfile, then recommit and push stuff to heroku

我这里也有问题。我的问题是我的 Procfile 是 "Procfile.txt" 。解决我的问题的是从 Procfile 中删除文件扩展名,然后重新提交并将内容推送到 heroku