OpenStack dashboard无法访问
参照https://github.com/mseknibilel/OpenStack-Grizzly-Install-Guide安装Havana后dashboard无法访问,查看apache日志,发现:
Unauthorized: Unauthorized (HTTP 401)
Internal Server Error: /horizon/admin/
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 115, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python2.7/dist-packages/horizon/decorators.py", line 38, in dec
return view_func(request, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/horizon/decorators.py", line 86, in dec
return view_func(request, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/horizon/decorators.py", line 54, in dec
return view_func(request, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/horizon/decorators.py", line 38, in dec
return view_func(request, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/horizon/decorators.py", line 86, in dec
return view_func(request, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py", line 68, in view
return self.dispatch(request, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py", line 86, in dispatch
return handler(request, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/horizon/tables/views.py", line 155, in get
handled = self.construct_tables()
File "/usr/lib/python2.7/dist-packages/horizon/tables/views.py", line 146, in construct_tables
handled = self.handle_table(table)
File "/usr/lib/python2.7/dist-packages/horizon/tables/views.py", line 118, in handle_table
data = self._get_data_dict()
File "/usr/lib/python2.7/dist-packages/horizon/tables/views.py", line 182, in _get_data_dict
self._data = {self.table_class._meta.name: self.get_data()}
File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/admin/overview/views.py", line 59, in get_data
data = super(GlobalOverview, self).get_data()
File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/usage/views.py", line 29, in get_data
self.usage.get_limits()
File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/usage/base.py", line 178, in get_limits
self.get_neutron_limits()
File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/usage/base.py", line 147, in get_neutron_limits
api.neutron.is_security_group_extension_supported(self.request)
File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/api/neutron.py", line 761, in is_security_group_extension_supported
return is_extension_supported(request, 'security-group')
File "/usr/lib/python2.7/dist-packages/horizon/utils/memoized.py", line 33, in __call__
value = self.func(*args)
File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/api/neutron.py", line 741, in is_extension_supported
extensions = list_extensions(request)
File "/usr/lib/python2.7/dist-packages/horizon/utils/memoized.py", line 33, in __call__
value = self.func(*args)
File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/api/neutron.py", line 732, in list_extensions
extensions_list = neutronclient(request).list_extensions()
File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 108, in with_params
ret = self.function(instance, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 286, in list_extensions
return self.get(self.extensions_path, params=_params)
File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 1183, in get
headers=headers, params=params)
File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 1168, in retry_request
headers=headers, params=params)
File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 1103, in do_request
resp, replybody = self.httpclient.do_request(action, method, body=body)
File "/usr/lib/python2.7/dist-packages/neutronclient/client.py", line 188, in do_request
self.authenticate()
File "/usr/lib/python2.7/dist-packages/neutronclient/client.py", line 224, in authenticate
token_url = self.auth_url + "/tokens"
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
问题原因:keystone enpoints 配置不对
# keystone endpoint-list
+----------------------------------+-----------+----------------------------------------------+----------------------------------------------+----------------------------------------------+----------------------------------+
| id | region| publicurl | internalurl | adminurl | service_id |
+----------------------------------+-----------+----------------------------------------------+----------------------------------------------+----------------------------------------------+----------------------------------+
| 0c74dbc2965741ba8d422919cc87d137 | RegionOne | http://135.252.167.143:9696/ | http://135.252.167.143:9696/ | http://135.252.167.143:9696/ | 9b11a0a7a4414dfa8e6c4bd421f80873 |
| 4963eb70de9d46a8827933630e8aed3a | RegionOne |http://135.252.167.143:8773/services/Cloud|http://135.252.167.143:8773/services/Cloud|http://135.252.167.143:8773/services/Admin| 038d194c12a742e58f808c8525358a39 |
| 92a5c3b2d28645239c835a1faf48dcdf | RegionOne | http://135.252.167.143:9292/ | http://135.252.167.143:9292/ | http://135.252.167.143:9292/ | 19154d904d9c429e95e7c16f1d6d5720 |
| c5e29713994441f897b2c4893ae1c597 | RegionOne | http://135.252.167.143:8774/v2/$(tenant_id)s | http://135.252.167.143:8774/v2/$(tenant_id)s | http://135.252.167.143:8774/v2/$(tenant_id)s | 8b9511b673784c0f9b9fc5a020c74579 |
| e256af289933417fbff54be4839d4238 | RegionOne | http://135.252.167.143:5000/v2.0 | http://135.252.167.143:5000/v2.0 | http://135.252.167.143:35357/v2.0 | 8c735b1d72a44a5b8e24eb6779d33dc2 |
| f05f48dd94fc4ff6b408fec9062eab44 | RegionOne | http://135.252.167.143:8776/v1/$(tenant_id)s | http://135.252.167.143:8776/v1/$(tenant_id)s | http://135.252.167.143:8776/v1/$(tenant_id)s | 1cbab544e802480c8361f239f905e8f5 |
+----------------------------------+-----------+----------------------------------------------+----------------------------------------------+----------------------------------------------+----------------------------------+
mysql> select * from endpoint;
+----------------------------------+----------------------------------+-----------+-----------+----------------------------------+----------------------------------------------+-------+
| id | legacy_endpoint_id | interface | region | service_id | url | extra |
+----------------------------------+----------------------------------+-----------+-----------+----------------------------------+----------------------------------------------+-------+
| 183592caa9c843c0bc8b38f864741b43 | 0c74dbc2965741ba8d422919cc87d137 | public | RegionOne | 9b11a0a7a4414dfa8e6c4bd421f80873 | http://135.252.167.143:9696/ | {} |
| 2040301ef0a84b2982af81d1fa57b37f | e256af289933417fbff54be4839d4238 | admin | RegionOne | 8c735b1d72a44a5b8e24eb6779d33dc2 | http://135.252.167.143:35357/v2.0 | {} |
| 2f6aa131ec9d4b4885f96e6bce84fa2a | 92a5c3b2d28645239c835a1faf48dcdf | internal| RegionOne | 19154d904d9c429e95e7c16f1d6d5720 | http://135.252.167.143:9292/ | {} |
| 30ffca84dcfa4229ac5ebebb15bff251 | c5e29713994441f897b2c4893ae1c597 | internal| RegionOne | 8b9511b673784c0f9b9fc5a020c74579 | http://135.252.167.143:8774/v2/$(tenant_id)s | {} |
| 399324a3cdd54dff88461fb219954891 | 0c74dbc2965741ba8d422919cc87d137 | admin | RegionOne | 9b11a0a7a4414dfa8e6c4bd421f80873 | http://135.252.167.143:9696/ | {} |
| 3e337a81870344e7bedcf270a3fb7a04 | 4963eb70de9d46a8827933630e8aed3a | public | RegionOne | 038d194c12a742e58f808c8525358a39 | http://135.252.167.143:8773/services/Cloud | {} |
| 71985b575a0143b197c2bfa24a84b099 | 92a5c3b2d28645239c835a1faf48dcdf | public | RegionOne | 19154d904d9c429e95e7c16f1d6d5720 | http://135.252.167.143:9292/ | {} |
| 8771cc773e5a4f46aba5f1d60ba0d2e0 | f05f48dd94fc4ff6b408fec9062eab44 | admin | RegionOne | 1cbab544e802480c8361f239f905e8f5 | http://135.252.167.143:8776/v1/$(tenant_id)s | {} |
| 939cfcea9fc14ee99b10c6c088c82a0a | f05f48dd94fc4ff6b408fec9062eab44 | public | RegionOne | 1cbab544e802480c8361f239f905e8f5 | http://135.252.167.143:8776/v1/$(tenant_id)s | {} |
| 9d7bd05c6abe49c981b080455133eda3 | 4963eb70de9d46a8827933630e8aed3a | admin | RegionOne | 038d194c12a742e58f808c8525358a39 | http://135.252.167.143:8773/services/Admin | {} |
| a23a2032d75d47a4a72530b073c9204e | 92a5c3b2d28645239c835a1faf48dcdf | admin | RegionOne | 19154d904d9c429e95e7c16f1d6d5720 | http://135.252.167.143:9292/ | {} |
| a42604d45dcc4a41911240ba58d5aee0 | f05f48dd94fc4ff6b408fec9062eab44 | internal| RegionOne | 1cbab544e802480c8361f239f905e8f5 | http://135.252.167.143:8776/v1/$(tenant_id)s | {} |
| d7dde0c04e48482eac6ec19b8ccadfa0 | 0c74dbc2965741ba8d422919cc87d137 | internal| RegionOne | 9b11a0a7a4414dfa8e6c4bd421f80873 | http://135.252.167.143:9696/ | {} |
| df3770ff6076426c954660f40f6118bf | c5e29713994441f897b2c4893ae1c597 | public | RegionOne | 8b9511b673784c0f9b9fc5a020c74579 | http://135.252.167.143:8774/v2/$(tenant_id)s | {} |
| e535ef9f0ed247dbaba1343d4e0a5b14 | c5e29713994441f897b2c4893ae1c597 | admin | RegionOne | 8b9511b673784c0f9b9fc5a020c74579 | http://135.252.167.143:8774/v2/$(tenant_id)s | {} |
| ef0bbf9fdca74193b7897b695f3adfef | 4963eb70de9d46a8827933630e8aed3a | internal| RegionOne | 038d194c12a742e58f808c8525358a39 | http://135.252.167.143:8773/services/Cloud | {} |
| f0467c167ba84ff6a0a3e28708a3b904 | e256af289933417fbff54be4839d4238 | internal| RegionOne | 8c735b1d72a44a5b8e24eb6779d33dc2 | http://135.252.167.143:5000/v2.0 | {} |
| ff0e325151954aaa96793a58eeb5e4d8 | e256af289933417fbff54be4839d4238 | public | RegionOne | 8c735b1d72a44a5b8e24eb6779d33dc2 | http://135.252.167.143:5000/v2.0 | {} |
+----------------------------------+----------------------------------+-----------+-----------+----------------------------------+----------------------------------------------+-------+
18 rows in set (0.00 sec)
问题就出在'
http://135.252.167.143:8774/v2/$(tenant_id)s'末尾的$(tenant_id)s.
解决办法,在mysql中把
http://135.252.167.143:8774/v2/$(tenant_id)s
改成
http://135.252.167.143:8774/v2.0
其他类似的条目也做同样更改,然后重启keystone。
参考:https://ask.openstack.org/en/question/4123/dashboard-showing-tenant_usage-in-debug-window/
沉浸在爱情里的人会忘记时间,时间会不会使人也忘记爱情呢 神话般的爱情,只出现在童话里。 -至少涐扪中还有人快乐,这样就已足够了, 我把心烧成火焰让怕黑的你拥着温暖入眠 一个人炫耀什么,说明内心缺少什么 上帝制造了悲欢离合要我们承担结果.
页:
[1]