certsocietegenerale/FIR

fir doesn't start using systemd

Closed this issue · 3 comments

So I used the following fir_uwsgi.service from the documentation. This is Ubuntu 16. The git head is /home/cirt/FIR. I have a virtualenv at /home/cirt/FIR/env-FIR
[Unit]
Description=uWSGI instance for FIR
After=syslog.target

[Service]
User=nginx
Group=nginx
Environment:PYTHONPATH=/home/cirt/FIR/env-FIR/lib/python2.7:/usr/local/lib/python2.7:/usr/lib/python2.7
WorkingDirectory=/home/cirt/FIR/fir
ExecStart=/usr/bin/uwsgi --socket /home/cirt/FIR/fir/run/fir.sock --chdir /home/cirt/FIR/fir/ --module fir.wsgi
Restart=always
KillSignal=SIGQUIT
Type=Debug
StandardError=syslog
NotifyAccess=All

[Install]
WantedBy=multi-user.target

And I get the error "Failed to start uWSGI instance for FIR." Syslog states "fir_uwsgi.service: Failed at step USER spawning /usr/local/bin/uwsgi: No such process."
"Main process exited, code=exited, status=217/USER"

Any suggestions?

Oops. So I got the first part working by creating the user. But now it complains that there is no module named fir.wsgi. I suspect that it is a path issue, but the use of "/path/to/your/FIR/install" in the instructions is kinda vague since it is not clear whether this is the head of the git pull or the fir subdirectory.

Got a little farther. "ImportError: No module named django.core.wsgi". I must not be setting up the virtualenv right in systemd.

Hello,
In order to use a virtualenv, you need to add -H /path/to/your/virtualenv to the uwsgi command.

This issue is 5 years old, you likely already resolved the problem. I will close it, feel free to reopen it if needed.