3

I've been working on systemctl for a while and it's just not working.

I have tested with gunicorn and it works perfectly, but when I'm doing this

systemctl daemon-reload
systemctl enable flaskapp
systemctl start flaskapp

However, I've been getting issues like this

Dec  2 16:17:15 localhost systemd[1]: Started flaskapp.
Dec  2 16:17:15 localhost systemd[2130]: flaskapp.service: Failed at step EXEC spawning /home/flaskappuser/flaskapp/flaskvenv/bin/gunicorn: Permission denied
Dec  2 16:17:15 localhost systemd[1]: flaskapp.service: Main process exited, code=exited, status=203/EXEC
Dec  2 16:17:15 localhost systemd[1]: flaskapp.service: Unit entered failed state.
Dec  2 16:17:15 localhost systemd[1]: flaskapp.service: Failed with result 'exit-code'.
Dec  2 16:17:15 localhost systemd[1]: flaskapp.service: Service hold-off time over, scheduling restart.
Dec  2 16:17:15 localhost systemd[1]: Stopped flaskapp.
Dec  2 16:17:15 localhost systemd[1]: flaskapp.service: Start request repeated too quickly.
Dec  2 16:17:15 localhost systemd[1]: Failed to start flaskapp.
Dec  2 16:17:21 localhost systemd[1]: supervisor.service: Service hold-off time over, scheduling restart.
Dec  2 16:17:21 localhost systemd[1]: Stopped Supervisor process control system for UNIX.
Dec  2 16:17:21 localhost systemd[1]: Started Supervisor process control system for UNIX.

I tried with sudo and it doesn't work either. I have searched everything online but no result. Can anyone help me with this?

aydinugur
  • 1,208
  • 2
  • 14
  • 21
JoshJoshJosh
  • 897
  • 2
  • 11
  • 20
  • Who owns the repo `/home/flaskappuser/flaskapp/flaskvenv/bin/gunicorn`? Show us the `ls- al /home/flaskappuser/flaskapp/flaskvenv/bin/gunicorn` output. – Amit Tripathi Dec 02 '17 at 10:07
  • I got total 8 drwxr-xr-x 2 flaskappuser flaskappuser 4096 Nov 29 16:19 . drwxr-xr-x 3 flaskappuser flaskappuser 4096 Nov 29 16:19 .. – JoshJoshJosh Dec 02 '17 at 13:39
  • Does flaskapp user exists? If yes `sudo chow flaskapp /home/flaskappuser/flaskapp/flaskvenv/bin/gunicorn` – Amit Tripathi Dec 02 '17 at 14:40

0 Answers0