开发者
我要评分
获取效率
正确性
完整性
易理解
在线提单
论坛求助

Horizon web页面登录出错问题

问题现象描述

Horizon Web登录失败。

关键过程、根本原因分析

“/var/log/httpd/openstack-dashboard-error_log”有如下日志:

 [wsgi:error] [pid 600967:tid 601105] [remote 192.255.5.10:13113] INFO openstack_auth.forms Login successful for user "admin" using domain "default", remote address 192.255.5.10.
 [wsgi:error] [pid 600967:tid 601105] [remote 192.255.5.10:13113] ERROR django.request Internal Server Error: /dashboard/auth/login/
......
 [wsgi:error] [pid 600967:tid 601105] [remote 192.255.5.10:13113] RuntimeError: Unable to create a new session key. It is likely that the cache is unavailable.

从日志上看已经登录成功,但是页面没有正常跳转,session cache异常。

结论、解决方案及效果

  1. 检查“/etc/openstack-dashboard/local_settings”的如下配置是否正确。
    OPENSTACK_HOST = "controller"  
    SESSION_ENGINE = 'django.contrib.sessions.backends.cache'  
    CACHES = {  
    'default': {
           'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
           'LOCATION': 'controller:11211',
          }  
    }

    controller为控制节点主机名。

  2. 检查“/etc/sysconfig/memcached”的如下配置是否正确。
    OPTIONS="-l 127.0.0.1,::1,controller"

    controller为控制节点主机名。

  3. 重启服务。
    1
    systemctl restart httpd.service memcached.service