[Django]-How to fix "Failed to restart gunicorn.service: Unit gunicorn.socket not found." error?

0👍

✅

I solved it by creating a /etc/systemd/system/gunicorn.socket file:

[Unit]
Description=gunicorn socket

[Socket]
ListenStream=/run/gunicorn.sock

[Install]
WantedBy=sockets.target

In Ubuntu 20, we have to create this file to run gunicorn service.

Leave a comment