Ask Your Question
0

Unable to login to horizon

asked 2016-12-14 20:12:07 -0600

rvinkovic gravatar image

Hello everyone,

I'm following ubuntu 16.04 guide for openstack newton and everything is working except I can't login to horizon through browser. If i try to login with:

default admin password

I get Invalid Credentials.

admin_openrc have same password and username and everything works.

/var/log/apache2/error.log

[Thu Dec 15 02:59:34.020238 2016] [wsgi:error] [pid 23628:tid 140123614537472] DEBUG:keystoneauth.session:Request returned failure status: 404
[Thu Dec 15 02:59:34.021453 2016] [wsgi:error] [pid 23628:tid 140123614537472] Login failed for user "admin"

.

var/log/apache2/keystone_acces.log
10.0.0.11 - - [15/Dec/2016:03:59:12 +0100] "GET /v3/auth/tokens HTTP/1.1" 200 3474 "-" "python-keystoneclient"
combine

openstack user list

    +----------------------------------+---------+
    | ID                               | Name    |
    +----------------------------------+---------+
    | 1229dd94c8914430b60ce910edb3af43 | glance  |
    | 1e87150766544378b6cd8e33cfb3f843 | neutron |
    | 491a5f6c651f4e38b57eac9e61b0de93 | admin   |
    | 82e6f41c4ae54dcfab716b955168c423 | nova    |
    | e677b5e212054630814e96b349b79185 | demo    |
    +----------------------------------+---------+

openstack domain list

+---------+---------+---------+--------------------+
| ID      | Name    | Enabled | Description        |
+---------+---------+---------+--------------------+
| default | Default | True    | The default domain |
+---------+---------+---------+--------------------+

/etc/openstack-dashboard/local_settings.py.bak

import os
from django.utils.translation import ugettext_lazy as _
from horizon.utils import secret_key
from openstack_dashboard import exceptions
from openstack_dashboard.settings import HORIZON_CONFIG
DEBUG = True
WEBROOT = '/'
LOCAL_PATH = os.path.dirname(os.path.abspath(__file__))
SECRET_KEY = secret_key.generate_or_read_from_file('/var/lib/openstack-dashboard/secret_key')
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
TIME_ZONE="UTC"
OPENSTACK_HOST = "controller"
OPENSTACK_KEYSTONE_URL = "http://%s:5000/v3.0" % OPENSTACK_HOST
OPENSTACK_KEYSTONE_DEFAULT_ROLE = "user"
OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True
OPENSTACK_API_VERSIONS = {
    "identity": 3,
    "image": 2,
    "volume": 2,
}
OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = "default"
OPENSTACK_NEUTRON_NETWORK = {
    'enable_router': False,
    'enable_quotas': False,
    'enable_ipv6': False,
    'enable_distributed_router': False,
    'enable_ha_router': False,
    'enable_lb': False,
    'enable_firewall': False,
    'enable_vpn': False,
    'enable_fip_topology_check': False,
}
OPENSTACK_KEYSTONE_BACKEND = {
    'name': 'native',
    'can_edit_user': True,
    'can_edit_group': True,
    'can_edit_project': True,
    'can_edit_domain': True,
    'can_edit_role': True,
}
OPENSTACK_HYPERVISOR_FEATURES = {
    'can_set_mount_point': False,
    'can_set_password': False,
    'requires_keypair': False,
    'enable_quotas': True
}
OPENSTACK_CINDER_FEATURES = {
    'enable_backup': False,
}
OPENSTACK_HEAT_STACK = {
    'enable_user_pass': True,
}
IMAGE_CUSTOM_PROPERTY_TITLES = {
    "architecture": _("Architecture"),
    "kernel_id": _("Kernel ID"),
    "ramdisk_id": _("Ramdisk ID"),
    "image_state": _("Euca2ools state"),
    "project_id": _("Project ID"),
    "image_type": _("Image Type"),
}
IMAGE_RESERVED_CUSTOM_PROPERTIES = []
API_RESULT_LIMIT = 1000
API_RESULT_PAGE_SIZE = 20
SWIFT_FILE_TRANSFER_CHUNK_SIZE = 512 * 1024
INSTANCE_LOG_LENGTH = 35
DROPDOWN_MAX_ITEMS = 30
TIME_ZONE = "UTC"
LOGGING = {
    'version': 1,
    # When set to True this will disable all logging except
    # for loggers specified in this configuration dictionary. Note that
    # if nothing is specified here and disable_existing_loggers is True,
    # django.db.backends will still log unless it is disabled explicitly.
    'disable_existing_loggers': False,
    'formatters': {
        'operation': {
            # The format of "%(message)s" is defined by
            # OPERATION_LOG_OPTIONS['format']
            'format': '%(asctime)s %(message)s'
        },
    },
    'handlers': {
        'null': {
            'level': 'DEBUG',
            'class': 'logging.NullHandler',
        },
        'console': {
            # Set the level to "DEBUG" for verbose output logging.
            'level': 'INFO',
            'class': 'logging.StreamHandler',
        },
        'operation': {
            'level': 'INFO',
            'class': 'logging.StreamHandler',
            'formatter': 'operation',
        },
    },
    'loggers': {
        # Logging from django.db.backends is VERY verbose, send to null
        # by default.
        'django.db.backends': {
            'handlers': ['null'],
            'propagate': False,
        },
        'requests': {
            'handlers': ['null'],
            'propagate': False,
        },
        'horizon': {
            'handlers': ['console'],
            'level': 'DEBUG',
            'propagate': False,
        },
        'horizon.operation_log': {
            'handlers': ['operation'],
            'level': 'INFO',
            'propagate': False,
        },
        'openstack_dashboard': {
            'handlers': ['console'],
            'level': 'DEBUG',
            'propagate': False,
        },
        'novaclient': {
            'handlers': ['console'],
            'level': 'DEBUG',
            'propagate': False,
        },
        'cinderclient': {
            'handlers': ['console'],
            'level': 'DEBUG',
            'propagate': False,
        },
        'keystoneclient': {
            'handlers': ['console'],
            'level': 'DEBUG',
            'propagate': False,
        },
        'glanceclient': {
            'handlers': ['console'],
            'level': 'DEBUG',
            'propagate': False,
        },
        'neutronclient': {
            'handlers': ['console'],
            'level': 'DEBUG',
            'propagate': False,
        },
        'heatclient': {
            'handlers': ['console'],
            'level': 'DEBUG',
            'propagate': False,
        },
        'ceilometerclient': {
            'handlers': ['console'],
            'level': 'DEBUG',
            'propagate': False,
        },
        'swiftclient ...
(more)
edit retag flag offensive close merge delete

5 answers

Sort by ยป oldest newest most voted
1

answered 2017-03-02 23:50:05 -0600

MonsieurWilson gravatar image

First, try to comment the line SESSION_ENGINE = 'django.contrib.sessions.backends.cache'.

If that doesn't help, then try to use CONTROLLER_NODE_IP instead of controller here:

CACHES = {
    'default': {
         'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
         'LOCATION': 'controller:11211',
    }
}
edit flag offensive delete link more

Comments

Did you fix this issue? I am having the same problem right now :/

ShubhamMeshram gravatar imageShubhamMeshram ( 2017-03-03 03:59:49 -0600 )edit

Commenting out SESSION_ENGINE fixed my problem, unfortunately this has been recommended in Installation Guide. Someone need to update Installation guide?

Rajab gravatar imageRajab ( 2018-02-15 10:19:54 -0600 )edit
0

answered 2017-03-03 03:54:28 -0600

ShubhamMeshram gravatar image

Did you fix this issue? I am having the same problem right now :/

edit flag offensive delete link more

Comments

I am using OCATA, this helped

"comment the line SESSION_ENGINE = 'django.contrib.sessions.backends.cache'. " Give it a shot, I think question is Session Engine is a recommended OCATA configuration, I am not sure why it doesnt work.

Rajab gravatar imageRajab ( 2018-02-15 10:18:22 -0600 )edit
0

answered 2017-08-20 07:32:25 -0600

amotoki gravatar image

I am not sure what "ubuntu 16.04 guide for openstack newton" suggests, but it seems you try to run keystone and horizon on a single apache httpd server. If so, horizon and keystone access needs to be distinguishable.

Looking at /etc/openstack-dashboard/local_settings.py.bak, "WEBROOT" is "/". I think you need to locate the horizon URL under /dashboard (for example). To do this, "WEBROOT" needs to be "/dashboard/" and you also need to set WSGIScriptAlias appropriately like "WSGIScriptAlias /dashboard /opt/stack/horizon/openstack_dashboard/wsgi/django.wsgi" (this is quoted from devstack, so the patch will be different)

edit flag offensive delete link more
0

answered 2017-07-07 02:41:18 -0600

cloudadmin gravatar image

I have the same problem with Ocata (Vanilla). How do you fix that guys?

edit flag offensive delete link more

Comments

OCATA here, cmmenting out SESSION_ENGINE worked for me

Rajab gravatar imageRajab ( 2018-02-15 10:20:40 -0600 )edit
0

answered 2017-03-03 08:20:05 -0600

I at one time broke my dashboard as well. this post may be useful...

https://ask.openstack.org/en/question...

edit flag offensive delete link more

Comments

Commenting the Session_engine line worked just fine for me. Thanks a lot I have been stuck with this error for days

ShubhamMeshram gravatar imageShubhamMeshram ( 2017-03-03 09:20:25 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2016-12-14 20:12:07 -0600

Seen: 3,445 times

Last updated: Aug 20 '17