Running uwsgi gives FAILED to start flash policy server: [Errno 13] Permission denied: ('0.0.0.0', 843) error

545 Views Asked by At

I am trying to setup my django project with uwsgi and nginx on EC2. I have already had my uwsgi.ini file in place.

However, when I ran: sudo uwsgi --ini uwsgi.ini

I got the following Error:

FAILED to start flash policy server: [Errno 13] Permission denied: ('0.0.0.0', 843)

my wsgi.py file looks like: PORT = 9000

import os

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "night.settings")

import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

from socketio import SocketIOServer

print 'Listening on port %s and on port 843 (flash policy server)' % PORT
SocketIOServer(('', PORT), application, resource="socket.io").serve_forever()

And my uwsgi.ini file looks like: [uwsgi]

socket=/tmp/uwsgi.sock
chmod-socket=644
uid = www-data
gid = www-data

chdir=/home/ubuntu/project
module=project.wsgi:application
pidfile=/home/ubuntu/project.pid
vacuum=true

Could someone help?

Thanks in advance

0

There are 0 best solutions below