Failed to start gunicorn.service: Job for gunicorn.socket failed . Ubunto 18.04 TSI

Asked

Viewed 23 times

0

Hello guys I am in need of help with this situation because I have tried several solutions and for my current level of experience I am not able to fix this error and deploy in the app.

I’m following parts of that step by step digitalocean but at some point after preparing practically the whole environment I’m having this problem.

I believe the file . socket

sudo nano /etc/systemd/system/gunicorn.socket

[Unit]
Description=gunicorn socket

[Socket]
ListenStream=/run/gunicorn.sock

[Install]
WantedBy=sockets.target

Then I set up . service already formatting for my project

sudo nano /etc/systemd/system/gunicorn.service
[Unit]
Description=gunicorn daemon
Requires=gunicorn.socket
After=network.target

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

[Install]
WantedBy=multi-user.target

I tried to activate using the command

sudo systemctl start gunicorn.socket

I got this error message

Job for gunicorn.socket failed.
See "systemctl status gunicorn.socket" and "journalctl -xe" for details.

Soon I ran the code "systemctl status gunicorn.socket"

● gunicorn.socket - gunicorn socket
Loaded: loaded (/etc/systemd/system/gunicorn.socket; enabled; vendor preset: enabled)
Active: inactive (dead)
Listen: /run/gunicorn.sock (Stream)

Apr 26 18:41:45 projetoagenda systemd[1]: gunicorn.socket: Socket service gunicorn.service not 
loaded, refusing.
Apr 26 18:41:45 projetoagenda systemd[1]: Failed to listen on gunicorn socket.
Apr 26 18:48:41 projetoagenda systemd[1]: gunicorn.socket: Socket service gunicorn.service not 
loaded, refusing.
Apr 26 18:48:41 projetoagenda systemd[1]: Failed to listen on gunicorn socket.
Apr 26 18:52:53 projetoagenda systemd[1]: gunicorn.socket: Socket service gunicorn.service not 
loaded, refusing.
Apr 26 18:52:53 projetoagenda systemd[1]: Failed to listen on gunicorn socket.
Apr 26 18:53:27 projetoagenda systemd[1]: gunicorn.socket: Socket service gunicorn.service not 
loaded, refusing.
Apr 26 18:53:27 projetoagenda systemd[1]: Failed to listen on gunicorn socket.
Apr 26 19:02:09 projetoagenda systemd[1]: gunicorn.socket: Socket service gunicorn.service not 
loaded, refusing.
Apr 26 19:02:09 projetoagenda systemd[1]: Failed to listen on gunicorn socket.

I’ve followed several other solutions but nothing works I wonder if I’m doing something wrong Process already used Response to a similar problem

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.