22👍
I don’t know django, but I am going to assume that this issue is similar to an issue I saw trying to get the MySQL service to start on one of my servers today (see here: https://stackoverflow.com/a/55141733/708323)
Basically, the “start-limit-hit” message is a red herring – service start tries to start which ever service name you provide multiple times, and if after the fifth failed attempt (for me, at least) it crashes out on the sixth attempt with “start-limit-hit”. You’ll need to investigate the actual syslog (possibly /var/log/syslog) to see what the real errors are that are preventing the service from starting on attempts 1-5.
1👍
Check whether you have proper permissions for the user/group mentioned inside the gunicorn.service file.
I had the same issue, my gunicorn file had:
[Service]
User= www-data
Group= www-data
I changed the permission of gunicorn service file, socket file and django directory and it worked fine.
chown www-data:www-data /etc/systemd/system/gunicorn.service
chown www-data:www-data /etc/systemd/system/gunicorn.socket
chown www-data:www-data -R myproject/
Hope, it helps.
- Is there a command for creating an app using cookiecutter-django?
- Django Bi-directional ManyToMany – How to prevent table creation on second model?
- Mysql_exceptions.OperationalError: (1045, "Access denied for user 'root'@'localhost' (using password: YES)")
- How to Serialize BigIntegerField, TextField in serializer Django
- Django_rest_swagger – 'staticfiles' is not a registered tag library. Must be one of:
0👍
My issue was related to Django settings
Django used sqlite3 instead of pgsql because of wrong environment variables values
So my suggestion is to start from /var/log/syslog and try to start gunicorn without nginx
Something like gunicorn --workers=2 'zt.wsgi' -b 0.0.0.0:8000
and then check your website url on 8000 port
- How to populate user profile with django-allauth provider information?
- Django Can't Find My Templates
- How to get the submitted value of a form in a Django class-based view?