OpenStack Ansible dashboard not able to log in with admin credentials
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack-Ansible |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Problem Description:
After deploying OSA on a single node, when I log in to Horizon dashboard with admin credentials, I get the following error:
You do not have permission to access the resource: /project/
Login as different user or go back to home page
However, after attempting to log in one more time, I get the following error in my browser:
Environment:
Request Method: GET
Request URL: https:/
Django Version: 1.11.14
Python Version: 2.7.15
Installed Applications:
['openstack_
'heat_dashboard',
'openstack_
'openstack_
'openstack_
'openstack_
'django.
'django.
'django.
'django.
'django.
'django.
'django_pyscss',
'openstack_
'compressor',
'horizon',
'openstack_auth']
Installed Middleware:
('django.
'django.
'django.
'django.
'horizon.
'django.
'horizon.
'horizon.
'django.
'django.
'openstack_
'openstack_
Template error:
In template /openstack/
coercing to Unicode: need string or buffer, NoneType found 1 : {% load branding horizon i18n %}
2 :
3 : <nav id='sidebar'>
4 : {% horizon_nav %}
5 : </nav>
6 :
Traceback:
File "/openstack/
41. response = get_response(
File "/openstack/
217. response = self.process_
File "/openstack/
215. response = response.render()
File "/openstack/
107. self.content = self.rendered_
File "/openstack/
84. content = template.
File "/openstack/
66. return self.template.
File "/openstack/
207. return self._render(
File "/openstack/
199. return self.nodelist.
File "/openstack/
990. bit = node.render_
File "/openstack/
957. return self.render(
File "/openstack/
177. return compiled_
File "/openstack/
199. return self.nodelist.
File "/openstack/
990. bit = node.render_
File "/openstack/
957. return self.render(
File "/openstack/
72. result = block.nodelist.
File "/openstack/
990. bit = node.render_
File "/openstack/
957. return self.render(
File "/openstack/
72. result = block.nodelist.
File "/openstack/
990. bit = node.render_
File "/openstack/
957. return self.render(
File "/openstack/
216. return template.
File "/openstack/
209. return self._render(
File "/openstack/
199. return self.nodelist.
File "/openstack/
990. bit = node.render_
File "/openstack/
957. return self.render(
File "/openstack/
225. _dict = self.func(
File "/openstack/
74. panel.can_
File "/openstack/
149. return self.allowed(
File "/openstack/
158. return self._can_
File "/openstack/
170. if policy_
File "/openstack/
148. enforcer = _get_enforcer()
File "/openstack/
57. if os.path.
File "/usr/lib/
37. st = os.stat(path)
Exception Type: TypeError at /project/
Exception Value: coercing to Unicode: need string or buffer, NoneType found
At the same time, /var/log/
[Wed Nov 07 15:05:03.981014 2018] [wsgi:info] [pid 29639:tid 139700208445184] [remote 172.29.
[Wed Nov 07 15:05:04.633442 2018] [wsgi:error] [pid 29639:tid 139700208445184] WARNING:
[Wed Nov 07 15:05:04.855255 2018] [wsgi:error] [pid 29639:tid 139700082554624] Internal Server Error: /project/
[...followed by the same error shown by the browser (shown above) until...]
[TypeError: coercing to Unicode: need string or buffer, NoneType found]
[and then followed by]
[Wed Nov 07 15:05:05.744533 2018] [wsgi:error] [pid 29645:tid 139700082554624] Not Found: /favicon.ico
However, this file 'favicon.ico' is where it needs to be, i.e., at the following locations in the horizon container:
/openstack/
/openstack/
/openstack/
/openstack/
It seems to me that the admin does not have permission to access the resources?
The admin credentials are correct and the role assignments of projects and domains are default (default by OSA depoloyment).
I have tried to re-run the keystone and horizon setup playbooks but the error persists.
I have also created another user account with a separate project and role. The error still persists.
*******
************* Update *************
*******
This error is not just related to favicon.ico. After turning on Django debugging and logging the actual request made to the WSGI server, I found that this happens with other urls as well.
When the url is 'https:/
[Tue Nov 27 13:40:53.325259 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325285 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325289 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325292 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325296 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325299 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325302 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325305 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325308 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325310 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325313 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325316 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325319 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325322 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325325 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325328 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325330 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325333 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325336 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325348 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325351 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325354 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325356 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325359 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325362 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325365 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325368 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325371 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325374 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325377 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325379 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325382 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325385 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325388 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325391 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325393 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325396 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325399 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325402 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325405 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325408 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325413 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325416 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325419 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325421 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325424 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325427 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325430 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325433 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325436 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325438 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325441 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325444 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325447 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325450 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325453 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325455 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325458 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325461 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325464 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325467 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325470 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325476 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325479 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325482 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325485 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325488 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325490 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
[Tue Nov 27 13:40:53.325493 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.
*******
************ Update 2 ************
*******
If I refresh the error page (https:/
Here's a screenshot:
https:/
The error comes up for the first visit to each new URL, and if I refresh it a few times, I receive the actual page. For example, when I selected the Flavors tab under Admin, the url became https:/
The pages work even after I logout and then log in again. If I restart the horizon with:
service apache2 restart
then it starts all over again and I keep receiving this error until I refresh the page a couple of times (roughly 7-12).
All of this is very strange to me tbh.
Additional info:
OS = Ubuntu 18.04.1 LTS
python version = 2.7.15
-------
Release: on 2018-11-01 10:24
SHA: fa2497ff3faac34
Source: https:/
URL: https:/
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
Can you please try running this again?
openstack-ansible os-horizon- install. yml