Now im following this guide
https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-18-04

its working till domain/ip:8000 as i already said but

curl --unix-socket /run/gunicorn.sock localhost

curl: (7) Couldn't connect to server


and


sudo systemctl status gunicorn

[sudo] password for wms:

*●* gunicorn.service - gunicorn daemon

   Loaded: loaded (/etc/systemd/system/gunicorn.service; disabled; vendor
preset: enabled)

   Active: *failed* (Result: exit-code) since Mon 2020-04-13 20:52:38 IST;
1h 28min ago

  Process: 4643 ExecStart=/home/wms/iitians/iitiansenv/bin/gunicorn
--access-logfile - --workers 3 --bind unix:/run/gunicorn.

 Main PID: 4643 (code=exited, status=3)


Apr 13 20:52:38 wms gunicorn[4643]:   File "<frozen importlib._bootstrap>",
line 953, in _find_and_load_unlocked

Apr 13 20:52:38 wms gunicorn[4643]: ModuleNotFoundError: No module named
'iitians.wsgi'

Apr 13 20:52:38 wms gunicorn[4643]: [2020-04-13 20:52:38 +0530] [4646]
[INFO] Worker exiting (pid: 4646)

Apr 13 20:52:38 wms gunicorn[4643]: [2020-04-13 20:52:38 +0530] [4643]
[INFO] Shutting down: Master

Apr 13 20:52:38 wms gunicorn[4643]: [2020-04-13 20:52:38 +0530] [4643]
[INFO] Reason: Worker failed to boot.

Apr 13 20:52:38 wms systemd[1]: *gunicorn.service: Main process exited,
code=exited, status=3/NOTIMPLEMENTED*

Apr 13 20:52:38 wms systemd[1]: *gunicorn.service: Failed with result
'exit-code'.*

Apr 13 20:52:38 wms systemd[1]: *gunicorn.service: Start request repeated
too quickly.*

Apr 13 20:52:38 wms systemd[1]: *gunicorn.service: Failed with result
'exit-code'.*

Apr 13 20:52:38 wms systemd[1]: *Failed to start gunicorn daemon.*

On Mon, Apr 13, 2020 at 7:19 PM Aldian Fazrihady <mob...@aldian.net> wrote:

> If you turned off gunicorn, will you still get the 502 error? If yes,
> the orginal error it means your nginx cannot connect to your gunicorn.
>
> Have you tested your app on dev server, i.e: `python manage.py runserver` ?
>
> On Sat, Apr 11, 2020 at 11:53 PM Jagtar Singh Lakhyan <
> jagtar.lakhe...@gmail.com> wrote:
>
>> Im trying to deploy django app using nginx & gunicorn but its showing
>> error
>>
>> sudo nginx -t
>>
>> nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
>>
>> nginx: configuration file /etc/nginx/nginx.conf test is successful
>>
>>
>> sudo systemctl status gunicorn.service
>>
>> gunicorn.service - gunicorn service
>>
>>    Loaded: loaded (/etc/systemd/system/gunicorn.service; enabled; vendor
>> preset:
>>
>>    Active: *active (running)* since Sat 2020-04-11 21:19:19 IST; 11s ago
>>
>>  Main PID: 16326 (gunicorn)
>>
>>     Tasks: 4 (limit: 1689)
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/b1031a40-e33c-4bca-8764-13849c75968e%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/b1031a40-e33c-4bca-8764-13849c75968e%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>
> --
> Regards,
>
> Aldian Fazrihady
> http://aldianfazrihady.com
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAN7EoAaeBOPBq0NbvJYYV1n%3D7ZZkKLjcvYvVE1Aiw9ero8wS%2BA%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAN7EoAaeBOPBq0NbvJYYV1n%3D7ZZkKLjcvYvVE1Aiw9ero8wS%2BA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>


-- 

*jagtar singh*founder & CEO
LinkedIn <https://www.linkedin.com/in/jagtarsinghlakhyan/>
Twitter <https://twitter.com/jagtarslakhyan>

web 1: Network <https://iitians.xyz/>
web 2: WMS <https://iitiansasc.com/moodle/>
web 3: Conference <https://conference.iitians.xyz/>

Android App 1: Network
<https://play.google.com/store/apps/details?id=xyz.iitians>
Android App 2: WMS
<https://play.google.com/store/apps/details?id=xyz.iitians.wms>
Android App 3: Conference
<https://play.google.com/store/apps/details?id=com.iitiansasc.onlineclass>

LinkedIn
<https://www.linkedin.com/school/iitian's-advanced-school-of-competition-pvt-ltd-/>
LinkedIn2 <https://www.linkedin.com/company/iitians-group/>
Twitter <https://twitter.com/IITIANSGROUP>
*IITIAN'S ADVANCED SCHOOL OF COMPETITION PVT. LTD.
<https://www.facebook.com/IITiansASC/>*

<https://iitians.xyz/>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAD1gXQH6hoSZDsaWLKgwf5J7iCUaTmFg2ejSMkyUR_CrqK0TAA%40mail.gmail.com.

Reply via email to