简单的uWSGI不会以systemd

时间:2018-08-31 10:47:54

标签: debian uwsgi systemd

我正在尝试为桌面上的开发设置uWSGI,但无法使其运行。我使用了https://uwsgi-docs.readthedocs.io/en/latest/WSGIquickstart.html#deploying-django中的示例,但没有运气。 uwsgi进程从命令行启动,但是systemd无法启动它。

/etc/uwsgi/apps-enabled/example.ini

[uwsgi]
socket = 127.0.0.1:3031
chdir = /var/www
wsgi-file = /var/www/example.wsgi
processes = 4
threads = 2
stats = 127.0.0.1:9191
uid = www-data
gid = www-data

/var/www/example.wsgi

def application(env, start_response):
    start_response('200 OK', [('Content-Type','text/html')])
    return [b"Hello World"]

sudo uwsgi /etc/uwsgi/apps-enabled/example.ini启动服务器,但是sudo service uwsgi start失败。 journalctl仅报告

Aug 31 11:22:36 queeg-500 uwsgi[18918]: Starting app server(s): uwsgi -> ! failed!
Aug 31 11:22:36 queeg-500 systemd[1]: uwsgi.service: Control process exited, code=exited status=1
Aug 31 11:22:36 queeg-500 systemd[1]: uwsgi.service: Failed with result 'exit-code'.
Aug 31 11:22:36 queeg-500 systemd[1]: Failed to start LSB: Start/stop uWSGI server instance(s).

我找不到任何有用的日志。我正在进行Debian测试。

有什么想法吗?

0 个答案:

没有答案