Ask Your Question
1

Unable to Login to Openstack Dashboard (Havana) [closed]

asked 2013-10-22 08:05:33 -0500

Nikita gravatar image

updated 2013-10-23 03:12:07 -0500

Hi There,

I have installed openstack controller on CentoS 6.4. All the components seem to be working well, unless I login to Openstack Dashboard.

I am getting the following error in my httpd/error_log file:

[error] DeprecationWarning: Translations in the project directory aren't supported anymore. Use the LOCALE_PATHS setting instead.DeprecationWarning: Authentication backends without a `supports_inactive_user` attribute are deprecated. Please define it in <class 'openstack_auth.backend.KeystoneBackend'>.DeprecationWarning: BaseException.message has been deprecated as of Python 2.6Login failed for user "admin".

Following is the status of the services:

[root@openstackvm2 ~]# nova-manage service list
Binary           Host                                 Zone             Status     State Updated_At
nova-consoleauth openstackvm2.smgr.com                internal         enabled    :-)   2013-10-22 12:49:28
nova-scheduler   openstackvm2.smgr.com                internal         enabled    :-)   2013-10-22 12:49:28
nova-conductor   openstackvm2.smgr.com                internal         enabled    :-)   2013-10-22 12:49:28
nova-cert        openstackvm2.smgr.com                internal         enabled    :-)   2013-10-22 12:49:28
nova-compute     openstackvm5.smgr.com                nova             enabled    :-)   2013-10-22 12:49:30
nova-network     openstackvm5.smgr.com                internal         enabled    XXX   2013-10-22 12:48:18
nova-network     openstackvm2.smgr.com                internal         enabled    XXX   2013-10-22 10:46:24

================================================================

[root@openstackvm2 ~]# nova-manage version
2013.2-2.el6

================================================================ Keystone Seems to work as expected:

------------------------------------------------
[root@openstackvm2 ~]# keystone --os-username=admin --os-password=root123 --os-auth-url=http://openstackvm2:35357/v2.0 token-get
+----------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Property |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Value                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
+----------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| expires  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 2013-10-23T12:55:14Z                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
|    id    | MIIC8QYJKoZIhvcNAQcCoIIC4jCCAt4CAQExCTAHBgUrDgMCGjCCAUcGCSqGSIb3DQEHAaCCATgEggE0eyJhY2Nlc3MiOiB7InRva2VuIjogeyJpc3N1ZWRfYXQiOiAiMjAxMy0xMC0yMlQxMjo1NToxNC43MTI1NjUiLCAiZXhwaXJlcyI6ICIyMDEzLTEwLTIzVDEyOjU1OjE0WiIsICJpZCI6ICJwbGFjZWhvbGRlciJ9LCAic2VydmljZUNhdGFsb2ciOiBbXSwgInVzZXIiOiB7InVzZXJuYW1lIjogImFkbWluIiwgInJvbGVzX2xpbmtzIjogW10sICJpZCI6ICI3ZjVkM2JiNWUzNzA0MGFmYTkxODI4OTgyMzA2N2E0NSIsICJyb2xlcyI6IFtdLCAibmFtZSI6ICJhZG1pbiJ9LCAibWV0YWRhdGEiOiB7ImlzX2FkbWluIjogMCwgInJvbGVzIjogW119fX0xggGBMIIBfQIBATBcMFcxCzAJBgNVBAYTAlVTMQ4wDAYDVQQIDAVVbnNldDEOMAwGA1UEBwwFVW5zZXQxDjAMBgNVBAoMBVVuc2V0MRgwFgYDVQQDDA93d3cuZXhhbXBsZS5jb20CAQEwBwYFKw4DAhowDQYJKoZIhvcNAQEBBQAEggEAcqXyH-hGrkNxibdfh4DgZKaFI2js-zjcqVrSaps1fecgKS9zcAOVPmR2QfGEwVg3Gz-Qt89SWtZlrNVhqNnO3uTQEp-ljhnov9eWpeiYE8zH5pp-Q1Gv-N0zb6EZ627-eLYMgkMv74bCL5bx-wAQIO6IICDcbrzj7326Jp+NWZZkt53xof4-WZ4o080Apx9qNk8JUGp872Qq-98wRZJeLG-y+77CqWeBNxFJzuKYpcxpVGCbzUB-Lj0x2nRFNpC3Xmuo7tKQQtpU4copIJyNZxZ1dR0rTPTi9RB-3pxIxYY9cZbhHdP6pbm4SdJ-fCWQK9P27ddmoUfSofr1HAAjvA== |
| user_id  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           7f5d3bb5e37040afa918289823067a45                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
+----------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
[root@openstackvm2 ~]#

[root@openstackvm2 ~]# keystone user-list
+----------------------------------+--------+---------+--------------------+
|                id                |  name  | enabled |       email        |
+----------------------------------+--------+---------+--------------------+
| 7f5d3bb5e37040afa918289823067a45 | admin  |   True  | admin@example.com  |
| 01ef45d843a14f1b91b6a99ff3cf6dd5 | glance |   True  | glance@example.com |
| cce3e43cf7524a59bd4a875f91bbbf29 |  nova  |   True  |  nova@example.com  |
+----------------------------------+--------+---------+--------------------+

[root@openstackvm2 ~]#

================================================================================

/etc/openstack-dashboard/local_settings

import os

from django.utils.translation import ugettext_lazy as _

from openstack_dashboard import exceptions

DEBUG = False
TEMPLATE_DEBUG = DEBUG

# Required for Django 1.5.
# If horizon is running in production (DEBUG is False), set this
# with the list of host/domain names that the application can serve.
# For more information see:
# https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
#ALLOWED_HOSTS = ['localhost','.smgr.com.']

# Set SSL proxy settings:
# For Django 1.4+ pass this header from the proxy after terminating the SSL,
# and don't forget to strip it from the client's request.
# For more information see:
# https://docs.djangoproject.com/en/1.4/ref/settings/#secure-proxy-ssl-header
# SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTOCOL', 'https')

# If Horizon is being served through SSL, then uncomment the following two
# settings to better secure the cookies from security exploits
#CSRF_COOKIE_SECURE = True
#SESSION_COOKIE_SECURE = True

# Overrides for OpenStack API versions. Use this setting to force the
# OpenStack dashboard to use a specfic API version for a given service API.
# NOTE: The version should be formatted as it appears in the URL for the
# service API. For example, The identity service APIs have inconsistent
# use of the decimal point, so valid options would be "2.0" or "3".
# OPENSTACK_API_VERSIONS = {
#     "identity": 3
# }

# Set this to True if running on multi-domain model. When this is enabled, it
# will require user to enter the Domain name in addition to username for login.
# OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = False

# Overrides the default domain used when running on single-domain model
# with Keystone V3. All entities will be created in the default domain.
# OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = 'Default ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by dheeru
close date 2013-12-03 08:32:28.867154

5 answers

Sort by ยป oldest newest most voted
5

answered 2013-10-24 02:24:21 -0500

Nikita gravatar image

The issue is resolved. I had to change the following lines in /etc/openstack-dashboard/local_settings:

OPENSTACK_HOST = "172.16.17.3"
OPENSTACK_KEYSTONE_URL = "http://%s:5000/v2.0" % OPENSTACK_HOST
OPENSTACK_KEYSTONE_DEFAULT_ROLE = "admin"

PS: Had to change the OPENSTACK_KEYSTONE_DEFAULT_ROLE from "Member" to "admin" and it solved the problem.

Thank you all for helping on this.

Cheers, Nikita

edit flag offensive delete link more

Comments

1

Please open the separate request and will address your issue.

dheeru gravatar imagedheeru ( 2013-12-03 08:32:08 -0500 )edit

Issue got fixed by following comments below and so added my answer below, yesterday.

thota gravatar imagethota ( 2013-12-03 23:05:35 -0500 )edit

Hi, Thank you so much, I had a similar error and this helped

Deepak gravatar imageDeepak ( 2013-12-16 14:46:16 -0500 )edit

let me know how to see the full message

levitoh gravatar imagelevitoh ( 2014-01-22 16:04:20 -0500 )edit
3

answered 2013-10-23 09:19:19 -0500

simone.tiraboschi gravatar image

I think that you can have some troubles the configuration of SELinux. Have you already tried to completely disable SELinux?

Please write

#SELINUX=enforcing 
SELINUX=disabled

in /etc/selinux/config and than reboot the controller node; if, after that, you can login in the dashboard, you definitely have some troubles with the configuration on SELinux.

ciao

edit flag offensive delete link more

Comments

when hitting selinux issues, please file a bug. please append /var/log/audit/audit.log containing the corresponding "denied" messages. Thanks.

mrunge gravatar imagemrunge ( 2013-12-04 01:47:32 -0500 )edit
0

answered 2013-10-22 13:14:59 -0500

Try to change debug=True in /etc/openstack-dashboard/local_settings then restart httpd and memcached.

edit flag offensive delete link more
0

answered 2013-12-03 04:37:40 -0500

thota gravatar image

I encountered exactly the same issue while on RHEL-6.4. I could get rid off the issue by disabling SELINUX and modifying OPENSTACK_KEYSTONE_DEFAULT_ROLE as mentioned above. Thank you all for your help.

edit flag offensive delete link more
0

answered 2013-10-22 10:09:51 -0500

jpichon gravatar image

What is the error when you log into Horizon? Are you getting an error 500? On the login page or after logging in? Is there any additional information in any of the httpd error logs?

I noticed ALLOWED_HOSTS in the dashboard settings is still commented out, you might want to remove the leading pound sign (#) and restart httpd.

The deprecation warnings should be inoffensive. If this is a test environment, you could also consider setting DEBUG to True to try and get more information.

edit flag offensive delete link more

Comments

" can't login to dashboard: An error occurred authenticating. Please try again later." This is the error on the Dashboard UI. I was unable to access the UI from the windows system I was using to access the openstack dashboard and hence had to comment the ALLOWED_HOST entry (After which I was able to get the dashboard and hit next issue of authentication failure message.) Is it mandatory to have it set?? PS: I was able to access the UI from the controller machine though when ALLOWED_HOST was set to localhost. Is there anything I could look at to check the authentication failure problem?

Nikita gravatar imageNikita ( 2013-10-22 11:26:34 -0500 )edit

When using Django 1.5, the ALLOWED_HOSTS is required although I don't think it would cause error 500. It's not needed when DEBUG is True so you could change this variable to help with debugging - you should then see the error traceback in the browser, which should help understanding the problem

jpichon gravatar imagejpichon ( 2013-10-22 17:33:40 -0500 )edit

Check if nova api is running

sngirame gravatar imagesngirame ( 2013-10-22 23:08:32 -0500 )edit

Nova api is running. Attached the log entries from the api.log in the above post. I have also attached the error_log entries above. Please refer, and suggest ways to overcome the issue. I have also tried resetting the admin password as follows: keystone user-password-update --pass root123 7f5d3bb5e37040afa918289823067a45

Nikita gravatar imageNikita ( 2013-10-23 03:16:58 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

4 followers

Stats

Asked: 2013-10-22 08:05:33 -0500

Seen: 17,006 times

Last updated: Dec 03 '13