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

解决步骤:

1. SSL 的报错日志如下:

[root@localhost ~]# tail -f /var/log/httpd/ssl_error_log
[Tue May 28 16:54:16.665181 2019] [:error] [pid 7001] [remote 192.168.1.109:44]   self._setup(name)
[Tue May 28 16:54:16.665190 2019] [:error] [pid 7001] [remote 192.168.1.109:44]   File "/usr/lib/python2.7/site-packages/django/conf/__init__.py", line 41, in _setup[Tue May 28 16:54:16.665205 2019] [:error] [pid 7001] [remote 192.168.1.109:44]     self._wrapped = Settings(settings_module)
[Tue May 28 16:54:16.665209 2019] [:error] [pid 7001] [remote 192.168.1.109:44]   File "/usr/lib/python2.7/site-packages/django/conf/__init__.py", line 110, in __init__[Tue May 28 16:54:16.665217 2019] [:error] [pid 7001] [remote 192.168.1.109:44]     mod = importlib.import_module(self.SETTINGS_MODULE)
[Tue May 28 16:54:16.665223 2019] [:error] [pid 7001] [remote 192.168.1.109:44]   File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module[Tue May 28 16:54:16.665445 2019] [:error] [pid 7001] [remote 192.168.1.109:44]     __import__(name)
[Tue May 28 16:54:16.665455 2019] [:error] [pid 7001] [remote 192.168.1.109:44]   File "/usr/share/cobbler/web/settings.py", line 89, in <module>
[Tue May 28 16:54:16.665500 2019] [:error] [pid 7001] [remote 192.168.1.109:44]   from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS
[Tue May 28 16:54:16.665516 2019] [:error] [pid 7001] [remote 192.168.1.109:44]   ImportError: cannot import name TEMPLATE_CONTEXT_PROCESSORS

2. 查看cobbler的py配置文件

[root@localhost ~]# 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@localhost ~]# sed -n '89p' /usr/share/cobbler/web/settings.py
from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS

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

##下载get-pip.py
[root@localhost ~]# wget http://bootstrap.pypa.io/get-pip.py

--2019-05-28 17:48:55--  http://bootstrap.pypa.io/get-pip.py
Resolving bootstrap.pypa.io (bootstrap.pypa.io)... 151.101.24.175, 2a04:4e42:2e::175
Connecting to bootstrap.pypa.io (bootstrap.pypa.io)|151.101.24.175|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://bootstrap.pypa.io/get-pip.py [following]
--2019-05-28 17:48:56--  https://bootstrap.pypa.io/get-pip.py
Connecting to bootstrap.pypa.io (bootstrap.pypa.io)|151.101.24.175|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1709825 (1.6M) [text/x-python]
Saving to: ‘get-pip.py’

100%[=======================================================================>] 1,709,825   99.6KB/s   in 24s

2019-05-28 17:47:07 (69.8 KB/s) - ‘get-pip.py’ saved [1709825/1709825]

##调用本地python运行pip.py脚本
[root@localhost ~]# python get-pip.py
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after t
t date. A future version of pip will drop support for Python 2.7.Collecting pip
  Downloading https://files.pythonhosted.org/packages/5c/e0/be401c003291b56efc55aeba6a80ab790d3d4cece2778288d65323009420/pip-19.1.1-py2.py3-none-
y.whl (1.4MB)     |████████████████████████████████| 1.4MB 134kB/s
Collecting wheel
  Downloading https://files.pythonhosted.org/packages/bb/10/44230dd6bf3563b8f227dbf344c908d412ad2ff48066476672f3a72e174e/wheel-0.33.4-py2.py3-non
any.whlInstalling collected packages: pip, wheel
Successfully installed pip-19.1.1 wheel-0.33.4
##安装pip
[root@localhost ~]# pip install Django==1.8.9
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after t
t date. A future version of pip will drop support for Python 2.7.Collecting Django==1.8.9
  Downloading https://files.pythonhosted.org/packages/a7/a2/f4e7926062f5c61d98e87b9d0365ca1a0fab6be599dbea90ce2fab27f395/Django-1.8.9-py2.py3-non
any.whl (6.2MB)     |████████████████████████████████| 6.2MB 65kB/s
Installing collected packages: Django
  Found existing installation: Django 1.11.20
    Uninstalling Django-1.11.20:
      Successfully uninstalled Django-1.11.20
Successfully installed Django-1.8.9
##查看pip版本号
[root@localhost ~]# python -c "import django; print(django.get_version())"
1.8.9

4. 重启HTTP服务

[root@localhost ~]# systemctl restart httpd

5. 浏览器界面刷新即可

转载于:https://blog.51cto.com/10802692/2401673

Cobbler Web界面提示报错 “Internal Server Error”相关推荐

  1. Cobbler 登录web界面提示报错“Internal Server Error”

    在访问cobbler web界面到时候出现以下提示 ssl的报错日志如下: [root@Cobbler ~]# tail -f /var/log/httpd/ssl_error_log [Mon Ja ...

  2. Spring Boot连接MySQL报错“Internal Server Error”的解决办法

    报错信息如下: {timestamp: "2018-06-14T03:48:23.436+0000", status: 500, error: "Internal Ser ...

  3. RabbitMq安装Web界面插件报错

    RabbitMq安装Web界面插件报错 最近在安装rabbitmq-plugins的时候报了以下的错误,一直不知道什么原因,上网百度了很多,自己尝试了很多,总结下来就是这几步,希望可以给大家帮助: 错 ...

  4. 【转】nginx提示:500 Internal Server Error错误的解决方法

    [转]nginx提示:500 Internal Server Error错误的解决方法 参考文章: (1)[转]nginx提示:500 Internal Server Error错误的解决方法 (2) ...

  5. npm login 登录失败,报E500 Internal Server Error - PUT https://registry.npm.taobao.org/-/user/org.couchdb

    报错信息: npm ERR! code E500 npm ERR! 500 Internal Server Error - PUT https://registry.npm.taobao.org/-/ ...

  6. Laravel解决报错500 Server Error: .env.example将其复制一份重命名为env

    1.打开配置文件 laravel/config/app.php 2.找到 'debug'项 设置为 true 3.刷新网页 抛出运行异常:No application encryption key h ...

  7. Failed:(13: Permission denied)导致访问浏览器出现Nginx 500 Internal Server Error

    1 .问题 我在部署nginx反向代理服务器的时候,nginx.conf文件都配置好了,但是我在浏览器里面输入域名的时候,提示Nginx 500 Internal Server Error 2.分析 ...

  8. 本地wamp的Internal Server Error错误解决方法

    一.本地wamp下调试url重写,加入htaccess文件后提示:500 Internal Server Error ...,而删除这个文件网站又可以正常访问,其实就是没有开启url重写的功能.开启一 ...

  9. 解决 http 302 Internal Server Error

    最近遇到,测试环境和本地的接口请求都好好的,但是发布到正式环境就是报302 Internal Server Error,我当时很蒙B.一头雾水的我不知道怎么解决,改了路径,接口等等还是不能解决,然后用 ...

最新文章

  1. Linux 4.18 内核新补丁移除了Lustre 文件系统
  2. 977dh用vbs通过wsh创建桌面快捷方式,快速启动,修改ie主页的恶意代码 ...
  3. SMRT single molecular real time Sequencing
  4. 802.11b协议的一些介绍和说明
  5. SmartNIC/DPU — 应用场景与功能特性
  6. Service的线程、工作线程、权限及系统Service
  7. sscanf操作字符串和整型的区别
  8. Java实现获取HDFS子目录数量_Java实现读取HDFS目录
  9. 计算机网络之网络层:2、IP数据报、IP数据报分片
  10. 【Python】Python库之网络应用开发
  11. iOS开发中对NSArray或者NSMutableArray中的内容排序
  12. netty cpu 占用率 高_交换机CPU使用率高问题定位
  13. uniapp image图片切换动效_谷歌设计团队发布了一款动效神器,让 UI 和动效无缝打通...
  14. linux c++ opencv4安装指南
  15. excle表格导出到本地
  16. 产品经理如何写好一份简历
  17. 模拟人生java版攻略_模拟人生免费版简易攻略小技巧
  18. 歪门邪道 Leetcode 463 Island Perimeter
  19. 如何使用阿里云搭建自己的云主机(超详细)
  20. 数据挖掘第二章 认识数据

热门文章

  1. ubuntu15.04中安装mysql和mysql-workbench
  2. 基于FFT的信号频谱分析
  3. php中隐藏和展开文章,手机端第一屏页面文章的展开和隐藏_html/css_WEB-ITnose
  4. tensorflow+python flask进行手写识别_使用tensorflow进行手写数字识别
  5. OSI网络七层模型简明教程
  6. 用MsgWaitForMultipleObjects代替WaitForSingleObject和WaitForMultipleObjects()
  7. linux lynx 源码,Lynx字符浏览器移植
  8. WINDOWS下对音频的处理过程(转)
  9. linux进去网卡,Linux上使用socket进行网卡抓包
  10. 来伊份与第四范式宣布战略合作 携手打造智慧零售新范本