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)
sudo systemctl status nginx
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2020-04-11 04:54:18 IST; 18h ago
Docs: man:nginx(8)
Process: 1650 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfi
Process: 1652 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exite
Process: 1651 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (c
Main PID: 1653 (nginx)
Tasks: 9 (limit: 1689)
CGroup: /system.slice/nginx.service
├─1653 nginx: master process /usr/sbin/nginx -g daemon on; master_process o
├─1654 nginx: worker process
├─1655 nginx: worker process
├─1656 nginx: worker process
├─1657 nginx: worker process
├─1658 nginx: worker process
├─1659 nginx: worker process
├─1660 nginx: worker process
└─1661 nginx: worker process
Apr 11 04:54:18 wms systemd[1]: Starting A high performance web server and a reverse p
Apr 11 04:54:18 wms systemd[1]: Started A high performance web server and a reverse pr
--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/a3223d66-8adb-4dcd-8a48-d43d8a426ddc%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAD1gXQEbzWSWvSrQOCb-nBDcHzYb6ZE_qx4Hg6pJ_XJN3HN13Q%40mail.gmail.com.
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
ALLOWED_HOSTS = ['iitian.xyz', '192.95.37.123']
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAJVmkNkLdr0sOAiXUwE8_xoLSN_ctG2-d6jHfUkNefbYsU8BeQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAD1gXQFMn3Qc9WU-k%3DjGTZ51oS6u%3D3A-H3B76nguXR%3DVcUwg5g%40mail.gmail.com.
Failed to reload daemon-reload.service: Unit daemon-reload.service not found.
perhaps u mean to say: sudo systemctl daemon-reload
Result:
sudo systemctl status gunicorn
[sudo] password for wms:
● gunicorn.service - gunicorn service
Loaded: loaded (/etc/systemd/system/gunicorn.service; enabled; vendor preset
Active: active (running) since Sun 2020-04-12 19:17:35 IST; 6min ago
Main PID: 8587 (gunicorn)
Tasks: 4 (limit: 1689)
CGroup: /system.slice/gunicorn.service
├─8587 /home/wms/iitiansenv/bin/python3 /home/wms/iitiansenv/bin/gun
├─8590 /home/wms/iitiansenv/bin/python3 /home/wms/iitiansenv/bin/gun
├─8592 /home/wms/iitiansenv/bin/python3 /home/wms/iitiansenv/bin/gun
└─8594 /home/wms/iitiansenv/bin/python3 /home/wms/iitiansenv/bin/gun
Apr 12 19:17:35 wms systemd[1]: Started gunicorn service.
Apr 12 19:17:35 wms gunicorn[8587]: [2020-04-12 19:17:35 +0530] [8587] [INFO] S
Apr 12 19:17:35 wms gunicorn[8587]: [2020-04-12 19:17:35 +0530] [8587] [INFO] L
Apr 12 19:17:35 wms gunicorn[8587]: [2020-04-12 19:17:35 +0530] [8587] [INFO] U
Apr 12 19:17:35 wms gunicorn[8587]: [2020-04-12 19:17:35 +0530] [8590] [INFO] B
Apr 12 19:17:35 wms gunicorn[8587]: [2020-04-12 19:17:35 +0530] [8592] [INFO] B
Apr 12 19:17:35 wms gunicorn[8587]: [2020-04-12 19:17:35 +0530] [8594] [INFO] B
The app is well tested on my local, even i tried 15 days back the same app to run on nginx, gunicorn and it ran on ip/domain:8000 but Not it didnt run on ip/domain.
Also, i am checking for the app again if it has some issues.
I am following this guide: https://medium.com/@_christopher/deploying-my-django-app-to-a-real-server-part-i-de78962e95ac
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAKYSAw3bq6UFR5K4is_9N7ZLzXchZ45rayZLYqMV7dbXG-f6Og%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAD1gXQHgLpoGAo911_S__b6QAgntbhMvF95hafGwmaJ8U%2BeTCQ%40mail.gmail.com.
Rok Klancar Fullstack developer Amsterdam Netherlands, EU e-mail : rkla...@gmail.com
website: rok-klancar.com
mobile : +386 30 629880
server {
listen 80;
server_name 192.95.37.123;
location = /images/favicon.ico {access_log off;log_not_found off;}
location /static/ {
root /home/wms/iitians;
}
location /media/ {
root /home/wms/iitians;
}
location / {
include proxy_params;
proxy_pass http://unix:/home/wms/iitians/iitians.sock;
}
}
/etc/systemd/system/gunicorn.service
[Unit]
Description=gunicorn service
After=network.target
[Service]
User=wms
Group=www-data
WorkingDirectory=/home/wms/iitians/
ExecStart=/home/wms/iitiansenv/bin/gunicorn --access-logfile - --workers 3 --bind unix:/home/wms/iitians/iitans.sock iitians.wsgi:application
[Install]
WantedBy=multi-user.target
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2Bc1UsJUAcp7wiBQCJWUb0ipQviN501dtG5XswJsjUAbL9_hUg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAD1gXQGZeYqA0rDA88%2BDts%2B7vrY6iH-6pb6K9xosPtUxtjpNhQ%40mail.gmail.com.
sudo ufw status
[sudo] password for wms:
Status: inactive
No funky settings as currently i want only to run the app on web, Not even installed ssl.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2Bc1UsLNrEFCZ0%2ByzQjTrUrTdkUsqBdG0juxD%3DHuiRAhbgyykA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAD1gXQH1JD0P9gL4-T9o-Fh2m%3Dd3AsstDxiJ%2BePeJhA7332rpQ%40mail.gmail.com.
sudo ufw allow 'Nginx Full'
[sudo] password for wms:
Skipping adding existing rule
Skipping adding existing rule (v6)
sudo ufw enable
Command may disrupt existing ssh connections. Proceed with operation (y|n)? y
Firewall is active and enabled on system startup
Do i need to sudo reboot also.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2Bc1UsJ4Qo4qNzechbkTvFRijjLfD614j3jb0TsvJF%2BUTYL8jw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAD1gXQEdSZNHLB1K%3DdTEGk2H9aG6%3DOvuEESf6-3isWBeGPfNgw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2Bc1UsLGqDwkbxdhLWcP7kG5npLiKRoeP5nZN-jxBG5ubZAQzQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAD1gXQHgLpoGAo911_S__b6QAgntbhMvF95hafGwmaJ8U%2BeTCQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAKYSAw2wGM_q1shbUt0DA6ggxKYdLPpHd%3DaYNF4MZ_%2B5q5ippg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAD1gXQERVWcWaMthtqQ4%3DGKejXNESRY5g5wpJtiYDQqWJaB-Mg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2Bc1UsKKvgbfTVgmy_7%3DB%3D40UVNrxnkGJ5bZWU1yUa%3DaGU82dg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAD1gXQEvsS-H5pwyy__UZ3ciargRcuS3jtCtZKUwyLCpRtJTRQ%40mail.gmail.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...@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.
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAN7EoAaeBOPBq0NbvJYYV1n%3D7ZZkKLjcvYvVE1Aiw9ero8wS%2BA%40mail.gmail.com.
sudo journalctl -u gunicorn
-- Logs begin at Fri 2020-04-10 23:00:11 IST, end at Mon 2020-04-13 21:54:16 IST. --
Apr 13 19:49:35 wms systemd[1]: Started gunicorn daemon.
Apr 13 19:49:36 wms gunicorn[2515]: [2020-04-13 19:49:36 +0530] [2515] [INFO] Starting gunicorn 20.0.4
Apr 13 19:49:36 wms gunicorn[2515]: [2020-04-13 19:49:36 +0530] [2515] [INFO] Listening at: unix:/run/gunicorn.sock (2515)
Apr 13 19:49:36 wms gunicorn[2515]: [2020-04-13 19:49:36 +0530] [2515] [INFO] Using worker: sync
Apr 13 19:49:36 wms gunicorn[2515]: [2020-04-13 19:49:36 +0530] [2520] [INFO] Booting worker with pid: 2520
Apr 13 19:49:36 wms gunicorn[2515]: [2020-04-13 19:49:36 +0530] [2521] [INFO] Booting worker with pid: 2521
Apr 13 19:49:36 wms gunicorn[2515]: [2020-04-13 19:49:36 +0530] [2522] [INFO] Booting worker with pid: 2522
Apr 13 19:49:36 wms gunicorn[2515]: [2020-04-13 19:49:36 +0530] [2520] [ERROR] Exception in worker process
Apr 13 19:49:36 wms gunicorn[2515]: Traceback (most recent call last):
Apr 13 19:49:36 wms gunicorn[2515]: File "/home/wms/iitians/iitiansenv/lib/python3.6/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
Apr 13 19:49:36 wms gunicorn[2515]: worker.init_process()
Apr 13 19:49:36 wms gunicorn[2515]: File "/home/wms/iitians/iitiansenv/lib/python3.6/site-packages/gunicorn/workers/base.py", line 119, in init_process
Apr 13 19:49:36 wms gunicorn[2515]: self.load_wsgi()
Apr 13 19:49:36 wms gunicorn[2515]: File "/home/wms/iitians/iitiansenv/lib/python3.6/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi
Apr 13 19:49:36 wms gunicorn[2515]: self.wsgi = self.app.wsgi()
Apr 13 19:49:36 wms gunicorn[2515]: File "/home/wms/iitians/iitiansenv/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
Apr 13 19:49:36 wms gunicorn[2515]: self.callable = self.load()
Apr 13 19:49:36 wms gunicorn[2515]: File "/home/wms/iitians/iitiansenv/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 49, in load
Apr 13 19:49:36 wms gunicorn[2515]: return self.load_wsgiapp()
Apr 13 19:49:36 wms gunicorn[2515]: File "/home/wms/iitians/iitiansenv/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
Apr 13 19:49:36 wms gunicorn[2515]: return util.import_app(self.app_uri)
Apr 13 19:49:36 wms gunicorn[2515]: File "/home/wms/iitians/iitiansenv/lib/python3.6/site-packages/gunicorn/util.py", line 358, in import_app
Apr 13 19:49:36 wms gunicorn[2515]: mod = importlib.import_module(module)
Apr 13 19:49:36 wms gunicorn[2515]: File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
Apr 13 19:49:36 wms gunicorn[2515]: return _bootstrap._gcd_import(name[level:], package, level)
Apr 13 19:49:36 wms gunicorn[2515]: File "<frozen importlib._bootstrap>", line 994, in _gcd_import
Apr 13 19:49:36 wms gunicorn[2515]: File "<frozen importlib._bootstrap>", line 971, in _find_and_load
Apr 13 19:49:36 wms gunicorn[2515]: File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
Apr 13 19:49:36 wms gunicorn[2515]: ModuleNotFoundError: No module named 'iitians.wsgi'
Apr 13 19:49:36 wms gunicorn[2515]: [2020-04-13 19:49:36 +0530] [2522] [ERROR] Exception in worker process
Apr 13 19:49:36 wms gunicorn[2515]: Traceback (most recent call last):
Apr 13 19:49:36 wms gunicorn[2515]: File "/home/wms/iitians/iitiansenv/lib/python3.6/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
Apr 13 19:49:36 wms gunicorn[2515]: worker.init_process()
Apr 13 19:49:36 wms gunicorn[2515]: File "/home/wms/iitians/iitiansenv/lib/python3.6/site-packages/gunicorn/workers/base.py", line 119, in init_process
Apr 13 19:49:36 wms gunicorn[2515]: self.load_wsgi()
Apr 13 19:49:36 wms gunicorn[2515]: File "/home/wms/iitians/iitiansenv/lib/python3.6/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi
Apr 13 19:49:36 wms gunicorn[2515]: self.wsgi = self.app.wsgi()
Apr 13 19:49:36 wms gunicorn[2515]: File "/home/wms/iitians/iitiansenv/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
$ sudo nano /etc/systemd/system/gunicorn.service
-- Logs begin at Fri 2020-04-10 23:00:11 IST, end at Mon 2020-04-13 22:26:42 IST. --
Apr 13 19:49:35 wms systemd[1]: Started gunicorn daemon.
Apr 13 19:49:36 wms gunicorn[2515]: [2020-04-13 19:49:36 +0530] [2515] [INFO] Starting gunicorn 20.0.4
Apr 13 19:49:36 wms gunicorn[2515]: [2020-04-13 19:49:36 +0530] [2515] [INFO] Listening at: unix:/run/gunicorn.sock (2515)
Apr 13 19:49:36 wms gunicorn[2515]: [2020-04-13 19:49:36 +0530] [2515] [INFO] Using worker: sync
Apr 13 19:49:36 wms gunicorn[2515]: [2020-04-13 19:49:36 +0530] [2520] [INFO] Booting worker with pid: 2520
Apr 13 19:49:36 wms gunicorn[2515]: [2020-04-13 19:49:36 +0530] [2521] [INFO] Booting worker with pid: 2521
Apr 13 19:49:36 wms gunicorn[2515]: [2020-04-13 19:49:36 +0530] [2522] [INFO] Booting worker with pid: 2522
Apr 13 19:49:36 wms gunicorn[2515]: [2020-04-13 19:49:36 +0530] [2520] [ERROR] Exception in worker process
Apr 13 19:49:36 wms gunicorn[2515]: Traceback (most recent call last):
Apr 13 19:49:36 wms gunicorn[2515]: File "/home/wms/iitians/iitiansenv/lib/python3.6/site-packages/gunicorn/arbiter.py", li
Apr 13 19:49:36 wms gunicorn[2515]: worker.init_process()
Apr 13 19:49:36 wms gunicorn[2515]: File "/home/wms/iitians/iitiansenv/lib/python3.6/site-packages/gunicorn/workers/base.py
Apr 13 19:49:36 wms gunicorn[2515]: self.load_wsgi()
Apr 13 19:49:36 wms gunicorn[2515]: File "/home/wms/iitians/iitiansenv/lib/python3.6/site-packages/gunicorn/workers/base.py
Apr 13 19:49:36 wms gunicorn[2515]: self.wsgi = self.app.wsgi()
Apr 13 19:49:36 wms gunicorn[2515]: File "/home/wms/iitians/iitiansenv/lib/python3.6/site-packages/gunicorn/app/base.py", l
Apr 13 19:49:36 wms gunicorn[2515]: self.callable = self.load()
Apr 13 19:49:36 wms gunicorn[2515]: File "/home/wms/iitians/iitiansenv/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py"
Apr 13 19:49:36 wms gunicorn[2515]: return self.load_wsgiapp()
Apr 13 19:49:36 wms gunicorn[2515]: File "/home/wms/iitians/iitiansenv/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py"
Apr 13 19:49:36 wms gunicorn[2515]: return util.import_app(self.app_uri)
Apr 13 19:49:36 wms gunicorn[2515]: File "/home/wms/iitians/iitiansenv/lib/python3.6/site-packages/gunicorn/util.py", line
Apr 13 19:49:36 wms gunicorn[2515]: mod = importlib.import_module(module)
Apr 13 19:49:36 wms gunicorn[2515]: File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
Apr 13 19:49:36 wms gunicorn[2515]: return _bootstrap._gcd_import(name[level:], package, level)
Apr 13 19:49:36 wms gunicorn[2515]: File "<frozen importlib._bootstrap>", line 994, in _gcd_import
Apr 13 19:49:36 wms gunicorn[2515]: File "<frozen importlib._bootstrap>", line 971, in _find_and_load
Apr 13 19:49:36 wms gunicorn[2515]: File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
Apr 13 19:49:36 wms gunicorn[2515]: ModuleNotFoundError: No module named 'iitians.wsgi'
Apr 13 19:49:36 wms gunicorn[2515]: [2020-04-13 19:49:36 +0530] [2522] [ERROR] Exception in worker process
Apr 13 19:49:36 wms gunicorn[2515]: Traceback (most recent call last):
Apr 13 19:49:36 wms gunicorn[2515]: File "/home/wms/iitians/iitiansenv/lib/python3.6/site-packages/gunicorn/arbiter.py", li
Apr 13 19:49:36 wms gunicorn[2515]: worker.init_process()
Apr 13 19:49:36 wms gunicorn[2515]: File "/home/wms/iitians/iitiansenv/lib/python3.6/site-packages/gunicorn/workers/base.py
Apr 13 19:49:36 wms gunicorn[2515]: self.load_wsgi()
Apr 13 19:49:36 wms gunicorn[2515]: File "/home/wms/iitians/iitiansenv/lib/python3.6/site-packages/gunicorn/workers/base.py
project/project/ ls
asgi.py __init__.py __pycache__ settings.py urls.py views.py wsgi.py