Question

Gunicorn for django not working. Active: failed (Result: resources)

When I run // sudo systemctl status gunicorn.socket //it says Active: active (listening) But when I run// sudo systemctl status gunicorn // it says Active: failed (Result: resources)

Below is my gunicorn.service file, I have changed “ /home/sammy/env/bin/gunicorn “ to “ /home/Sammy/env/lib/python3.8/sitepackages/gunicorn “ as I realized there is not gunicorn in the folder /env/bin.

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

[Service] User=sammy Group=sammy EnvironmentFile=/home/sammy/env WorkingDirectory=/home/sammy/Connectcaptain_001/savedb002 ExecStart=/home/sammy/env/lib/python3.8/site-packages/gunicorn --access-logfile - --workers 3 --bind unix:/run/gunicorn.sock savedb002.wsgi:application

[Install] WantedBy=multi-user.target

My socket file is :

[Unit] Description=gunicorn socket

[Socket] ListenStream=/run/gunicorn.sock

[Install] WantedBy=sockets.target

My wsgi.py file is under the folder savedb002.

Also when I ran “ sudo systemctl status gunicorn.socket ” The output I got is below: Active: failed (Result: resources) gunicorn.service: Failed to run ‘start’ task: gunicorn.service: Failed with result 'resource Failed to start gunicorn daemon. Failed to load environment f Failed to run ‘start’ task Failed with result 'resource Failed to start gunicorn daemon. gunicorn.service: Start request repeated too q gunicorn.service: Failed with result 'resource Failed to start gunicorn daemon.

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!