调试枪支的支撑杆是什么?
我正在尝试在Heroku上部署我的第一个Django应用程序。 Gunicorn给了我这个错误:Gunicorn.Errors.haltserver:< haltserver“工人未能启动。” 3>
在此答案中 https://stackoverflow.com/a/555623889 命令Gunicorn App -preload -b 0.0.0.0.0:5000
被称为详细的错误消息,但是由于其注释声明,尚不清楚用什么替换的单词。例如,我在某个地方看到了类似的东西,称为<我的应用程序的名称> .wsgi
。使我的Django应用程序中的更糟糕的名称与Heroku上的应用不同。
同样,如果我从终端(在虚拟env中)中称其为海峡,或者我应该使用某种枪支CLI,这对我来说还不清楚。
那么,弄清楚什么是失败的枪手的实际propper方法是什么?
I am trying to deploy my very first Django applicatin on heroku. Gunicorn gives me this error: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
In this answer https://stackoverflow.com/a/55623889 command gunicorn app:application --preload -b 0.0.0.0:5000
is said to give detailed error message, but as its comments state it is not clear what words to replace with what. For instance somewhere I saw something similar called with <name of my app>.wsgi
. To make matter worse name of my Django app in local is different from the one on Heroku.
Also it is not clear to me should this be called strait from terminal (within virtual env) or should I be using some sort of gunicorn CLI.
So what is the actual propper way to figure out what is failing gunicorn?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
过去,我遇到了类似的问题。我希望这可能会有所帮助:
确保
Gunicorn
通过在终端中运行pip Freeze
在您的激活虚拟环境项目中安装了,以验证其安装。如果未列出,则在激活的虚拟环境中,运行pip install gunicorn
,否则,如果您使用的是pipenv
,请运行pipenv install install gunicorn
。不要忘记通过运行pip freeze&gt;需求.txt
在
procfile
中,project> project_directory
键入语法:nb:应该有一个空间;
- log-file
和-
。Web:
和Gunicorn
代码的一部分。最后,添加,提交并将更改推向Heroku服务器。
I've faced similar issues in the past. I hope this might help:
Make sure
gunicorn
is installed in your activated virtual environment project by runningpip freeze
in the terminal to verify it's installation. If it is not listed, in the activated virtual environment, runpip install gunicorn
or else if you are usingpipenv
, runpipenv install gunicorn
. Don't forget to update therequirements.txt
file by runningpip freeze > requirements.txt
In the
Procfile
which is within theproject_directory
type the syntax:N.B: There should be a space between;
--log-file
and the-
next to it.web:
and thegunicorn
part of the code.Finally add, commit and push the changes to the heroku server.