0

I am trying to create a system service for my flask application. This is my service application

comission_project.service

[Unit]
Description=uWSGI instance to server comission project
Requires = network.target
After=network.target

[Service]
ExecStart=/home/schirag/comission_project/venv/bin/python3" "/home/schirag/Desktop/comission_project/Hello.py
WorkingDirectory=/home/schirag/Desktop/comission_project
User=schirag
Environment="PATH=/home/schirag/Desktop/comission_project/venv"


[Install]
WantedBy=multi-user.target

After starting and enabling the service, I am getting the following status:

comission_project.service - uWSGI instance to server comission project
   Loaded: loaded (/etc/systemd/system/comission_project.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Fri 2021-08-13 12:50:18 IST; 30min ago
 Main PID: 22192 (code=exited, status=203/EXEC)

Aug 13 12:50:18 localhost.localdomain systemd[1]: Started uWSGI instance to server comission project.
Aug 13 12:50:18 localhost.localdomain systemd[1]: comission_project.service: Main process exited, code=exited, status=203/EXEC
Aug 13 12:50:18 localhost.localdomain systemd[1]: comission_project.service: Failed with result 'exit-code

This is the status when I entered the command - journalctl -u comission_project

Aug 13 12:50:18 localhost.localdomain systemd[1]: Started uWSGI instance to server comission project.
Aug 13 12:50:18 localhost.localdomain systemd[1]: comission_project.service: Main process exited, code=exited, status=203/EXEC
Aug 13 12:50:18 localhost.localdomain systemd[1]: comission_project.service: Failed with result 'exit-code'.

What has to be done to start the service

3
  • Does this answer your question? systemd "status=203/EXEC" error when creating new service Commented Aug 13, 2021 at 9:27
  • I have edited my ExecStart and now my status:203 is gone, and the code is getting executed. But I am using a virtual environment and have provided Environment with the path /home/schirag/Deskop/comission_project/venv/bin, but it is giving a module error in the status of the service Commented Aug 13, 2021 at 11:21
  • Installing the packages globally solved the error. Need to figure out how to do it using environment. Thank you Commented Aug 13, 2021 at 11:36

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.