【问题标题】:why supervisor gunicorn shows fatal error command not found?为什么主管 gunicorn 显示未找到致命错误命令?
【发布时间】:2020-05-24 19:16:17
【问题描述】:

当我检查状态时(sudo supervisorctl status)它是这样的

guni:gunicorn                    FATAL     can't find command 
'/home/ubuntu/myvenv/js/bin/gunicorn'

我的gunicorn conf是这样的

[program:gunicorn]
directory=/home/ubuntu/js/main_jntu
command=/home/ubuntu/myvenv/js/bin/gunicorn --workers 3 --bind unix:/home/ubuntu/js/app.sock 
main_jntu.wsgi:application
autostart=true
autorestart=true
stderr_logfile=/var/log/gunicorn/gunicorn.err.log
stdout_logfile=/var/log/gunicorn/gunicorn.out.log
[group:guni]
programs:gunicorn

之后,当我检查状态时,它会显示这样的错误

guni:gunicorn                    FATAL     can't find command 
'/home/ubuntu/myvenv/js/bin/gunicorn'

【问题讨论】:

  • 现在我得到 [致命退出太快(进程日志可能有详细信息)]

标签: django amazon-web-services ubuntu gunicorn supervisord


【解决方案1】:

安装 gunicorn 后使用以下命令

whereis gunicorn

它将给出 gunicorn 所在的确切路径,然后在您的 gunicorn conf 文件中使用该路径。 编码愉快!

【讨论】:

  • 现在正在显示。 guni:gunicorn FATAL 退出太快(进程日志可能有详细信息)
【解决方案2】:

我认为问题出在配置文件的第三行。该错误消息表明gunicorn 可执行文件在/home/ubuntu/myvenv/js/bin 目录中不可用。如果您使用ls /home/ubuntu/myvenv/js/bin/gunicorn,您可能会收到一条错误消息。

我认为您需要检查您是否在虚拟环境中正确安装了gunicorn,例如使用pip install gunicorn。看看this article;我认为这会有所帮助。

【讨论】:

    猜你喜欢
    • 2017-08-21
    • 1970-01-01
    • 1970-01-01
    • 2019-03-23
    • 1970-01-01
    • 2020-03-21
    • 2013-09-14
    • 1970-01-01
    • 2011-03-15
    相关资源
    最近更新 更多