I encountered a 502 Bad Gateway error on my deployed Django website

I encountered a 502 Bad Gateway error on my deployed Django website. The site was working fine until I made some modifications to enable email functionality with my website's extension. It seems that Gunicorn is not running due to a 'permission denied' error.

when I'm trying to make mails with my website extension and do reboot my website has been disabled

here is the error that I encounted :

root@vps-etu:~# source /www/wwwroot/django-project/f37529200a260f346c11edf_venv/bin/activate
(51273d353f37529200a260f346c11edf_venv) root@vps-etu:~# cd /www/wwwroot/django-project
(51273d353f37529200a260f346c11edf_venv) root@vps-etu:/www/wwwroot/django-project# sudo systemctl status gunicorn
× gunicorn.service - gunicorn daemon for Django project
     Loaded: loaded (/etc/systemd/system/gunicorn.service; enabled; vendor pres>
     Active: failed (Result: exit-code) since Wed 2024-11-13 15:14:54 CET; 3h 1>
    Process: 131999 ExecStart=/www/wwwroot/django-project/f37529200a260f346>
   Main PID: 131999 (code=exited, status=3)
        CPU: 1.115s

Nov 13 15:14:52 vps-etu systemd[1]: Started gunicorn daemon for Djang>
Nov 13 15:14:54 vps-etu systemd[1]: gunicorn.service: Main process ex>
Nov 13 15:14:54 vps-etu systemd[1]: gunicorn.service: Failed with res>
Nov 13 15:14:54 vps-etu systemd[1]: gunicorn.service: Consumed 1.115s>
lines 1-11/11 (END)
(51273d353f37529200a260f346c11edf_venv) root@vps-etus:/www/wwwroot/django-project# sudo journalctl -u gunicorn -n 50 --no-pager
Nov 13 12:27:22 mail.etu.dz systemd[1]: Started gunicorn daemon for Django project.
Nov 13 12:27:22 mail.etu.dz systemd[76558]: gunicorn.service: Changing to the requested working directory failed: Permission denied
Nov 13 12:27:22 mail.etu.dz systemd[76558]: gunicorn.service: Failed at step CHDIR spawning /www/wwwroot/django-project/f37529200a260f346c11edf_venv/bin/gunicorn: Permission denied
Вернуться на верх