---
title: Horizon登录异常的解决方法
description: "1. 登录Horizon WebUI时出现异常。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengcpfs/troubleshooting/trouble/kunpengopenstackstein_09_0005.html
sourcePath: /source/zh/kunpengcpfs/troubleshooting/trouble/kunpengopenstackstein_09_0005.html
indexId: f792a38f26e1c39e72516c57f8af0cb431de17ee3f3f993ca6450ef8367ef15081
---
# Horizon登录异常的解决方法

#### 问题现象描述

1. 登录Horizon WebUI时出现异常。
2. 执行cat /var/log/httpd/error_log命令时提示以下信息。

```
RuntimeError: Unable to create a new session key. It is likely that the cache is unavailable.
```


#### 关键过程、根本原因分析

无法创建新的session key，cache不可用。


#### 结论、解决方案及效果

1. 修改dashboard中SESSION_ENGINE的配置。打开配置文件：

```
vim /etc/openstack-dashboard/local_settings
```


2. 在配置文件中将存储方式由cache改为file。
  在配置文件中找到以下内容：

```
SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
```


  修改为如下信息：

```
SESSION_ENGINE = 'django.contrib.sessions.backends.file'
```


3. 重启服务。

```
systemctl restart httpd.service memcached.service
```
