无法启动uWSGI Emperor

时间:2019-08-04 19:06:54

标签: django uwsgi systemd

遵循互联网上最好的教程,但仍然无法使emperor.uwsgi.service正常工作。

我的配置文件如下:

/etc/uwsgi/emperor.ini

emperor = /etc/uwsgi/vassals
uid = user1
gid = www-data
limit-as = 1024
logto = /var/log/uwsgi.log

/etc/uwsgi/sites/project.ini

[uwsgi]
project = project
base = /home/user1/project
uid = user1
gid = www-data

plugins = python3
chdir = %(base)
home = %(base)/venv
#module = project.wsgi:application
wsgi-file = /home/user1/project/project/wsgi.py

workers = 4
master = true
processes = 10

socket = /home/user1/%(project)/%(project).sock
chown-socket = %(uid):www-data
chmod-socket = 664
vacuum = true
buffer-size = 65535

/ etc / uwsgi / vassals /(ln -s)

/etc/systemd/system/emperor.uwsgi.service

[Unit]
Description=uWSGI Emperor
After=syslog.target

[Service]
ExecStartPre=/bin/bash -c 'mkdir -p /run/uwsgi; chown user1:www-data /run/uwsgi'
ExecStart=/usr/local/bin/uwsgi --ini /etc/uwsgi/emperor.ini
# Requires systemd version 211 or newer
RuntimeDirectory=uwsgi
Restart=always
KillSignal=SIGQUIT
Type=notify
StandardError=syslog
NotifyAccess=all

[Install]
WantedBy=multi-user.target

所有文件都在同一个uid gid下

user1:www-data

我尝试了很多事情,发现了uwsgi的其他目录,在#/ etc / init.d / uwsgi中更改了用户,并且我在同一位置找到了皇帝文件,我不知道该怎么办否则我应该修改。

我在运行时收到的错误消息

systemctl status emperor.uwsgi.service
Process: 788 ExecStart=/usr/local/bin/uwsgi --ini /etc/uwsgi/emperor.ini (code=exited, status=1/FAILURE)

Aug 04 18:03:26 mymachine systemd[1]: emperor.uwsgi.service: Service RestartSec=100ms expired, scheduling restart.
Aug 04 18:03:26 mymachine systemd[1]: emperor.uwsgi.service: Scheduled restart job, restart counter is at 5.
Aug 04 18:03:26 mymachine systemd[1]: Stopped uWSGI Emperor.
Aug 04 18:03:26 mymachine systemd[1]: emperor.uwsgi.service: Start request repeated too quickly.
Aug 04 18:03:26 mymachine systemd[1]: emperor.uwsgi.service: Failed with result 'exit-code'.
Aug 04 18:03:26 mymachine systemd[1]: Failed to start uWSGI Emperor.

0 个答案:

没有答案