大佬教程收集整理的这篇文章主要介绍了Sock 文件没有在我的 django 项目中使用 gunicorn 创建,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在尝试使用 gunicorn 正确部署我的 django 项目。但我无法做到这一点。我一次又一次地做下面的过程...
/etc/systemd/system/gunicorn.service
[Unit]
Description=gunicorn daemon
After=network.target
[service]
User=ubuntu
Group=www-data
WorkingDirectory=/home/ubuntu/dotescrow_main
ExecStart=/home/ubuntu/dotescrow_main/dotescrow_env/bin/gunicorn --@R_403_3360@file - --workers 3 --bind unix:/home/ubuntu/dotescro>
[Install]
WantedBy=multi-user.target
然后我按顺序运行以下命令。
sudo systemctl start gunicorn
sudo systemctl enable gunicorn
sudo systemctl status gunicorn
它返回:
● gunicorn.service - gunicorn daemon
Loaded: loaded (/etc/systemd/system/gunicorn.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2021-03-13 22:21:36 UTc; 15min ago
Main PID: 563946 (gunicorn)
Tasks: 4 (limit: 2372)
Memory: 100.1M
CGroup: /system.slice/gunicorn.service
├─563946 /home/ubuntu/dotescrow_main/dotescrow_env/bin/python /home/ubuntu/dotescrow_main/dotescrow_env/bin/gunicorn>
之后,当我像在 myproject 中一样检查袜子时
ls /home/ubuntu/dotescrow_main
那里没有任何袜子文件。
之后,当我运行 sudo journalctl -u gunicorn
时,我得到以下输出:
Jan 26 18:30:55 ip-172-31-11-244 systemd[1]: Started gunicorn daemon.
Jan 26 18:30:55 ip-172-31-11-244 systemd[92397]: gunicorn.service: Failed to determine user credentials: No such process
Jan 26 18:30:55 ip-172-31-11-244 systemd[92397]: gunicorn.service: Failed at step USER spawning /home/ubuntu/dotescrow/myprojecte>
Jan 26 18:30:55 ip-172-31-11-244 systemd[1]: gunicorn.service: Main process exited,code=exited,status=217/USER
Jan 26 18:30:55 ip-172-31-11-244 systemd[1]: gunicorn.service: Failed with result 'exit-code'.
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)
以上是大佬教程为你收集整理的Sock 文件没有在我的 django 项目中使用 gunicorn 创建全部内容,希望文章能够帮你解决Sock 文件没有在我的 django 项目中使用 gunicorn 创建所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。