Question

I'm trying to run this command:

sudo supervisorctl start gunicorn_process

On Ubuntu and I get this error:

enter image description here

As you can see the file 'does' have executable permissions.

gunicorn_process file:

[program:gunicorn_process]
command=/srv/domain wsgi:application
directory=/srv/domain
user=root
Was it helpful?

Solution

the command directive requires an executable command which supervisor runs.

You say you want to run

gunicorn wsgi:application

then set your configuration like so:

[program:gunicorn_process]
command=gunicorn wsgi:application
directory=/srv/domain
user=root

Two things to take into account:

  1. You should not run your wsgi app as root. There's a potential security issue right there. Create a user which has no extra privileges which is only meant to run your web applications and servers.

  2. You might want to change the command directive to include the full path of gunicorn executable. Do a which gunicorn to find out where it exists. For example: command=/usr/bin/gunicorn wsgi:application

OTHER TIPS

Make the file executable: sudo chmod u+x gunicorn_process

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top