[Django] #22948: Django 1.6, Python3.4, apache2.4, mod_wsgi not working

80 views
Skip to first unread message

Django

unread,
Jul 3, 2014, 4:31:41 AM7/3/14
to django-...@googlegroups.com
#22948: Django 1.6, Python3.4, apache2.4, mod_wsgi not working
----------------------------+----------------------------------------
Reporter: tom@… | Owner: nobody
Type: Bug | Status: new
Component: Python 3 | Version: 1.6
Severity: Normal | Keywords: python3, apache2, mod_wsgi
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+----------------------------------------
I use the default apache2 configuration from the django docs:


{{{
WSGIScriptAlias / /path/to/mysite.com/mysite/wsgi.py
WSGIPythonPath /path/to/mysite.com

<Directory /path/to/mysite.com/mysite>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
}}}

together wit this wsgi file:

{{{
import os, sys
sys.path.append('/path/to/mysite.com/')
sys.path.append('/path/to/mysite.com/mysite/')
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings")

from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
}}}

results in the following apache2 error:


{{{
Exception ignored in: <module 'threading' from
'/usr/lib/python3.4/threading.py'>
Traceback (most recent call last):
File "/usr/lib/python3.4/threading.py", line 1288, in _shutdown
assert tlock is not None
AssertionError:
Exception ignored in: <module 'threading' from
'/usr/lib/python3.4/threading.py'>
Traceback (most recent call last):
File "/usr/lib/python3.4/threading.py", line 1288, in _shutdown
assert tlock is not None
AssertionError:
Exception ignored in: <module 'threading' from
'/usr/lib/python3.4/threading.py'>
Traceback (most recent call last):
File "/usr/lib/python3.4/threading.py", line 1288, in _shutdown
assert tlock is not None
AssertionError:
(...)
[Thu Jul 03 10:22:55.466070 2014] [mpm_prefork:notice] [pid 7939] AH00169:
caught SIGTERM, shutting down
}}}

The page loads forever, but never displays anything. System: Ubuntu 14.04/
64bit + libapache2-mod-wsgi-py3

--
Ticket URL: <https://code.djangoproject.com/ticket/22948>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jul 3, 2014, 4:54:03 AM7/3/14
to django-...@googlegroups.com
#22948: Django 1.6, Python3.4, apache2.4, mod_wsgi not working
-------------------------------------+-------------------------------------
Reporter: tom@… | Owner: nobody
Type: Bug | Status: closed

Component: Python 3 | Version: 1.6
Severity: Normal | Resolution: fixed
Keywords: python3, apache2, | Triage Stage:
mod_wsgi | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by anonymous):

* status: new => closed
* needs_better_patch: => 0
* resolution: => fixed
* needs_tests: => 0
* needs_docs: => 0


Comment:

I just fixed this issue:

adding

{{{
WSGIApplicationGroup %{GLOBAL}
}}}

to the apache2 configuration fixed it.


{{{
WSGIScriptAlias / /path/to/mysite.com/mysite/wsgi.py
WSGIPythonPath /path/to/mysite.com

WSGIApplicationGroup %{GLOBAL}

<Directory /path/to/mysite.com/mysite>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/22948#comment:1>

Django

unread,
Aug 20, 2014, 8:48:57 PM8/20/14
to django-...@googlegroups.com
#22948: Django 1.6, Python3.4, apache2.4, mod_wsgi not working
-------------------------------------+-------------------------------------
Reporter: tom@… | Owner: nobody
Type: Bug | Status: closed

Component: Python 3 | Version: 1.6
Severity: Normal | Resolution: fixed
Keywords: python3, apache2, | Triage Stage:
mod_wsgi | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by GrahamDumpleton):

For Python 3.4 you need to have an update to date mod_wsgi version. Use
mod_wsgi 4.2+.

--
Ticket URL: <https://code.djangoproject.com/ticket/22948#comment:2>

Django

unread,
May 5, 2015, 8:36:00 AM5/5/15
to django-...@googlegroups.com
#22948: Django 1.6, Python3.4, apache2.4, mod_wsgi not working
-------------------------------------+-------------------------------------
Reporter: tom@… | Owner: nobody
Type: Bug | Status: closed

Component: Python 3 | Version: 1.6
Severity: Normal | Resolution: fixed
Keywords: python3, apache2, | Triage Stage:
mod_wsgi | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by JanMalte):

Further information:
http://askubuntu.com/a/569551
https://bugs.launchpad.net/ubuntu/+source/mod-wsgi/+bug/1451807

--
Ticket URL: <https://code.djangoproject.com/ticket/22948#comment:3>

Django

unread,
May 5, 2015, 8:37:38 AM5/5/15
to django-...@googlegroups.com
#22948: Django 1.6, Python3.4, apache2.4, mod_wsgi not working
-------------------------------------+-------------------------------------
Reporter: tom@… | Owner: nobody
Type: Bug | Status: closed

Component: Python 3 | Version: 1.6
Severity: Normal | Resolution: fixed
Keywords: python3, apache2, | Triage Stage:
mod_wsgi | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by JanMalte):

Replying to [comment:1 anonymous]:


> I just fixed this issue:
>
> adding
>
> {{{
> WSGIApplicationGroup %{GLOBAL}
> }}}
>
> to the apache2 configuration fixed it.
>

I have to decline. This doesn't fixed it for me. Only upgrading the wsgi
package or performing an release upgrade seemed to fix this issue.

--
Ticket URL: <https://code.djangoproject.com/ticket/22948#comment:4>

Reply all
Reply to author
Forward
0 new messages