在访问cobbler web界面到时候出现以下提示

ssl的报错日志如下:

[root@Cobbler ~]# tail -f /var/log/httpd/ssl_error_log
[Mon Jan 07 16:24:53.363029 2019] [:error] [pid 3383] [remote 10.0.0.1:212]     mod = importlib.import_module(self.SETTINGS_MODULE)
[Mon Jan 07 16:24:53.363032 2019] [:error] [pid 3383] [remote 10.0.0.1:212]   File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
[Mon Jan 07 16:24:53.363084 2019] [:error] [pid 3383] [remote 10.0.0.1:212]     __import__(name)
[Mon Jan 07 16:24:53.363089 2019] [:error] [pid 3383] [remote 10.0.0.1:212]   File "/usr/share/cobbler/web/settings.py", line 89, in 
[Mon Jan 07 16:24:53.363097 2019] [:error] [pid 3383] [remote 10.0.0.1:212]     from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS
[Mon Jan 07 16:24:53.363124 2019] [:error] [pid 3383] [remote 10.0.0.1:212] ImportError: cannot import name TEMPLATE_CONTEXT_PROCESSORS

查看cobbler的py配置文件

[root@Cobbler ~]# sed -n '38,41p' /usr/share/cobbler/web/settings.py
if django.VERSION[0] == 1 and django.VERSION[1] < 4:
    ADMIN_MEDIA_PREFIX = '/media/'
else:
    STATIC_URL = '/media/

[root@Cobbler ~]# sed -n '89p' /usr/share/cobbler/web/settings.py
from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS

初步判断应该是pythone-django版本问题

#下载pip.py
wget https://bootstrap.pypa.io/get-pip.py

#调用本地python运行pip.py脚本
python get-pip.py

#安装pip
pip install Django==1.8.9

#查看pip版本号
python -c "import django; print(django.get_version())"

#重启httpd
systemctl restart httpd

最后完美解决