D
D
Dmitry2015-12-25 19:19:21
Django
Dmitry, 2015-12-25 19:19:21

Supervisor gives an application:ERROR (abnormal termination) error, how to overcome?

Supervisor throws an error:
application:ERROR (abnormal termination)
Configs:
Running gunicorn

#!/bin/bash

NAME="app"                                  # Name of the application
DJANGODIR=/home/app/             # Django project directory
#SOCKFILE=/home/app/run/gunicorn.sock  # we will communicte using this unix socket
IP=0.0.0.0:8000
USER=app                                        # the user to run as
GROUP=app                                     # the group to run as
NUM_WORKERS=4                                     # how many worker processes should Gunicorn spawn
           # which settings file should Django use
DJANGO_WSGI_MODULE=config.wsgi               # WSGI module name

echo "Starting $NAME as `whoami`"

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


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

# Start your Django Unicorn
# Programs meant to be run under supervisor should not daemonize themselves (do not use --daemon)
exec ../env/bin/gunicorn ${DJANGO_WSGI_MODULE} \
  --name $NAME \
  --workers $NUM_WORKERS \
  --user=$USER --group=$GROUP \
  --bind=$IP \
  --log-level=debug \
  --log-file=-
supervisor
[program:app]
command = /home/app/startgunicorn.sh                    ; Command to start app
user = app                                                          ; User to run as
stdout_logfile = /home/app/gunicorn_supervisor.log   ; Where to write log messages
redirect_stderr = true

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2015-12-26
@topwebmaster

The problem is solved by this:
https://github.com/killercentury/docker-jenkins-di...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question