ITPub博客

首页 > 应用开发 > > systemctl start gunicorn服务启动失败

systemctl start gunicorn服务启动失败

作者:Boriszhang 时间:2019-08-28 13:47:20 0 删除 编辑
# 项目地址
/home/crime/sites/demo.eosones.com/Myblog
# 虚拟环境
/home/crime/sites/demo.eosones.com/Myblog_env

配置代码

# vim /etc/systemd/system/gunicorn.service

[Unit]
Description=gunicorn daemon
After=network.target

[Service]
User=root
Group=www-data
WorkingDirectory=/home/crime/sites/demo.eosones.com/Myblog
ExecStart=/home/crime/sites/demo.eosones.com/Myblog_env/bin/gunicorn --workers 3 --bind 127.0.0.1:8080 Myblog.wsgi:application

[Install]
WantedBy=multi-user.target

报错信息

Jun 20 17:49:09 VM_0_5_centos systemd[1]: Started gunicorn daemon.
Jun 20 17:49:09 VM_0_5_centos systemd[1]: gunicorn.service: main process exited, code=exited, status=216/GROUP
Jun 20 17:49:09 VM_0_5_centos systemd[1]: Unit gunicorn.service entered failed state.
Jun 20 17:49:09 VM_0_5_centos systemd[1]: gunicorn.service failed.

小白刚接触Linux,求大佬帮忙到底是哪里出错了,直接在虚拟环境中

gunicorn --workers 3 --bind 127.0.0.1:8080 Myblog.wsgi:application

可以成功启动,添加到systemd就失败。

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/2435/viewspace-3159842/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2019-08-16

  • 博文量
    110
  • 访问量
    1068