Я пытаюсь смонтировать приложение фляги, используя сервер uwsgi и nginx. Я получаю ошибку «Отказано в доступе» каждый раз, когда запускаю свой сервис.
/ home / zerotouch / zerotouch / zerotouch.ini
[uwsgi]
module = wsgi
master = true
processes = 5
uid=nginx
gid=nginx
socket = /run/uwsgi/zerotouch.sock
chown-socket = zerotouch:nginx
chmod-socket = 660
vacuum = true
die-on-term = true
/ etc / systemd / system / zerotouch.service
[Unit]
Description=uWSGI instance to serve zerotouch
After=network.target
[Service]
User=zerotouch
Group=nginx
WorkingDirectory=/home/zerotouch/zerotouch
Environment="PATH=/home/zerotouch/zerotouch/env/bin"
ExecStartPre=-/usr/bin/bash -c 'mkdir -p /run/uwsgi; chown zerotouch:nginx /run/uwsgi; chown zerotouch:nginx /home/zerotouch/zerotouch/env/bin/activate;'
ExecStart=/usr/bin/bash -c 'source /home/zerotouch/zerotouch/env/bin/activate;/home/zerotouch/zerotouch/env/bin/uwsgi --ini /home/zerotouch/zerotouch/zerotouch.ini'
[Install]
WantedBy=multi-user.target
Ошибка
systemctl status zerotouch
● zerotouch.service - uWSGI instance to serve zerotouch
Loaded: loaded (/etc/systemd/system/zerotouch.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2019-10-10 16:34:35 CEST; 8s ago
Process: 28843 ExecStart=/usr/bin/bash -c source /home/zerotouch/zerotouch/env/bin/activate;/home/zerotouch/zerotouch/env/bin/uwsgi --ini /home/zerotouch/zerotouch/zerotouch.ini (code=exited, status=1/FAILURE)
Process: 28839 ExecStartPre=/usr/bin/bash -c mkdir -p /run/uwsgi; chown zerotouch:nginx /run/uwsgi; chown zerotouch:nginx /home/zerotouch/zerotouch/env/bin/activate; (code=exited, status=127)
Main PID: 28843 (code=exited, status=1/FAILURE)
Oct 10 16:34:35 aj-poc-1 bash[28843]: detected binary path: /home/zerotouch/zerotouch/env/bin/uwsgi
Oct 10 16:34:35 aj-poc-1 bash[28843]: your processes number limit is 7259
Oct 10 16:34:35 aj-poc-1 bash[28843]: your memory page size is 4096 bytes
Oct 10 16:34:35 aj-poc-1 bash[28843]: detected max file descriptor number: 1024
Oct 10 16:34:35 aj-poc-1 bash[28843]: lock engine: pthread robust mutexes
Oct 10 16:34:35 aj-poc-1 bash[28843]: thunder lock: disabled (you can enable it with --thunder-lock)
Oct 10 16:34:35 faj-poc-1 bash[28843]: bind(): Permission denied [core/socket.c line 230]
Oct 10 16:34:35 aj-poc-1 systemd[1]: zerotouch.service: main process exited, code=exited, status=1/FAILURE
Oct 10 16:34:35 aj-poc-1 systemd[1]: Unit zerotouch.service entered failed state.
Oct 10 16:34:35 aj-poc-1 systemd[1]: zerotouch.service failed.