# 项目地址
/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/ ,如需转载,请注明出处,否则将追究法律责任。