首页 > 解决方案 > 在 Ubuntu 中使用 gunicorn 创建的自定义服务抛出错误,但仅 Gunicorn 功能就可以正常工作

问题描述

我创建的服务有问题。

gunicorn –bind 0.0.0.0:5000 wsgi:application

这很好用,完全没有问题

但是有了服务……我得到了错误

[Unit]
Description=Gunicorn instance to serve lolf
Wants = network-online.target
After = network.target network-online.target

[Service]
User=lolfbwu1
Group=www-data
WorkingDirectory=/home/lolfbw/lolf
Environment=“PATH=/home/lolfbw/lolf/lolfenv/bin”
ExecStart=/home/lolfbw/lolf/lolfenv/bin/gunicorn –workers 3 –bind unix:lolf.sock -m 007 wsgi

[Install]
WantedBy=multi-user.target

我得到的错误:

gunicorn[27945]: finalstart = datetime.fromisoformat(formatedstart).timestamp()

gunicorn [27945]:ValueError:无效的isoformat字符串:'00:00:00'</p>

但是当我运行它时我没有得到这个错误

gunicorn –bind 0.0.0.0:5000 wsgi:application

任何想法为什么是……?

我正在使用 Python3.9

标签: pythongunicornsystemd

解决方案


推荐阅读