易陆发现互联网技术论坛

 找回密码
 开始注册
查看: 6274|回复: 1
收起左侧

ERROR nova.api Unauthorized: The request you have made requires authentication.

[复制链接]
发表于 2018-12-16 15:05:28 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?开始注册

x
2018-12-16 15:03:27.882 90700 ERROR nova.api.openstack.wsgi [req-42faf9b7-778b-42fc-a6ef-cbca85033b51 9d43966f82de4cab8db3696c634d98ba f563fd1031a246d7aa182ccb79abc996 - default default] Unexpected exception in API method: Unauthorized: The request you have made requires authentication. (HTTP 401)7 D/ m+ Z4 Q* |( u! l( S+ |5 O5 @0 }
2018-12-16 15:03:27.882 90700 ERROR nova.api.openstack.wsgi Traceback (most recent call last):
8 i6 U- N" q/ z( K, ~2018-12-16 15:03:27.882 90700 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/api/openstack/wsgi.py", line 788, in wrapped$ x+ o2 p# {4 {# \; A) H; {& y, z
2018-12-16 15:03:27.882 90700 ERROR nova.api.openstack.wsgi     return f(*args, **kwargs)
/ {1 _+ l8 v, R* ?/ q3 N* e5 v& N# t2018-12-16 15:03:27.882 90700 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/api/validation/__init__.py", line 108, in wrapper
# w$ W6 `3 {3 o: b. E/ L2018-12-16 15:03:27.882 90700 ERROR nova.api.openstack.wsgi     return func(*args, **kwargs)' y& v% q2 d( e. z6 x; T
2018-12-16 15:03:27.882 90700 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/api/validation/__init__.py", line 108, in wrapper) }% ?# |* u- m8 W' J/ H
2018-12-16 15:03:27.882 90700 ERROR nova.api.openstack.wsgi     return func(*args, **kwargs)$ t3 S% f1 |) z6 v$ e, J7 i
2018-12-16 15:03:27.882 90700 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/api/validation/__init__.py", line 108, in wrapper: L7 p, X  E6 C" b% P' ~; ?+ l6 T1 \
2018-12-16 15:03:27.882 90700 ERROR nova.api.openstack.wsgi     return func(*args, **kwargs)7 v4 L& L2 g4 K# J% V
2018-12-16 15:03:27.882 90700 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/api/validation/__init__.py", line 108, in wrapper- c. I5 }7 B  ^: {8 a  H
2018-12-16 15:03:27.882 90700 ERROR nova.api.openstack.wsgi     return func(*args, **kwargs)
5 j/ A7 I- X. Q1 s3 u2018-12-16 15:03:27.882 90700 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/api/validation/__init__.py", line 108, in wrapper/ e3 d2 M; A1 z' X
2018-12-16 15:03:27.882 90700 ERROR nova.api.openstack.wsgi     return func(*args, **kwargs)$ W. n+ H3 I7 J' U
2018-12-16 15:03:27.882 90700 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/api/openstack/compute/servers.py", line 939, in _action_rebuild1 M0 i: F% G& [
2018-12-16 15:03:27.882 90700 ERROR nova.api.openstack.wsgi     **kwargs)' d- B. Z/ _/ l+ _( l/ m
2018-12-16 15:03:27.882 90700 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/compute/api.py", line 204, in inner
- T3 e* ?1 C$ l3 N2 X9 H6 |2018-12-16 15:03:27.882 90700 ERROR nova.api.openstack.wsgi     return function(self, context, instance, *args, **kwargs)
" }$ R# x3 C* P' \4 j2018-12-16 15:03:27.882 90700 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/compute/api.py", line 212, in _wrapped
( K8 O8 e) p$ U7 D7 L& R: p2018-12-16 15:03:27.882 90700 ERROR nova.api.openstack.wsgi     return fn(self, context, instance, *args, **kwargs), R+ [, r* a+ o( f, s. {$ [% V
2018-12-16 15:03:27.882 90700 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/compute/api.py", line 152, in inner
. ?/ t3 H) ?, Y7 |2018-12-16 15:03:27.882 90700 ERROR nova.api.openstack.wsgi     return f(self, context, instance, *args, **kw)) t  }8 R7 G; x. ~; Y
2018-12-16 15:03:27.882 90700 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/compute/api.py", line 3127, in rebuild
  S3 v9 Y% Y- ?8 V7 E2 |7 E6 X5 B2018-12-16 15:03:27.882 90700 ERROR nova.api.openstack.wsgi     volume = self.volume_api.get(context, root_bdm.volume_id)
, M8 F4 ]% l! g2018-12-16 15:03:27.882 90700 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/volume/cinder.py", line 379, in wrapper: ]. I5 O5 M! L% A' J/ c: D
2018-12-16 15:03:27.882 90700 ERROR nova.api.openstack.wsgi     res = method(self, ctx, *args, **kwargs)  b4 R; z' Y+ c( b1 W0 i3 i- e! k; a
2018-12-16 15:03:27.882 90700 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/volume/cinder.py", line 401, in wrapper
) ]! G8 C8 Q0 ]& {  l+ ^2018-12-16 15:03:27.882 90700 ERROR nova.api.openstack.wsgi     res = method(self, ctx, volume_id, *args, **kwargs)
" E( `, L2 C& T2 ^2018-12-16 15:03:27.882 90700 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/volume/cinder.py", line 467, in get3 c% p& ]: z5 ~, ]8 [/ Y
2018-12-16 15:03:27.882 90700 ERROR nova.api.openstack.wsgi     context, microversion=microversion).volumes.get(volume_id)
' }- p, p2 j0 R2018-12-16 15:03:27.882 90700 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/cinderclient/v2/volumes.py", line 308, in get
0 O# p- _8 @* _: d5 j2018-12-16 15:03:27.882 90700 ERROR nova.api.openstack.wsgi     return self._get("/volumes/%s" % volume_id, "volume")
; R5 Y$ k! l4 S/ B2018-12-16 15:03:27.882 90700 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/cinderclient/base.py", line 321, in _get- K6 K& W: _' d2 h$ `8 F1 @& r
2018-12-16 15:03:27.882 90700 ERROR nova.api.openstack.wsgi     resp, body = self.api.client.get(url)
1 j% x8 A' w* n0 Q! a9 U2018-12-16 15:03:27.882 90700 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/cinderclient/client.py", line 200, in get9 ?4 u* ^) n* ^9 p
2018-12-16 15:03:27.882 90700 ERROR nova.api.openstack.wsgi     return self._cs_request(url, 'GET', **kwargs)8 \( _. X6 C- d& r  A
2018-12-16 15:03:27.882 90700 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/cinderclient/client.py", line 191, in _cs_request
: X9 s( c% k+ D' W' b- m) }& E2018-12-16 15:03:27.882 90700 ERROR nova.api.openstack.wsgi     return self.request(url, method, **kwargs)- o. ]4 U  O0 d
2018-12-16 15:03:27.882 90700 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/cinderclient/client.py", line 177, in request
4 K1 z4 J7 E2 e. s3 p4 p2018-12-16 15:03:27.882 90700 ERROR nova.api.openstack.wsgi     raise exceptions.from_response(resp, body)1 y! _3 `# ^3 ?2 m6 X$ J$ U
2018-12-16 15:03:27.882 90700 ERROR nova.api.openstack.wsgi Unauthorized: The request you have made requires authentication. (HTTP 401), m% O* J6 c' V" S4 T9 f. x. x5 l
2018-12-16 15:03:27.882 90700 ERROR nova.api.openstack.wsgi ) m/ z1 }6 c# ]
2018-12-16 15:03:27.883 90700 INFO nova.api.openstack.wsgi [req-42faf9b7-778b-42fc-a6ef-cbca85033b51 9d43966f82de4cab8db3696c634d98ba f563fd1031a246d7aa182ccb79abc996 - default default] HTTP exception thrown: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.& C4 r- H5 M% U: W/ S0 p: A
<class 'cinderclient.exceptions.Unauthorized'>2 K) t2 T' g9 E- i; y+ D
2018-12-16 15:03:27.885 90700 INFO nova.osapi_compute.wsgi.server [req-42faf9b7-778b-42fc-a6ef-cbca85033b51 9d43966f82de4cab8db3696c634d98ba f563fd1031a246d7aa182ccb79abc996 - default default] 192.168.17.65 "POST /v2.1/f563fd1031a246d7aa182ccb79abc996/servers/9aaf2b74-24ca-4bc4-97ac-925fceb42f81/action HTTP/1.1" status: 500 len: 643 time: 0.1560080% r, O% x  r- {8 j8 T% l
2018-12-16 15:03:27.958 90700 INFO nova.osapi_compute.wsgi.server [req-cf8b77ec-5501-4e33-8cb1-8cf309177c3e 9d43966f82de4cab8db3696c634d98ba f563fd1031a246d7aa182ccb79abc996 - default default] 192.168.17.65 "GET /v2.1/f563fd1031a246d7aa182ccb79abc996/flavors/detail HTTP/1.1" status: 200 len: 3513 time: 0.0294249& ]: h" K8 R  p1 J5 n
2018-12-16 15:03:27.996 90700 INFO nova.osapi_compute.wsgi.server [req-929011b5-0a25-4ac1-a8be-86bd7caab3f7 9d43966f82de4cab8db3696c634d98ba f563fd1031a246d7aa182ccb79abc996 - default default] 192.168.17.65 "GET /v2.1/f563fd1031a246d7aa182ccb79abc996 HTTP/1.1" status: 404 len: 382 time: 0.0050709/ Y+ J* O+ P) p; z9 T) X5 D3 H: v' a
2018-12-16 15:03:28.004 90700 INFO nova.osapi_compute.wsgi.server [req-4aa0e686-e6aa-4e62-916f-17489c40eb36 9d43966f82de4cab8db3696c634d98ba f563fd1031a246d7aa182ccb79abc996 - default default] 192.168.17.65 "GET /v2.1/ HTTP/1.1" status: 200 len: 783 time: 0.00496703 u) z  ^) c9 h; H3 C0 q3 w+ B
2018-12-16 15:03:28.425 90699 INFO nova.osapi_compute.wsgi.server [req-f77507c7-6b6b-4c69-b406-1135eed3049a 9d43966f82de4cab8db3696c634d98ba f563fd1031a246d7aa182ccb79abc996 - default default] 192.168.17.65 "GET /v2.1/f563fd1031a246d7aa182ccb79abc996/servers/detail?limit=21&project_id=f563fd1031a246d7aa182ccb79abc996 HTTP/1.1" status: 200 len: 4335 time: 0.36251598 g( y2 G4 q! |' y1 t  x& R
 楼主| 发表于 2018-12-16 15:12:47 | 显示全部楼层
I am in the process of installing Pike and when I logged into Horizon and selected an item in the tree on the left such as instances. I would get logged out stating that was not authorized. I figured out that the auth_uri is wrong in the [keystone_authtoken]
3 q& w8 B0 V4 G( {! p) R
8 C- I- i' I8 C, YOriginal line: auth_uri = http://controller:5000" O9 c0 z/ k2 u( c0 [* y& Q! b

2 ~& [) B! _1 i# ?* YUpdate line: auth_uri = http://controller:5000/v33 t( J3 H' a4 u5 a$ D% ~1 \8 [

/ b; M' {) @+ h4 iYou can see in the admin-openrc and demo-openrc files they use the http://controller:5000/v3 for authentication.
6 B7 A6 S9 s8 k- Q) i3 H- F, U4 R- M; A& j
Once I made this change in all of the appropriate files and rebooted i was able to log into Horizon and navigate as expected. This is an error in their documentation for installing Pike.
6 l3 g0 ?! J) S9 A1 o9 o- W1 B3 [1 p1 I5 C9 |& k8 l# t
I am not sure if this will fix your problem but it sounds like a similiar authentication issue to me.
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

站长推荐上一条 /4 下一条

北京云银创陇科技有限公司以云计算运维,代码开发

QQ|返回首页|Archiver|小黑屋|易陆发现技术论坛 点击这里给我发消息

GMT+8, 2026-4-8 15:24 , Processed in 0.040217 second(s), 21 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

快速回复 返回顶部 返回列表