Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

203
Views
UWSGI server active failed when enabling uwsgi server in centor

I am following a tutorial to deploy a flask application using uwsgi server.

Flask app - flaskdemo.py-

from flask import Flask
app = Flask(__name__)

@app.route("/")
def root():
    return "You have found somewhere on your road to nowhere.<br>Congrats"

if __name__ == "__main__":
    app.run(host='0.0.0.0')

uwsgi.py

from flaskdemo import app as application

if __name__ == "__main__":
    application.run()

flaskdemo.ini

[uwsgi]
module = wsgi

master = true
processes = 5

socket = 127.0.0.1:8000
chmod-socket = 660
vacuum = true

die-on-term = true

Everything was fine till this point and the app was running fine.

flaskdemo.service

[Unit]
Description=uWSGI server for flaskdemo
After=network.target

[Service]
User=flaskdemo
Group=apache
WorkingDirectory=/home/flaskdemo/flaskdemo
Environment="PATH=/home/flaskdemo/flaskdemo/env/bin"
ExecStart=/home/flaskdemo/flaskdemo/env/bin/uwsgi --ini flaskdemo.ini

[Install]
WantedBy=multi-user.target

After creating the service and starting the service, status of the service is as of follows:

comission_project.service - uWSGI instance to serve myproject
   Loaded: loaded (/etc/systemd/system/comission_project.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Sun 2021-08-08 19:25:45 IST; 14s ago
 Main PID: 9263 (code=exited, status=217/USER)

Aug 08 19:25:45 localhost.localdomain systemd[1]: Started uWSGI instance to serve myproject.
Aug 08 19:25:45 localhost.localdomain systemd[1]: comission_project.service: Main process exited, code=exited, status=217/USER
Aug 08 19:25:45 localhost.localdomain systemd[1]: comission_project.service: Failed with result 'exit-code'.

And the app also stopped working

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!