Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I've deleted my .sock file - Django, Nginx, Gunicorn

When I was trying to pull from Git, I accidentally deleted the sock file. What am I supposed to do now? My websites showing "502 Bad Gateway" and nothing's working. I need help, fast.

Could you tell me what to do now?

EDIT: As this a new project with no data yet, I've just scrapped the server and spun another, done everything again, because nothing seems to work for me.

like image 862
Robo Avatar asked Oct 15 '25 07:10

Robo


2 Answers

Just try to run this command it will create .sock file for you

sudo systemctl start gunicorn
sudo systemctl enable gunicorn

this will create your_project.sock file and then check the status by typing this command

sudo systemctl status gunicorn
like image 75
Ankit Tiwari Avatar answered Oct 16 '25 22:10

Ankit Tiwari


If you are using systemd enable and start your service. If everything ok with service file it will create the .sock file again.

systemctl start <your service name>
systemctl enable <your service name>
like image 26
Tasnuva Avatar answered Oct 16 '25 22:10

Tasnuva