Dashboard in Installation Guide for Centos7 - Newton

Bug #1653842 reported by Luis Caballero
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
openstack-manuals
Triaged
Medium
Unassigned

Bug Description

I found an error with this procedure,

[Wed Jan 04 00:23:25.383264 2017] [:error] [pid 2510] Login successful for user "admin".
[Wed Jan 04 00:23:30.095217 2017] [:error] [pid 2510] Internal Server Error: /dashboard/auth/login/
[Wed Jan 04 00:23:30.095533 2017] [:error] [pid 2510] RuntimeError: Unable to create a new session key. It is likely that the cache is unavailable.

 and I had to modify a configuration file /etc/sysconfig/memcached

OPTIONS="-l 0.0.0.0,::1"

then

systemctl restart memcached.service

it solved my problem.

Regards,
Luis Caballero

-----------------------------------
Release: 0.1 on 2017-01-03 09:04
SHA: c87b123b431575afe22c91f40c4f2b4b4ffd47fb
Source: http://git.openstack.org/cgit/openstack/openstack-manuals/tree/doc/install-guide/source/horizon.rst
URL: http://docs.openstack.org/newton/install-guide-rdo/horizon.html

Revision history for this message
Alexandra Settle (alexandra-settle) wrote :

Hi Luis,

Thanks for submitting this bug. We will need to verify these actions on more than one instance as this might be your personal environment setup.

I'll try and verify this later today :)

Cheers,

Alex

Changed in openstack-manuals:
importance: Undecided → Low
Revision history for this message
Geo (geom) wrote :

I had similar problem with Dashboard installation.
Main cause: Installation guide doesn't contain settings for Memcached.

I also changed setting in /etc/sysconfig/memcached
from: OPTIONS="-l 127.0.0.1,::1"
to: OPTIONS="-l 127.0.0.1,::1,controller"
This helped.

Geom

Revision history for this message
Rob Cresswell (robcresswell-deactivatedaccount) wrote :

Hmm. I don't know if this is CentOS specific, or if memcached has changed default settings, but by default it usually listens for local requests on port 11211. Since the guide specifically states "This section describes how to install and configure the dashboard on the controller node.", then as long as Horizon is also configured correctly to use the local memcached, you shouldn't need to change any other settings.

Changed in openstack-manuals:
status: New → Incomplete
Revision history for this message
Geo (geom) wrote :

Of course, memcached is listening on port 11211, but the port number is not the problem.
Openstack services are configured to access memcached on controller:11211, while memcached is listening on 127.0.0.1:11211.
Since host "controller" will be substituted by IP address 10.0.0.11 (see chapter "Configure name resolution" on http://docs.openstack.org/newton/install-guide-rdo/environment-networking-controller.html) we have a difference.
10.0.0.11:11211 is not equal to 127.0.0.1:11211

Revision history for this message
Rob Cresswell (robcresswell-deactivatedaccount) wrote :

Right, but the distinction is between 0.0.0.0 and localhost. The install guide gives the installation in the context of Horizon being on the controller node ("This section describes how to install and configure the dashboard on the controller node" as I said before), so its correct for Horizon to interact with memcached locally (i.e. via local/127.0.0.1).

If your dashboard isn't on the controller, then yes, you would need to open externally. All 0.0.0.0 is doing is saying to listen to all traffic on that port, instead of local. But thats not in the scope of the install guide, I think.

Revision history for this message
Geo (geom) wrote :

I installed Openstack step by step as described in the Installation Guide for CentOS.
So, my Horizon is installed on the controller.
Theoretically, "localhost" (127.0.0.1) is a good choice for intra-node communication.
Actually, Horizon doesn't use 127.0.0.1 to communicate with Memcached.
Horizon was configured to use "controller" (10.0.0.11) for that purpose.
See setting "'LOCATION': 'controller:11211'" in /etc/openstack-dashboard/local_settings.

I can only repeat that Horizon didn't work in my environment with default Memcached settings in /etc/sysconfig/memcached.
Sorry, if nobody can reproduce this issue.

Revision history for this message
Rob Cresswell (robcresswell-deactivatedaccount) wrote :

https://github.com/openstack/horizon/blob/master/openstack_dashboard/local/local_settings.py.example#L134

The default setting for Horizon is to use localhost. If you or the packager has modified it, then it will break. If the doc says to use your external IP, instead of localhost, that is also incorrect. However, opening up memcached to external requests is not the correct answer. It should not require using 0.0.0.0 and restarting.

Revision history for this message
Geo (geom) wrote :

1.
Ok, I see github source has setting '127.0.0.1:11211'.
But the issue is not about OpenStack itself.
Problem is originated from Installation Guide.
Explicitly it is here:
http://docs.openstack.org/newton/install-guide-rdo/horizon-install.html#install-and-configure-components
Default setting is changed to 'controller:11211'
It is current online version.

2.
The fix OPTIONS="-l 0.0.0.0,::1" was proposed by the issue originator (2017-01-04).
My fix OPTIONS="-l 127.0.0.1,::1,controller" was posted later, in 2017-01-17 report.
I also think, 0.0.0.0 is not correct.
Maybe it would be more correct to return default setting '127.0.0.1:11211' for Horizon in Installation Guide?

Revision history for this message
Geo (geom) wrote :

Bug #1661175 reported by Martin Wendt on 2017-02-02 is a duplicate of this issue.

Revision history for this message
Gauvain Pocentek (gpocentek) wrote :

This problem is fixed in master and should be backported for newton : https://review.openstack.org/#/c/430870/

FYI, installing memcached from the CentOS repo or from RDO results in a different setup of the service (listening on 0.0.0.0 or on 127.0.0.1).

Changed in openstack-manuals:
status: Incomplete → Triaged
importance: Low → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.