Bug 975802 - Cobbler web does not display
Summary: Cobbler web does not display
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: cobbler
Version: el6
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: James C.
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-19 11:40 UTC by shaun
Modified: 2023-09-14 01:46 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-17 17:26:58 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
This is the error you get when trying to display the cobbler web login page (173.54 KB, image/png)
2013-06-19 11:40 UTC, shaun
no flags Details

Description shaun 2013-06-19 11:40:24 UTC
Created attachment 762884 [details]
This is the error you get when trying to display the cobbler web login page

Description of problem:
When installing cobbler-web from the Epel repository on Centos 6.4, If one navigates to https://ipaddress/cobbler_web you get an error:

ImproperlyConfigured at /
Error importing template source loader django.template.loaders.filesystem.load_template_source: "'module' object has no attribute 'load_template_source'"
Request Method:	GET
Request URL:	https://172.16.0.159/cobbler_web/
Django Version:	1.4.5
Exception Type:	ImproperlyConfigured
Exception Value:	
Error importing template source loader django.template.loaders.filesystem.load_template_source: "'module' object has no attribute 'load_template_source'"
Exception Location:	/usr/lib/python2.6/site-packages/django/template/loader.py in find_template_loader, line 101
Python Executable:	/usr/bin/python
Python Version:	2.6.6
Python Path:	
['/usr/lib64/python26.zip',
 '/usr/lib64/python2.6',
 '/usr/lib64/python2.6/plat-linux2',
 '/usr/lib64/python2.6/lib-tk',
 '/usr/lib64/python2.6/lib-old',
 '/usr/lib64/python2.6/lib-dynload',
 '/usr/lib64/python2.6/site-packages',
 '/usr/lib64/python2.6/site-packages/gtk-2.0',
 '/usr/lib/python2.6/site-packages',
 '/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg-info',
 '/usr/share/cobbler/web',
 '/usr/share/cobbler/web/cobbler_web']
Server time:	Wed, 19 Jun 2013 13:35:05 +0200




Version-Release number of selected component (if applicable):

cobbler-web                   noarch             2.2.3-2.el6                         epel                284 k

How reproducible:

1. disable selinux and firewall

2. rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

3. yum install cobbler cobbler-web pykickstart syslinux tftp

4. /etc/init.d/httpd restart

OPEN BROWSER

5. https://ipaddress/cobbler_web

This will render the error


Actual results:

Error page


Expected results:

Display the cobbler web login page


Additional info:

To fix this issue you need to edit the following:

vi /usr/share/cobbler/web/settings.py

and replace it with the git contents found on https://github.com/cobbler/cobbler/blob/master/web/settings.py

Namely the following

###############REPLACE####################

# Django settings for cobbler-web project.
import django

DEBUG = True
TEMPLATE_DEBUG = DEBUG

ADMINS = (
    # ('Your Name', 'your_email'),
)

MANAGERS = ADMINS

DATABASE_ENGINE = ''     # cobbler-web does not use a database
DATABASE_NAME = ''       
DATABASE_USER = ''       
DATABASE_PASSWORD = ''   
DATABASE_HOST = ''       
DATABASE_PORT = ''       

# Force Django to use the systems timezone
TIME_ZONE = None

# Language section
# TBD.
LANGUAGE_CODE = 'en-us'
USE_I18N = False

SITE_ID = 1

# not used
MEDIA_ROOT = ''
MEDIA_URL = ''
ADMIN_MEDIA_PREFIX = '/media/'

SECRET_KEY = ''

# code config

if django.VERSION[0] == 1 and django.VERSION[1] < 4:
    TEMPLATE_LOADERS = (
        'django.template.loaders.filesystem.load_template_source',
        'django.template.loaders.app_directories.load_template_source',
    )
else:
    TEMPLATE_LOADERS = (
        'django.template.loaders.filesystem.Loader',
        'django.template.loaders.app_directories.Loader',
    )

if django.VERSION[0] == 1 and django.VERSION[1] < 2:
    # Legacy django had a different CSRF method, which also had 
    # different middleware. We check the vesion here so we bring in 
    # the correct one.
    MIDDLEWARE_CLASSES = (
        'django.middleware.common.CommonMiddleware',
        'django.contrib.csrf.middleware.CsrfMiddleware',
        'django.contrib.sessions.middleware.SessionMiddleware',
        'django.contrib.auth.middleware.AuthenticationMiddleware',
    )
else:
    MIDDLEWARE_CLASSES = (
        'django.middleware.common.CommonMiddleware',
        'django.middleware.csrf.CsrfViewMiddleware',
        'django.contrib.sessions.middleware.SessionMiddleware',
        'django.contrib.auth.middleware.AuthenticationMiddleware',
    )

ROOT_URLCONF = 'urls'

TEMPLATE_DIRS = (
    '/usr/share/cobbler/web/templates',
)
INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'cobbler_web',
)

from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS

TEMPLATE_CONTEXT_PROCESSORS += (
     'django.core.context_processors.request',
) 
     
SESSION_ENGINE = 'django.contrib.sessions.backends.file'
SESSION_FILE_PATH = '/var/lib/cobbler/webui_sessions'

Comment 1 Orion Poplawski 2014-04-21 17:58:29 UTC
Is this still an issue with 2.4.0-1.el6?

Comment 2 Red Hat Bugzilla 2023-09-14 01:46:46 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days


Note You need to log in before you can comment on or make changes to this bug.