Nginx Django und Gunicorn. Gunicorn sock Datei fehlt?

Ich habe eine ansible provisioned VM basierend auf dieser https://github.com/jcalazan/ansible-django-stack aber aus irgendeinem Grund versucht zu starten Gunicorn gibt die folgende Fehlermeldung:

Kann keine Verbindung zu /Pfad/zu/meinem/gunicorn.Socke

und in der nginx log-Datei:

connect() to unix:/Pfad/zu/meinem/gunicorn.sock failed (2: Keine solche Datei oder Verzeichnis) beim verbinden mit stromaufwärts

Und eigentlich die socket-Datei fehlt im angegebenen Verzeichnis. Ich habe die Berechtigungen des Verzeichnisses, und Sie sind in Ordnung.

Hier ist mein gunicorn_start Skript:

NAME="{{ application_name }}"
DJANGODIR={{ application_path }}
SOCKFILE={{ virtualenv_path }}/run/gunicorn.sock
USER={{ gunicorn_user }}
GROUP={{ gunicorn_group }}
NUM_WORKERS={{ gunicorn_num_workers }}

# Set this to 0 for unlimited requests. During development, you might want to
# set this to 1 to automatically restart the process on each request (i.e. your
# code will be reloaded on every request).
MAX_REQUESTS={{ gunicorn_max_requests }}

echo "Starting $NAME as `whoami`"

# Activate the virtual environment.
cd $DJANGODIR
. ../../bin/activate

# Set additional environment variables.
. ../../bin/postactivate

# Create the run directory if it doesn't exist.
RUNDIR=$(dirname $SOCKFILE)
test -d $RUNDIR || mkdir -p $RUNDIR

# Programs meant to be run under supervisor should not daemonize themselves
# (do not use --daemon).
exec gunicorn \
    --name $NAME \
    --workers $NUM_WORKERS \
    --max-requests $MAX_REQUESTS \
    --user $USER --group $GROUP \
    --log-level debug \
    --bind unix:$SOCKFILE \
    {{ application_name }}.wsgi

Kann jeder jeden schlagen, was sonst sollte die Ursache der fehlenden socket-Datei?

Dank

InformationsquelleAutor kalo | 2015-02-24
Schreibe einen Kommentar