-
-
Notifications
You must be signed in to change notification settings - Fork 648
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cobbler GUI failing on DJANGO_SETTINGS_MODULE #348
Comments
Have you upgraded recently? It would seem that the WSGI script is not behaving correctly, which is in /usr/share/cobbler/web/cobbler.wsgi This file should look something like this: import os import sys os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' os.environ['PYTHON_EGG_CACHE'] = '/var/lib/cobbler/webui_cache' sys.path.append('/usr/share/cobbler/web') sys.path.append('/usr/share/cobbler/web/cobbler_web') import django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandler() Did you upgrade from an older version or copy config files over from an older version? Make sure the cobbler_web.conf file matches what is in the master git repository, and make sure there aren't any .rpmnew files in /etc/httpd/conf.d/ related to cobbler. |
Thanks! I followed another write up which modified cobbler_web.conf that On Thu, Nov 1, 2012 at 5:29 AM, James Cammarata notifications@github.comwrote:
|
No problem, let me know if you have any more problems. |
@georgeslee it would have been incredibly helpful could you have left behind a comment on which other write up you found and what exactly was faulty with regards to your cobbler_web.conf. |
Argh, I've hit this too and would love to see the solution as well. Any ideas? |
@eklein Make sure you're using the cobbler_web.conf file from the git repo. Are you seeing the exact same error? |
@jimi-c, That's exactly what I ended up having to do. For anyone else who runs into the issue, the main piece I had to fix was related to mod_python vs mod_wsgi in
with:
My cobbler.conf was still stock (matches what's in the git repo). Once I got that functioning, I went through
Once I'd made all of my changes, I ran a I appreciate the response, this ended up being a simple solution but was fairly painful to work through :) |
@eklein I tried all the above steps,but still web page shows internal server error with this in error log: [Wed Sep 10 19:22:57 2014] [error] [client X.X.X.135] mod_wsgi (pid=16954): Exception occurred processing WSGI script '/usr/share/cobbler/web/cobbler.wsgi'. Can you tell me whats wrong here: |
Installed on Centos 6.3 x86_64
cobbler.noarch 2.2.3-2.el6 @epel
cobbler-web.noarch 2.2.3-2.el6 @epel
cobbler sync works no problem, but the web gui throws this error:
MOD_PYTHON ERROR
ProcessId: 4507
Interpreter: 'cobbler.wil'
ServerName: 'cobbler.wil'
DocumentRoot: '/var/www/html'
URI: '/cobbler_web'
Location: '/cobbler_web'
Directory: None
Filename: '/var/www/html/cobbler_web'
PathInfo: ''
Phase: 'PythonAuthenHandler'
Handler: 'cobbler_web.views'
Traceback (most recent call last):
File "/usr/lib64/python2.6/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch
default=default_handler, arg=req, silent=hlist.silent)
File "/usr/lib64/python2.6/site-packages/mod_python/importer.py", line 1202, in _process_target
module = import_module(module_name, path=path)
File "/usr/lib64/python2.6/site-packages/mod_python/importer.py", line 304, in import_module
return import(module_name, {}, {}, ['*'])
File "/usr/share/cobbler/web/cobbler_web/views.py", line 6, in
from django.shortcuts import render_to_response
File "/usr/lib/python2.6/site-packages/django/shortcuts/init.py", line 10, in
from django.db.models.manager import Manager
File "/usr/lib/python2.6/site-packages/django/db/init.py", line 14, in
if not settings.DATABASES:
File "/usr/lib/python2.6/site-packages/django/utils/functional.py", line 276, in getattr
self._setup()
File "/usr/lib/python2.6/site-packages/django/conf/init.py", line 40, in _setup
raise ImportError("Settings cannot be imported, because environment variable %s is undefined." % ENVIRONMENT_VARIABLE)
ImportError: Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined.
The text was updated successfully, but these errors were encountered: