0
Under review

Ajenti V - Django : Exited too quickly (process log may have details)

Roger Fuentes 6 years ago updated 6 years ago 6
I followed the following tutorial: Setting up a Python website with Ajenti V (Django example), and I have not been able to walk the application. I do everything with the root user.

The error is as follows :


Mi folder configuration is :
-/srv/
  -vinilos/
        - env/
        - vinilos/
                   - manage.py
                   - vinilos/
                         - wsgi.py (Django auto generate file)
                         .......
        - public/
                   - static/


The Python WSGI is: 


I was unable to make this work in weeks, any recommendation?
+2
Under review
Please see the process log at /var/log/supervisor/process-name
I only can run a test app in this way :
- putting a wsgi.py in the same level that manage.py with this content:
def application(env, start_response):
start_response('200 OK', [('Content-Type', 'text/html')])
return ["Hello Wold!"]
- running with the root user and the env active : gunicorn -b 0.0.0.0:8080 wsgi


Is there anything in the stdout log as well? If you didn't previously have a wsgi script in your project, you can create a Django one using django start-project
The first try, I use the wsgi script inside Django project (default) and the result is the same.
The stdout log is empty.
Traceback (most recent call last):
File "/srv/vinilos/env/bin/gunicorn", line 11, in <module>
sys.exit(run())
File "/srv/vinilos/env/local/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 74, in run
WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
File "/srv/vinilos/env/local/lib/python2.7/site-packages/gunicorn/app/base.py", line 185, in run
super(Application, self).run()
File "/srv/vinilos/env/local/lib/python2.7/site-packages/gunicorn/app/base.py", line 71, in run
Arbiter(self).run()
File "/srv/vinilos/env/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 169, in run
self.manage_workers()
File "/srv/vinilos/env/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 477, in manage_workers
self.spawn_workers()
File "/srv/vinilos/env/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 542, in spawn_workers
time.sleep(0.1 * random.random())
File "/srv/vinilos/env/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 209, in handle_chld
self.reap_workers()
File "/srv/vinilos/env/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 459, in reap_workers
raise HaltServer(reason, self.WORKER_BOOT_ERROR)
gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
Traceback (most recent call last):
File "/srv/vinilos/env/bin/gunicorn", line 11, in <module>
sys.exit(run())
File "/srv/vinilos/env/local/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 74, in run
WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
File "/srv/vinilos/env/local/lib/python2.7/site-packages/gunicorn/app/base.py", line 185, in run
super(Application, self).run()
File "/srv/vinilos/env/local/lib/python2.7/site-packages/gunicorn/app/base.py", line 71, in run
Arbiter(self).run()
File "/srv/vinilos/env/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 169, in run
self.manage_workers()
File "/srv/vinilos/env/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 477, in manage_workers
self.spawn_workers()
File "/srv/vinilos/env/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 542, in spawn_workers
time.sleep(0.1 * random.random())
File "/srv/vinilos/env/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 209, in handle_chld
self.reap_workers()
File "/srv/vinilos/env/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 459, in reap_workers
raise HaltServer(reason, self.WORKER_BOOT_ERROR)
gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
Traceback (most recent call last):
File "/srv/vinilos/env/bin/gunicorn", line 11, in <module>
sys.exit(run())
File "/srv/vinilos/env/local/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 74, in run
WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
File "/srv/vinilos/env/local/lib/python2.7/site-packages/gunicorn/app/base.py", line 185, in run
super(Application, self).run()
File "/srv/vinilos/env/local/lib/python2.7/site-packages/gunicorn/app/base.py", line 71, in run
Arbiter(self).run()
File "/srv/vinilos/env/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 169, in run
self.manage_workers()
File "/srv/vinilos/env/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 477, in manage_workers
self.spawn_workers()
File "/srv/vinilos/env/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 542, in spawn_workers
time.sleep(0.1 * random.random())
File "/srv/vinilos/env/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 209, in handle_chld
self.reap_workers()
File "/srv/vinilos/env/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 459, in reap_workers
raise HaltServer(reason, self.WORKER_BOOT_ERROR)
gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
Traceback (most recent call last):
File "/srv/vinilos/env/bin/gunicorn", line 11, in <module>
sys.exit(run())
File "/srv/vinilos/env/local/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 74, in run
WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
File "/srv/vinilos/env/local/lib/python2.7/site-packages/gunicorn/app/base.py", line 185, in run
super(Application, self).run()
File "/srv/vinilos/env/local/lib/python2.7/site-packages/gunicorn/app/base.py", line 71, in run
Arbiter(self).run()
File "/srv/vinilos/env/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 169, in run
self.manage_workers()
File "/srv/vinilos/env/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 477, in manage_workers
self.spawn_workers()
File "/srv/vinilos/env/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 542, in spawn_workers
time.sleep(0.1 * random.random())
File "/srv/vinilos/env/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 209, in handle_chld
self.reap_workers()
File "/srv/vinilos/env/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 459, in reap_workers
raise HaltServer(reason, self.WORKER_BOOT_ERROR)
gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
+1
I found the solution. 
- The wsgi.py file must be on the same level as the manage.py
- The "Application Module" in the panel must be only "wsgi"  (without the extension .py )