【问题标题】:heroku H14 error "No web processes running" for Django 1.82Django 1.82 的 heroku H14 错误“没有运行 Web 进程”
【发布时间】:2015-09-22 19:21:54
【问题描述】:

您好,我正在通过 Onemonth Django 学习 Django。 我正在将我的网络应用程序部署到 heroku,但出现以下错误。

heroku[router]: at=error code=H14 desc="No web processes running"

我尝试使用heroku ps:scale web=1 解决此问题,但结果如下。

Scaling dynos... failed
 !    No such process type web defined in Procfile.

有人可以帮助解决这个问题吗?我使用 conda 来制作虚拟环境,但有可能导致这种情况吗?

我的档案:

web: gunicorn myapp.wsgi --log-file - 

git push heroku master已成功运行。我使用 OSX Yosemite/Django 1.82。

项目结构如下所示。

Procfile
requirements.txt
core
- views.py
- __init__.py
- admin.py
- migrations
- models.py
- tests.py
- urls.py
- manage.py
nomadscoffee
- wsgi.py
- __init__.py
- settings.py
- urls.py
static
- css
- font-awesome
- img
- fonts
- index.html
- js
- less
- LICENSE
- mail
- README.md
templates
- base
  - index.html

登录heroku:

-----> Python app detected
-----> Installing runtime (python-2.7.10)
-----> Installing dependencies with pip
       Collecting dj-database-url==0.3.0 (from -r requirements.txt (line 1))
         Downloading dj_database_url-0.3.0-py2.py3-none-any.whl
       Collecting dj-static==0.0.6 (from -r requirements.txt (line 2))
         Downloading dj-static-0.0.6.tar.gz
       Collecting Django==1.8.2 (from -r requirements.txt (line 3))
         Downloading Django-1.8.2-py2.py3-none-any.whl (6.2MB)
       Collecting django-toolbelt==0.0.1 (from -r requirements.txt (line 4))
         Downloading django-toolbelt-0.0.1.tar.gz
       Collecting gunicorn==19.3.0 (from -r requirements.txt (line 5))
         Downloading gunicorn-19.3.0-py2.py3-none-any.whl (110kB)
       Collecting psycopg2==2.6.1 (from -r requirements.txt (line 6))
         Downloading psycopg2-2.6.1.tar.gz (371kB)
       Collecting static3==0.6.1 (from -r requirements.txt (line 7))
         Downloading static3-0.6.1.tar.gz
       Installing collected packages: dj-database-url, static3, dj-static, Django, psycopg2, gunicorn, django-toolbelt
         Running setup.py install for static3
         Running setup.py install for dj-static
         Running setup.py install for psycopg2
         Running setup.py install for django-toolbelt
       Successfully installed Django-1.8.2 dj-database-url-0.3.0 dj-static-0.0.6 django-toolbelt-0.0.1 gunicorn-19.3.0 psycopg2-2.6.1 static3-0.6.1
You are using pip version 7.0.3, however version 7.1.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
-----> Preparing static assets
       Collectstatic configuration error. To debug, run:
       $ heroku run python manage.py collectstatic --noinput
-----> Discovering process types
 ~     Mis-cased procfile detected; ignoring.
 ~     Rename it to Procfile to have it honored.
       Procfile declares types -> (none)
-----> Compressing... done, 54.1MB
-----> Launching... done, v4
       https://something.herokuapp.com/ deployed to Heroku

【问题讨论】:

  • 你的项目结构是什么样的?
  • 如果您的Procfile 中确实有myapp.wsgi,则将其更改为nomadscoffee.wsgi
  • Dariusz,感谢您的指出。不,我故意改变它是为了清楚。它是 nomadscoffe.wsgi。
  • 我尝试再次删除并创建一个新的 Heroku 应用程序,但我仍然遇到同样的错误。请帮助 :(
  • 错误会来自使用 conda 吗?如果是这样,我该如何解决?

标签: python django heroku conda procfile


【解决方案1】:

阅读您的错误日志,我看到了:

Mis-cased procfile detected; ignoring

这让我觉得你提供的项目结构不正确。正如您所指出的,您在根目录中真的有Procfile 吗? Heroku 认为你有procfile。我建议将procfile 重命名为Procfile

【讨论】:

  • 感谢您的建议。我在本地有 Procfile,但在 github 上,我仍然有 procfile。
猜你喜欢
  • 2012-04-15
  • 2017-06-07
  • 1970-01-01
  • 1970-01-01
  • 2012-07-09
  • 1970-01-01
  • 2012-12-19
  • 2012-04-25
  • 2012-07-30
相关资源
最近更新 更多