Rate This Document
Findability
Accuracy
Completeness
Readability

Horizon Login Exceptions

Symptom

  1. An error is reported when logging in to the Horizon WebUI.
  2. When you run the cat /var/log/httpd/error_log command, the following information is displayed:
    RuntimeError: Unable to create a new session key. It is likely that the cache is unavailable.

Key Process and Cause Analysis

The session key cannot be created and the cache is unavailable.

Conclusion and Solution

  1. Modify the configuration of SESSION_ENGINE in the dashboard. Open the configuration file:
    vim /etc/openstack-dashboard/local_settings
  2. In the configuration file, change the storage mode from cache to file.
    Find the following content in the configuration file:
    SESSION_ENGINE = 'django.contrib.sessions.backends.cache'

    Modify the content as follows:

    SESSION_ENGINE = 'django.contrib.sessions.backends.file'
  3. Restart the service.
    systemctl restart httpd.service memcached.service