首先,我不确定这是在这里还是在ask ubuntu上更好(ubuntu没有'gunicorn‘标签,所以我想我来对地方了)。如果它在这里不合适,只需在评论中删除它,我将关闭它。
我正在遵循有关部署的digitalocean教程(可用于设置gunicorn。我无计可施,试图让这个独角兽工作,所以我来到这里。引号中的任何内容都是文章中当前部分的名称。在失败之前,我转到了“检查Gunicorn套接字文件”和“检查/run目录中是否存在gunicorn.sock文件”。检查套接字文件:
sudo systemctl status gunicorn.socket returns
Fa
我遵循一个DigitalOcean指南(()来建立我的Django站点。它通常很好,但最近我经常碰到这样的情况。
root@localhost:/usr/bin# sudo systemctl status gunicorn
Jun 13 21:27:43 localhost systemd[1]: Started gunicorn daemon.
Jun 13 21:27:43 localhost gunicorn[20611]: Traceback (most recent call last):
Jun 13 21:27:43 localhost gunicorn[20611]: F
当我跑的时候
sudo journalctl -u gunicorn
我得到:
Oct 14 12:49:22 my-server-thing systemd[1]: gunicorn.service: Failed to load environment files: Is a directory
Oct 14 12:49:22 my-server-thing systemd[1]: gunicorn.service: Failed to run 'start' task: Is a directory
Oct 14 12:49:22 my-server-thing syst
当我尝试这样做的时候:
sudo systemctl status gunicorn
它的回答如下:
Failed to dump process list, ignoring: No such file or directory
● gunicorn.socket - gunicorn socket
Loaded: loaded (/etc/systemd/system/gunicorn.socket; enabled; vendor preset: enabled)
Active: active (listening) since Wed 2019-09-25 04:23:44
我有一个名为systemd.socket的gunicorn.socket,在更新了远程服务器上的一些代码后,我想重新启动它。
我遵循了允许非根用户重新启动服务。和systemctl中详细介绍的步骤,不断询问我的用户密码。下面是我尝试使用用户systemctl restart gunicorn.socket运行john时所做的工作:
# added an appadmin group to allow the restart command to john
addgroup appadmin
usermod -a -G appadmin john
visudo
在sudoers中:
Cmnd_A
最近,我在digitalocean上主持了一个Django网站。然后我在本地编辑了网站的内容,并将其推送到GitHub上,然后将其拉到服务器上,并重新启动了nginx和gunicorn:
sudo systemctl restart nginx
sudo systemctl restart gunicorn
然后更改没有反映回现场网站,只是为了检查我是否正确设置gnuicorn和nginx,我运行sudo systemctl status gunicorn.socket我得到Failed to dump process list, ignoring: No such file or direc
我正在和Nginx在数字海洋上建立Django项目。我在此命令的日志this -u gunicorn.socket上遇到错误。得到了这个错误 **
root@vavaphysio:/var/www/html/sandbox# journalctl -u gunicorn.socket
-- Logs begin at Mon 2020-01-06 03:17:11 UTC, end at Sat 2020-01-18 06:28:38 UTC. --
Jan 14 12:08:43 vavaphysio systemd[1]: /etc/systemd/system