在heroku上部署django网站出错

2024-04-18

我正在heroku 中部署我的django 网站,并在django 的setting.py 文件中使用DATABASE = {}。 我正在遵循以下所有步骤赫罗库帮助 https://devcenter.heroku.com/articles/getting-started-with-python#view-logs每个命令都已运行,但运行命令时出现一些应用程序错误-

赫罗库开放

 (jango)dc@dc-comp-4:~/website$ heroku open
    Opening evening-waters-7886... done
    (jango)dc@dc-comp-4:~/website$ 
    (process:8176): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed

我的 Heroku 日志状态是-

dc@dc-comp-4:~/website$ heroku logs
2015-02-26T09:07:09.555685+00:00 heroku[web.1]: State changed from crashed to starting
2015-02-26T09:07:09.555087+00:00 heroku[web.1]: State changed from starting to crashed
2015-02-26T09:07:17.890143+00:00 heroku[web.1]: Starting process with command `gunicorn gettingstarted.wsgi --log-file -`
2015-02-26T09:07:20.325197+00:00 app[web.1]: bash: gunicorn: command not found
2015-02-26T09:07:21.184736+00:00 heroku[web.1]: Process exited with status 127
2015-02-26T09:07:21.202490+00:00 heroku[web.1]: State changed from starting to crashed
2015-02-26T09:07:27.250898+00:00 heroku[api]: Scale to web=1 by [email protected] /cdn-cgi/l/email-protection
2015-02-26T09:07:56.156898+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=evening-waters-7886.herokuapp.com request_id=9a9781c5-57d6-43c2-8ca0-43df571804a0 fwd="14.139.240.226" dyno= connect= service= status=503 bytes=
2015-02-26T09:08:01.602067+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=evening-waters-7886.herokuapp.com request_id=597a1c36-200e-4f8c-8dfe-b00d4d2cacee fwd="14.139.240.226" dyno= connect= service= status=503 bytes=
2015-02-26T09:08:03.737046+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=evening-waters-7886.herokuapp.com request_id=4d790108-6019-4fce-9d1e-10eafca9efc1 fwd="14.139.240.226" dyno= connect= service= status=503 bytes=
2015-02-26T09:27:54.099907+00:00 heroku[api]: Deploy e061461 by [email protected] /cdn-cgi/l/email-protection
2015-02-26T09:27:54.099907+00:00 heroku[api]: Release v6 created by [email protected] /cdn-cgi/l/email-protection
2015-02-26T09:27:54.255144+00:00 heroku[web.1]: State changed from crashed to starting
2015-02-26T09:28:05.720678+00:00 heroku[web.1]: Starting process with command `gunicorn website:app --log-file=-`
2015-02-26T09:28:06.984648+00:00 app[web.1]: bash: gunicorn: command not found
2015-02-26T09:28:07.736542+00:00 heroku[web.1]: State changed from starting to crashed
2015-02-26T09:28:07.737796+00:00 heroku[web.1]: State changed from crashed to starting
2015-02-26T09:28:07.721050+00:00 heroku[web.1]: Process exited with status 127
2015-02-26T09:28:11.784672+00:00 heroku[web.1]: Starting process with command `gunicorn website:app --log-file=-`
2015-02-26T09:28:13.765503+00:00 app[web.1]: bash: gunicorn: command not found
2015-02-26T09:28:14.689070+00:00 heroku[web.1]: Process exited with status 127
2015-02-26T09:28:14.702968+00:00 heroku[web.1]: State changed from starting to crashed
2015-02-26T09:28:18.234685+00:00 heroku[api]: Scale to web=1 by [email protected] /cdn-cgi/l/email-protection
2015-02-26T09:28:48.532426+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=evening-waters-7886.herokuapp.com request_id=a2b76940-91ea-4d2d-884e-0049bc707217 fwd="14.139.240.226" dyno= connect= service= status=503 bytes=
2015-02-26T09:32:01.295019+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=evening-waters-7886.herokuapp.com request_id=7bf7ddc0-a04f-4f40-aade-f7a5116cf9f0 fwd="14.139.240.226" dyno= connect= service= status=503 bytes=
2015-02-26T09:34:29.437580+00:00 heroku[api]: Attach HEROKU_POSTGRESQL_BLUE resource by [email protected] /cdn-cgi/l/email-protection
2015-02-26T09:34:29.437580+00:00 heroku[api]: Release v7 created by [email protected] /cdn-cgi/l/email-protection
2015-02-26T09:34:29.678932+00:00 heroku[web.1]: State changed from crashed to starting
2015-02-26T09:34:33.288768+00:00 heroku[web.1]: Starting process with command `gunicorn website:app --log-file=-`
2015-02-26T09:34:35.045626+00:00 app[web.1]: bash: gunicorn: command not found
2015-02-26T09:34:35.717937+00:00 heroku[web.1]: Process exited with status 127
2015-02-26T09:34:35.729414+00:00 heroku[web.1]: State changed from starting to crashed
2015-02-26T09:39:47.384245+00:00 heroku[api]: Release v8 created by [email protected] /cdn-cgi/l/email-protection
2015-02-26T09:39:47.384245+00:00 heroku[api]: Attach HEROKU_POSTGRESQL_OLIVE resource by [email protected] /cdn-cgi/l/email-protection
2015-02-26T09:39:47.747151+00:00 heroku[web.1]: State changed from crashed to starting
2015-02-26T09:39:50.940581+00:00 heroku[web.1]: Starting process with command `gunicorn website:app --log-file=-`
2015-02-26T09:39:52.075160+00:00 app[web.1]: bash: gunicorn: command not found
2015-02-26T09:39:52.716034+00:00 heroku[web.1]: State changed from starting to crashed
2015-02-26T09:39:52.716772+00:00 heroku[web.1]: State changed from crashed to starting
2015-02-26T09:39:52.705237+00:00 heroku[web.1]: Process exited with status 127
2015-02-26T09:39:56.910325+00:00 heroku[web.1]: Starting process with command `gunicorn website:app --log-file=-`
2015-02-26T09:39:58.335235+00:00 app[web.1]: bash: gunicorn: command not found
2015-02-26T09:39:59.091134+00:00 heroku[web.1]: Process exited with status 127
2015-02-26T09:39:59.123230+00:00 heroku[web.1]: State changed from starting to crashed
2015-02-26T09:41:28.032235+00:00 heroku[api]: Deploy 5e882c5 by [email protected] /cdn-cgi/l/email-protection
2015-02-26T09:41:28.032235+00:00 heroku[api]: Release v9 created by [email protected] /cdn-cgi/l/email-protection
2015-02-26T09:41:28.577676+00:00 heroku[web.1]: State changed from crashed to starting
2015-02-26T09:41:32.256825+00:00 heroku[web.1]: Starting process with command `gunicorn website:app --log-file=-`
2015-02-26T09:41:33.437334+00:00 app[web.1]: bash: gunicorn: command not found
2015-02-26T09:41:34.121450+00:00 heroku[web.1]: Process exited with status 127
2015-02-26T09:41:34.126557+00:00 heroku[web.1]: State changed from starting to crashed
2015-02-26T09:41:46.438295+00:00 heroku[api]: Scale to web=1 by [email protected] /cdn-cgi/l/email-protection
2015-02-26T09:42:04.929728+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=evening-waters-7886.herokuapp.com request_id=f16cebee-7c15-42d5-bba6-a4c85d0addaf fwd="14.139.240.226" dyno= connect= service= status=503 bytes=
2015-02-26T09:43:05.406941+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=evening-waters-7886.herokuapp.com request_id=9e4aa61d-073d-49d2-a696-606b4c965d51 fwd="14.139.240.226" dyno= connect= service= status=503 bytes=
2015-02-26T09:44:05.946147+00:00 heroku[api]: Attach HEROKU_POSTGRESQL_COPPER resource by [email protected] /cdn-cgi/l/email-protection
2015-02-26T09:44:05.946147+00:00 heroku[api]: Release v10 created by [email protected] /cdn-cgi/l/email-protection
2015-02-26T09:44:06.133499+00:00 heroku[web.1]: State changed from crashed to starting
2015-02-26T09:44:09.806610+00:00 heroku[web.1]: Starting process with command `gunicorn website:app --log-file=-`
2015-02-26T09:44:11.203036+00:00 app[web.1]: bash: gunicorn: command not found
2015-02-26T09:44:11.895235+00:00 heroku[web.1]: Process exited with status 127
2015-02-26T09:44:11.911573+00:00 heroku[web.1]: State changed from starting to crashed
2015-02-26T09:52:08.400443+00:00 heroku[api]: Scale to web=1 by [email protected] /cdn-cgi/l/email-protection
2015-02-26T09:52:30.139203+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=evening-waters-7886.herokuapp.com request_id=2e818d74-a717-41d4-9050-3be25889eaed fwd="14.139.240.226" dyno= connect= service= status=503 bytes=
2015-02-26T09:58:07.383685+00:00 heroku[api]: Starting process with command `rake db:migrate` by [email protected] /cdn-cgi/l/email-protection
2015-02-26T09:58:11.492711+00:00 heroku[run.3731]: Awaiting client
2015-02-26T09:58:11.520152+00:00 heroku[run.3731]: Starting process with command `rake db:migrate`
2015-02-26T09:58:13.489900+00:00 heroku[run.3731]: Process exited with status 127
2015-02-26T09:58:13.503789+00:00 heroku[run.3731]: State changed from up to complete
2015-02-26T09:58:11.931301+00:00 heroku[run.3731]: State changed from starting to up
2015-02-26T09:59:05.424832+00:00 heroku[web.1]: State changed from crashed to starting
2015-02-26T09:59:12.340999+00:00 heroku[web.1]: Starting process with command `gunicorn website:app --log-file=-`
2015-02-26T09:59:13.778095+00:00 app[web.1]: bash: gunicorn: command not found
2015-02-26T09:59:14.428734+00:00 heroku[web.1]: Process exited with status 127
2015-02-26T09:59:14.437924+00:00 heroku[web.1]: State changed from starting to crashed
2015-02-26T09:59:14.438617+00:00 heroku[web.1]: State changed from crashed to starting
2015-02-26T09:59:17.805847+00:00 heroku[web.1]: Starting process with command `gunicorn website:app --log-file=-`
2015-02-26T09:59:19.331755+00:00 app[web.1]: bash: gunicorn: command not found
2015-02-26T09:59:20.010738+00:00 heroku[web.1]: Process exited with status 127
2015-02-26T09:59:20.028996+00:00 heroku[web.1]: State changed from starting to crashed
2015-02-26T09:59:23.726010+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=evening-waters-7886.herokuapp.com request_id=c2ba4a6d-1357-47a4-abee-78cfe3db7545 fwd="14.139.240.226" dyno= connect= service= status=503 bytes=
2015-02-26T10:04:06.912448+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=evening-waters-7886.herokuapp.com request_id=5d21087f-d811-4685-964b-23acf24fd499 fwd="14.139.240.226" dyno= connect= service= status=503 bytes=
2015-02-26T10:29:10.000446+00:00 heroku[api]: Starting process with command `pip install gunicorn` by [email protected] /cdn-cgi/l/email-protection
2015-02-26T10:29:13.833066+00:00 heroku[run.8299]: Awaiting client
2015-02-26T10:29:13.871544+00:00 heroku[run.8299]: Starting process with command `pip install gunicorn`
2015-02-26T10:29:14.121060+00:00 heroku[run.8299]: State changed from starting to up
2015-02-26T10:29:18.182526+00:00 heroku[run.8299]: Process exited with status 0
2015-02-26T10:29:18.195891+00:00 heroku[run.8299]: State changed from up to complete
2015-02-26T10:32:34.286827+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=evening-waters-7886.herokuapp.com request_id=29508561-6c27-4ac6-a67d-7543fb87b385 fwd="14.139.240.226" dyno= connect= service= status=503 bytes=
2015-02-26T10:36:58.977614+00:00 heroku[web.1]: State changed from crashed to starting
2015-02-26T10:37:02.450833+00:00 heroku[web.1]: Starting process with command `gunicorn website:app --log-file=-`
2015-02-26T10:37:03.717531+00:00 app[web.1]: bash: gunicorn: command not found
2015-02-26T10:37:04.438957+00:00 heroku[web.1]: State changed from starting to crashed
2015-02-26T10:37:04.439393+00:00 heroku[web.1]: State changed from crashed to starting
2015-02-26T10:37:04.418361+00:00 heroku[web.1]: Process exited with status 127
2015-02-26T10:37:08.015347+00:00 heroku[web.1]: Starting process with command `gunicorn website:app --log-file=-`
2015-02-26T10:37:09.728762+00:00 app[web.1]: bash: gunicorn: command not found
2015-02-26T10:37:10.601803+00:00 heroku[web.1]: State changed from starting to crashed
2015-02-26T10:37:10.596391+00:00 heroku[web.1]: Process exited with status 127
2015-02-26T11:21:32.653989+00:00 heroku[web.1]: State changed from crashed to starting
2015-02-26T11:21:36.340593+00:00 heroku[web.1]: Starting process with command `gunicorn website:app --log-file=-`
2015-02-26T11:23:39.380466+00:00 heroku[web.1]: State changed from starting to down
dc@dc-comp-4:~/website$ ^C

请帮帮我。


bash:gunicorn:找不到命令

上面的错误清楚地提到你没有gunicorn在 Heroku 服务器上

如何安装

  1. 安装它使用pip install gunicorn将清除错误。
  2. 将gunicorn 添加到您的requirements.txt 文件中
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

在heroku上部署django网站出错 的相关文章

  • 按外键字段的计数排序?

    我有一个用户模型和一个提交模型 每个提交都有一个名为 user subscribed 的外键字段 用于上传该提交的用户 class Submission models Model uploaded by models ForeignKey
  • 导入错误:没有名为 django 的模块

    我使用的是centos Linux 我有 python 2 6 和 django 现在我升级到 python 2 7 Python 2 6 位于 usr lib python2 6 Python 2 7 位于 usr local lib p
  • django-autocompletion-light 简单外键完成显示不可编辑的下拉小部件

    我有一个国家模型 class Country models Model name models CharField max length 200 def str self return self name 这是由 UserDetails 模
  • 如何手动发送django异常日志?

    我的应用程序中有一个应该返回的特定视图HttpResponse 如果一切都成功完成并且类似HttpResponseBadRequest 否则 此视图适用于外部数据 因此可能会引发一些意外的异常 我当然需要知道发生了什么 所以我有这样的东西
  • 如何修复 pgbackups 错误:备份 url 无效?

    我正在尝试按照迁移到 Cedar 的说明进行操作 除了我进行了重大重写 因此这不是前一个应用程序的分支 而是一个单独的分支 并停留在数据库迁移步骤 我安装了 pgbackup 和 heroku postgresql 插件 但得到了这个结果
  • Django 开发服务器不处理ajax 请求

    我正在发出一个简单的 ajax 请求 但由于某种原因 request is ajax 返回 false 我正在使用 jquery 和 Django 开发服务器 save click function ajax type POST url o
  • Django 和 PostgreSQL - 值对于类型字符变化来说太长(512)

    我正在从测试 SQLite 数据库迁移到 PostgreSQL 数据库 我有一个插入到数据库中的示例对象 它在 SQLite 上工作 但在 PostgreSQL 中给我一个错误 代码片段是 car CarItem objects creat
  • Django 模板 if 语句中的分组条件

    我想否定 django 模板中 if 语句中分隔的一组条件或的结果 这是我的代码 if not owner home number or owner work number or owner mobile number No contact
  • Django 模型继承、重写字段

    我正在阅读 Python Web Development with Django 一书 我在书中找到了这个例子 class Book models Model title models CharField max length 100 ge
  • 如何在序列化器创建方法中获取 URL Id?

    我有以下网址 url r member P
  • 使用 datetime 与 Django 中的日期进行比较

    我在 Django 中有一个关于如何比较日期来解决一些解决方案的问题 例如 我的 models py 中有一个日期字段 如下所示 class Invoice models Model payment date models DateTime
  • 使用 Python 在 Django 中将 Unix 时间戳转换为人类格式

    我想将字符串中的 unix 时间戳 例如 1277722499 82 转换为更人性化的格式 hh mm ss 或类似格式 有没有一种简单的方法可以在 python 中为 django 应用程序执行此操作 这是在模板之外 在我想要执行此操作的
  • Heroku 上的 dyno 是否同时重启?

    我在 Heroku 网站上看到 dynos 大约每 24 小时重新启动一次 例如 如果您有两个网络测功机 它们是否有可能同时重新启动 谢谢你的时间 根据赫罗库 骑行每 24 小时进行一次 加上最多 216 个随机 分钟 以防止应用程序的每个
  • heroku 上的 bitbucket 私有存储库

    我有一个需要 gem 的 Rails 应用程序 我将这个 gem 托管在私有存储库的 bitbucket 上 在我的 Gemfile 中 我添加了 gem 如下所示 gem my gem git gt gi email protected
  • 搜索多个字段

    我想我没有正确理解 django haystack 我有一个包含多个字段的数据模型 我希望搜索其中两个字段 class UserProfile models Model user models ForeignKey User unique
  • Django 的 request.FILES 出现 UnicodeDecodeError

    我在视图调用中有以下代码 def view request body u for filename f in request FILES items body body Filename filename n f read n 在某些情况下
  • 通过纱线安装 bootstrap 的 Rails 找不到字体

    我有一个带 Bootstrap 的 Rails 5 应用程序 我用纱线安装了它 我做了以下事情 yarn add bootstrap bootstrap 3 3 7 version 3 3 7 resolved https registry
  • 当数据库不是 Django 模型时,是否可以使用数据库中的表?

    是否可以从应用程序数据库中的表获取查询集 该表不是应用程序中的模型 如果我有一个不是名为 cartable 的模型的表 从概念上讲 我想这样做 myqueryset cartable objects all 有没有相对简单的方法来做到这一点
  • Django Admin 中的反向内联

    我有以下 2 个型号 现在我需要将模型 A 内联到模型 B 的页面上 模型 py class A models Model name models CharField max length 50 class B models Model n
  • Django 与谷歌图表

    我试图让谷歌图表显示在我的页面上 但我不知道如何将值从 django 视图传递到 javascript 以便我可以绘制图表 姜戈代码 array Year Sales Expenses 2004 1000 400 2005 1170 460

随机推荐

  • 全文索引和复合索引以及它们如何影响查询

    只是说我有一个查询如下 SELECT name category address city state FROM table WHERE MATCH name subcategory category tag1 AGAINST educat
  • 与断言相比,scala 中的假设有何含义?

    Scala 似乎定义了 3 种断言 assert require and assume 据我所知 差异 与通用断言相比 require它是专门用于检查输入 参数 传入消息等 的 是什么意思assume then 如果你看一下代码Predef
  • 关闭 WPF 中 Frame 内的页面

    我有一个窗口和一个框架 在该框架中 我打开了许多页面 我想通过单击 关闭 按钮关闭这些页面 问题是页面看不到我的框架我尝试在页面方法中的事件中编写关闭按钮 在主窗口中执行另一个事件 因为在主窗口上很容易看到框架 但它不起作用 这是我在页面中
  • Bootstrap 输入组插件未内联

    这是我的代码 http www bootply com iR1SvOyEGH http www bootply com iR1SvOyEGH
  • SwiftUI 中的圆角边框

    如何在 SwiftUI 中圆化边框 我认为这会起作用 cornerRadius 10 border Color white 但它不起作用 这是我现在的解决方法 overlay RoundedRectangle cornerRadius 10
  • 限制特定组的 Firebase 数据库和存储写入访问权限

    我有一个带有内容管理端的 React Redux Firebase 应用程序 所有这些页面都以 admin 我需要将 Firebase 数据库和 Firebase 存储写入权限限制为这些用户的一小部分 并在未经身份验证 或未经管理员角色身份
  • 从.c调用MASM32过程

    我现在正在使用 Visual Studio 我需要构建一个 win32 应用程序并需要从 C 函数调用过程 但我总是收到构建错误 错误 3 错误 LNK1120 1 个未解析的外部 我已经通过一个过程将所有内容简化为一个简单的主函数和简单的
  • CodeIgniter - 删除文件,路径问题

    我的根目录中有 3 个文件夹 application system 和 uploads 在 application controllers mycontroller php 我有这行代码 delete files uploads file
  • 在 PowerShell 中显示 Unicode

    我想要实现的目标应该相当简单 尽管 PowerShell 试图让它变得困难 我想显示文件的完整路径 其中一些文件的名称中包含阿拉伯语 中文 日语和俄语字符 我总是得到一些无法解读的输出 如下所示 控制台中看到的输出正被另一个脚本使用 输出包
  • 如何在 Chrome DevTools 中查看元素上触发的事件?

    我在库的页面上有一个可自定义的表单元素 我想看看当我与它交互时会触发哪些 javascript 事件 因为我试图找出要使用的事件处理程序 如何使用 Chrome Web Developer 来做到这一点 您可以使用监控事件 http www
  • 如何告诉 JavaFX WebView 忽略“use strict”指令?

    我正在尝试使用以下代码将 mozilla 查看器集成到 JavaFx WebView 中 import javafx application Application import javafx scene Scene import java
  • 如何将这个数学方程写成c++

    我不知道如何编写C 中给出的公式 也不能使用捷径 我必须编写长版本的代码 这是我到目前为止所拥有的 4x 3 8x 2 9x 18 y 7 x 3 3x 2 18 表示绝对值 它需要采用这样的格式 这是我书中的一个示例 double y 4
  • Android的EditText在显示虚拟键盘并且涉及SurfaceView时隐藏

    我有一个简单的用户界面 EditText 应位于 SurfaceView 下方 我使用RelativeLayout 来排列这两个视图 现在 当我点击 EditText 打开虚拟键盘时 SurfaceView 会向上滑动 但 EditText
  • 同时维护多个emacs配置

    我想在同一台电脑上的同一用户帐户上同时维护多个 emacs 配置 例如 emacs prelude emacs starter kit 和我自己的自定义 emacs 配置 为此 我设置了 emacs1 d emacs2 d emacs3 d
  • Qt Signal/Slots 发送完整结构

    我正在尝试通过两个线程之间的信号 槽发送一个结构 我的信号 槽已正确连接 并且我已经能够发送包含部分数据的 QString 但现在我需要发送整个数据 而结构似乎是最明智的 但是 当我尝试时 信号未发送 接收 问题似乎仅与发送 接收结构 前后
  • 在android中通过cardview创建视图

    I want to create this layout 这是一个卡片视图 灰色视图 和图像视图 蓝色视图 我使用这个代码
  • 使用 Facebook 登录 注销后出现问题

    我正在使用 facebook sdk 和 facebook connect 使用 asp net 和 c 将 Facebook 集成到我的网站中 用户可以使用该代码成功登录 我面临的问题是 每当用户通过 fb 登录时 如果用户从 faceb
  • 是否可以更改AVPlayer的背景颜色?如果是,怎么办?

    我希望将默认背景颜色从黑色更改为我想要的颜色 可能是与视频形成对比的颜色 大多数时候是黑色 我已将这段代码添加到我的viewWillAppear 功能 let playerLayer AVPlayerLayer player player
  • 向上或向下滚动时的 JavaScript 事件

    是否可以编写 JavaScript 来在手动向上或向下滚动 DIV 层的滚动条时执行操作 如果是这样 请给我一个提示 以实现一个简单的警报框 表示您向上滚动并向下滚动 您可以简单地使用onscrolljava脚本的事件 OnScroll 事
  • 在heroku上部署django网站出错

    我正在heroku 中部署我的django 网站 并在django 的setting py 文件中使用DATABASE 我正在遵循以下所有步骤赫罗库帮助 https devcenter heroku com articles getting