My systemd uwsgi.service is not running - why?

Hi,

I am trying to set up uwsgi.service to run on systemd for Django 1.10 on Linode with Fedora 24.

/etc/systemd/system/uwsgi.service

[Unit]
Description=uWSGI Emperor
After=syslog.target

[Service]
ExecStart=/home/ofey/djangoenv/bin/uwsgi --ini /etc/uwsgi/emperor.ini
Restart=always
KillSignal=SIGQUIT
Type=notify
StandardError=syslog
NotifyAccess=all

[Install]
WantedBy=multi-user.target

This should then call,

/etc/uwsgi/emporer.ini

[uwsgi]
emperor = /etc/uwsgi/vassals
uid = www-data
gid = www-data
limit-as = 1024
logto = /tmp/uwsgi.log

I then use a symbolic link,

$ sudo ln -s /home/ofey/djangoForum/django.ini /etc/uwsgi/vassals/

to

/home/ofey/djangoForum/django.ini

[uwsgi]
project = djangoForum
base = /home/ofey

chdir = %(base)/%(project)
home = %(base)/djangoenv
module = crudProject.wsgi:application

master = true
processes = 2

socket = 127.0.0.1:3031
chmod-socket = 664
vacuum = true

The Nginx configuration file,

/etc/nginx/nginx.conf

# nginx.conf

user ofey;

worker_processes 3;

events {
     worker_connections 1024;
}

http{

 upstream django {
    # connect to this socket
    # server unix:///tmp/uwsgi.sock;    # for a file socket
    server 127.0.0.1:3031;      # for a web port socket
    }

 server {
    # the port your site will be served on
    listen      80;
    # the domain name it will serve for
    server_name qqiresources.com;   # substitute your machine's IP address or FQDN
    charset     utf-8;

    #Max upload size
    client_max_body_size 75M;   # adjust to taste

    # Django media
    location /media  {
                alias /home/ofey/djangoForum/fileuploader/uploaded_files;      # your Django project's media files
    }

        location /static {
                alias /home/ofey/djangoForum/nonAppBoundStaticDirectory;     # your Django project's static files
        }

    # Finally, send all non-media requests to the Django server.
    location / {
        uwsgi_pass  django;

        include     /etc/nginx/uwsgi_params; # or the uwsgi_params you installed manually
        }
  }
}

I have restarted all with,

$ sudo systemctl daemon-reload
$ sudo systemctl restart nginx.service
$ sudo systemctl retart uwsgi.service

The last command gives,

Job for uwsgi.service failed because the control process exited with error code. See "systemctl status uwsgi.service" and "journalctl -xe" for details.
$ sudo systemctl status uwsgi.service

gives,

● uwsgi.service - uWSGI Emperor
   Loaded: loaded (/etc/systemd/system/uwsgi.service; disabled; vendor preset: disabled)
   Active: inactive (dead)

Dec 07 23:56:28 ofeyspi systemd[1]: Starting uWSGI Emperor...
Dec 07 23:56:28 ofeyspi uwsgi[7834]: [uWSGI] getting INI configuration from /etc/uwsgi/emperor.ini
Dec 07 23:56:28 ofeyspi systemd[1]: uwsgi.service: Main process exited, code=exited, status=1/FAILURE
Dec 07 23:56:28 ofeyspi systemd[1]: Failed to start uWSGI Emperor.
Dec 07 23:56:28 ofeyspi systemd[1]: uwsgi.service: Unit entered failed state.
Dec 07 23:56:28 ofeyspi systemd[1]: uwsgi.service: Failed with result 'exit-code'.
Dec 07 23:56:28 ofeyspi systemd[1]: uwsgi.service: Service hold-off time over, scheduling restart.
Dec 07 23:56:28 ofeyspi systemd[1]: Stopped uWSGI Emperor.
Dec 07 23:56:28 ofeyspi systemd[1]: uwsgi.service: Start request repeated too quickly.
Dec 07 23:56:28 ofeyspi systemd[1]: Failed to start uWSGI Emperor.

I can not figure out why uwsgi.service will not run.

Any help would be greatly appreciated,

Thanks

2 Replies

Maybe this helps? http://askubuntu.com/questions/721702/s … gi-service">http://askubuntu.com/questions/721702/systemd-crashes-after-starting-uwsgi-service or http://stackoverflow.com/questions/3004 … s-silently">http://stackoverflow.com/questions/30046168/starting-uwsgi-service-fails-silently

Thankyou very much

I will have a look

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct