I continuously get this error message when trying to deploy my Django app with Nginx and Gunicorn. I've almost read and implemented all suggestions about this issue on ST.Overflow I've already implemented the following.
1. Ensured there is a shebang: #!/bin/bash
2. Put sh in front of command in /etc/supervisor/conf.d/clouditech.conf
Please find my configuration files
- /etc/supervisor/conf.d/clouditech.conf
[program:clouditech]
command =sh /home/clouditech/bin/gunicorn_start
user=clouditech
autostart=true
autorestart=true
redirect_stderr=true
stdout_logfile=/home/clouditech/logs/gunicorn-error.log
- gunicorn_start file
/home/clouditech/bin/gunicorn_start
#!/bin/bash
NAME="core"
DIR=/home/clouditech/clouditech
USER=clouditech
GROUP=clouditech
WORKERS=3
BIND=unix:/home/clouditech/run/gunicorn.sock
DJANGO_SETTINGS_MODULE=core.settings
DJANGO_WSGI_MODULE=core.wsgi
LOG_LEVEL=error
cd $DIR
source ../bin/activate
export DJANGO_SETTINGS_MODULE=$DJANGO_SETTINGS_MODULE
export PYTHONPATH=$DIR:$PYTHONPATH
exec ../bin/gunicorn ${DJANGO_WSGI_MODULE}:application \
--name $NAME \
--workers $WORKERS \
--user=$USER \
--group=$GROUP \
--bind=$BIND \
--log-level=$LOG_LEVEL \
--log-file=-