Django Gunicorn - gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>

Viewed 515

I had a Django/Gunicorn app running just fine, but after a code update it stopped working due to this gunicorn error. I don't think anything has changed regarding that setup, so I am at a loss as to why it won't work now.

/etc/systemd/system/triform.service

[Unit]
Description=triform daemon
Requires=triform.socket
After=network.target

[Service]
User=django
Group=www-data
WorkingDirectory=/home/triform/django
ExecStart=/home/triform/django/venv/bin/gunicorn \
          --access-logfile - \
          --workers 3 \
          --bind unix:/run/gunicorn.sock \
          triform.wsgi:application

[Install]
WantedBy=multi-user.target

/etc/systemd/system/triform.socket

[Unit]
Description=triform socket

[Socket]
ListenStream=/run/triform.sock

[Install]
WantedBy=sockets.target

/home/triform/django/triform/wsgi.py

import os

from django.core.wsgi import get_wsgi_application

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'triform.settings')

application = get_wsgi_application()

in /home/triform/django/triform/settings.py:

WSGI_APPLICATION = 'triform.wsgi.application'
0 Answers
Related