Comments on How to Install Django with PostgreSQL and Nginx on Ubuntu 16.04
In this tutorial, I will show you how to install the Django web framework and configure it to use a PostgreSQL database for development. We will run Nginx as a reverse proxy for Django web framework for speed and security reasons. Django will run under the python WSGI HTTP server 'Gunicorn', we will manage and control 'Gunicorn' with 'Supervisor' as the process control system.
3 Comment(s)
Comments
Supervisor failed following is the error log i renamed hello-django.conf to hello_django.conf but both the time supervisor failsrunning django in virtualenv
hello_django FATAL Exited too quickly (process log may have details)
supervisor> restart hello_django
hello_django: ERROR (not running)
hello_django: started
supervisor> tail hello_django
[DEBUG] Arbiter booted
[2016-11-25 08:39:34 +0530] [14931] [INFO] Listening at: unix:/home/puneet1/myproject/hello_django/run/gunicorn.sock (14931)
[2016-11-25 08:39:34 +0530] [14931] [INFO] Using worker: sync
[2016-11-25 08:39:34 +0530] [14936] [INFO] Booting worker with pid: 14936
[2016-11-25 08:39:34 +0530] [14936] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/home/puneet1/myproject/lib/python3.5/site-packages/gunicorn/arbiter.py", line 557, in spawn_worker
worker.init_process()
File "/home/puneet1/myproject/lib/python3.5/site-packages/gunicorn/workers/base.py", line 126, in init_process
self.load_wsgi()
File "/home/puneet1/myproject/lib/python3.5/site-packages/gunicorn/workers/base.py", line 136, in load_wsgi
self.wsgi = self.app.wsgi()
File "/home/puneet1/myproject/lib/python3.5/site-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
File "/home/puneet1/myproject/lib/python3.5/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
return self.load_wsgiapp()
File "/home/puneet1/myproject/lib/python3.5/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
return util.import_app(self.app_uri)
File "/home/puneet1/myproject/lib/python3.5/site-packages/gunicorn/util.py", line 357, in import_app
__import__(module)
ImportError: No module named 'hello_django'
[2016-11-25 08:39:34 +0530] [14936] [INFO] Worker exiting (pid: 14936)
[2016-11-25 08:39:34 +0530] [14931] [INFO] Shutting down: Master
[2016-11-25 08:39:34 +0530] [14931] [INFO] Reason: Worker failed to boot.
supervisor>
I did the same thing as you, got the all the things running while doing netstat -pl but I still got the nginx webpage when I go to my site. Can you help me?
I have the same problem, any ideas?