Skip to content
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 2.8.4/2.8.0 on centos 7 error #1959

Closed
Liuzhj opened this issue Dec 25, 2018 · 4 comments
Closed

cobbler 2.8.4/2.8.0 on centos 7 error #1959

Liuzhj opened this issue Dec 25, 2018 · 4 comments

Comments

@Liuzhj
Copy link

Liuzhj commented Dec 25, 2018

dear:

env:
os: centos 7.6/centos 7.4 x86_64
cobbler/cobbler_web: 2.8.0/2.8.4

symptom:
when i finish configure, and start the httpd service
open the https://192.168.181.131/cobbler_web , internal error

i open the /var/log/httpd/ssl_error_log


[Tue Dec 25 10:57:29.710799 2018] [:error] [pid 17360] [remote 192.168.181.1:216] mod_wsgi (pid=17360): Exception occurred processing WSGI script '/usr/share/cobbler/web/cobbler.wsgi'.
[Tue Dec 25 10:57:29.710846 2018] [:error] [pid 17360] [remote 192.168.181.1:216] Traceback (most recent call last):
[Tue Dec 25 10:57:29.710869 2018] [:error] [pid 17360] [remote 192.168.181.1:216]   File "/usr/share/cobbler/web/cobbler.wsgi", line 28, in application
[Tue Dec 25 10:57:29.710902 2018] [:error] [pid 17360] [remote 192.168.181.1:216]     django.setup()
[Tue Dec 25 10:57:29.710913 2018] [:error] [pid 17360] [remote 192.168.181.1:216]   File "/usr/lib/python2.7/site-packages/django/__init__.py", line 22, in setup
[Tue Dec 25 10:57:29.710933 2018] [:error] [pid 17360] [remote 192.168.181.1:216]     configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
[Tue Dec 25 10:57:29.710943 2018] [:error] [pid 17360] [remote 192.168.181.1:216]   File "/usr/lib/python2.7/site-packages/django/conf/__init__.py", line 56, in __getattr__
[Tue Dec 25 10:57:29.710959 2018] [:error] [pid 17360] [remote 192.168.181.1:216]     self._setup(name)
[Tue Dec 25 10:57:29.710967 2018] [:error] [pid 17360] [remote 192.168.181.1:216]   File "/usr/lib/python2.7/site-packages/django/conf/__init__.py", line 41, in _setup
[Tue Dec 25 10:57:29.710980 2018] [:error] [pid 17360] [remote 192.168.181.1:216]     self._wrapped = Settings(settings_module)
[Tue Dec 25 10:57:29.710989 2018] [:error] [pid 17360] [remote 192.168.181.1:216]   File "/usr/lib/python2.7/site-packages/django/conf/__init__.py", line 110, in __init__
[Tue Dec 25 10:57:29.711002 2018] [:error] [pid 17360] [remote 192.168.181.1:216]     mod = importlib.import_module(self.SETTINGS_MODULE)
[Tue Dec 25 10:57:29.711010 2018] [:error] [pid 17360] [remote 192.168.181.1:216]   File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
[Tue Dec 25 10:57:29.711025 2018] [:error] [pid 17360] [remote 192.168.181.1:216]     __import__(name)
[Tue Dec 25 10:57:29.711034 2018] [:error] [pid 17360] [remote 192.168.181.1:216]   File "/usr/share/cobbler/web/settings.py", line 89, in <module>
[Tue Dec 25 10:57:29.711048 2018] [:error] [pid 17360] [remote 192.168.181.1:216]     from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS
[Tue Dec 25 10:57:29.711066 2018] [:error] [pid 17360] [remote 192.168.181.1:216] ImportError: cannot import name TEMPLATE_CONTEXT_PROCESSORS

I don't know this reason, could you help me ?

@jmaas
Copy link
Member

jmaas commented Dec 28, 2018 via email

@martindka
Copy link

martindka commented Jan 1, 2019

You need to install django 1.9.13 so "pip2.7 install -U django==1.9.13". TEMPLATE_CONTEXT_PROCESSORS does not exists anymore in later versions of django. CentOS 7 takes older version of cobbler-web from epel repo, I think. I didn't try to install cobbler from git repo :)

@jmaas
Copy link
Member

jmaas commented Jan 4, 2019

Yes it's an ugly mess we're in right now, but the workaround has just been provided.
Closing this issue as we are already working on the proper fix (which is cobbler 3)

@jmaas jmaas closed this as completed Jan 4, 2019
@ghost
Copy link

ghost commented May 9, 2019

You need to install django 1.9.13 so "pip2.7 install -U django==1.9.13". TEMPLATE_CONTEXT_PROCESSORS does not exists anymore in later versions of django. CentOS 7 takes older version of cobbler-web from epel repo, I think. I didn't try to install cobbler from git repo :)

This can also be done by replace the python2-django by python2-django16 (version 1.6.11.7) using the following yum command:

yum swap python2-django python2-django16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants