[原]openstack-kilo--issue(十三)Unauthorized: The request you have made requires authentication. (HTTP 401) (Request
在运行nova-list 的时候发现报错401:如下面
========>>>>>>>>> 正常显示 [root@controller ~]# nova --debug list
DEBUG (session:) REQ: curl -g -i -X GET http://controller:35357/v3 -H "Accept: app" -H "User-Agent: python-keystoneclient"
INFO (connectionpool:) Starting new HTTP connection (): controller
DEBUG (connectionpool:) "GET /v3 HTTP/1.1"
DEBUG (session:) RESP: [] content-length: vary: X-Auth-Token keep-alive: ti100 server: Apache/2.4. (CentOS) OpenSSL/1.0.1e-fips mod_fcgid/2.3. mod_wsgi/3.4 Pynnection: Keep-Alive date: Tue, Jan :: GMT content-type: application/jsk-request-id: req-9f10a8db-4c05-408a-934b-0b1d96f07146
RESP BODY: {"version": {"status": "stable", "updated": "2015-03-30T00:00:00Z", "mediaase": "application/json", "type": "application/vnd.openstack.identity-v3+json"}], "idinks": [{"href": "http://controller:35357/v3/", "rel": "self"}]}} DEBUG (base:) Making authentication request to http://controller:35357/v3/auth/tok
DEBUG (connectionpool:) "POST /v3/auth/tokens HTTP/1.1"
DEBUG (iso8601:) Parsed --17T08::.247506Z into {'tz_sign': None, 'second'', 'hour': u'', 'daydash': u'', 'tz_hour': None, 'month': None, 'timezone'nd': u'', 'tz_minute': None, 'year': u'', 'separator': u'T', 'monthdash': u'', 'minute': u''} with default timezone <iso8601.iso8601.Utc object at 0x232a210>
DEBUG (iso8601:) Got u'' for 'year' with default None
DEBUG (iso8601:) Got u'' for 'monthdash' with default
DEBUG (iso8601:) Got for 'month' with default
DEBUG (iso8601:) Got u'' for 'daydash' with default
DEBUG (iso8601:) Got for 'day' with default
DEBUG (iso8601:) Got u'' for 'hour' with default None
DEBUG (iso8601:) Got u'' for 'minute' with default None
DEBUG (iso8601:) Got u'' for 'second' with default None
DEBUG (session:) REQ: curl -g -i -X GET http://controller:8774/v2/f57b892b5c50426b7f3/servers/detail -H "User-Agent: python-novaclient" -H "Accept: application/json" -en: {SHA1}b1929005e567f4546937326d942b91a4fad47deb"
INFO (connectionpool:) Starting new HTTP connection (): controller
DEBUG (connectionpool:) "GET /v2/f57b892b5c50426bb90414d31f0e77f3/servers/detail H15
DEBUG (session:) RESP: [] date: Tue, Jan :: GMT connection: keep--type: application/json content-length: x-compute-request-id: req-632a635e-269a-4bfa0c261
RESP BODY: {"servers": []} +----+------+--------+------------+-------------+----------+
| ID | Name | Status | Task State | Power State | Networks |
+----+------+--------+------------+-------------+----------+
+----+------+--------+------------+-------------+----------+ ====>>>>>>再查看nova list 开始报错 [root@controller ~]# nova --debug list
DEBUG (session:) REQ: curl -g -i -X GET http://controller:35357/v3 -H "Accept: application/json" -H "User-Agent: python-keystoneclient"
INFO (connectionpool:) Starting new HTTP connection (): controller
DEBUG (connectionpool:) "GET /v3 HTTP/1.1"
DEBUG (session:) RESP: [] content-length: vary: X-Auth-Token keep-alive: timeout=, max= server: Apache/2.4. (CentOS) OpenSSL/1.0.1e-fips mod_fcgid/2.3. mod_wsgi/3.4 Python/2.7. connection: Keep-Alive date: Tue, Jan :: GMT content-type: application/json x-openstack-request-id: req-5a6ebad3-30d7-4ab7-b75d-bcd07dac35c6
RESP BODY: {"version": {"status": "stable", "updated": "2015-03-30T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}], "id": "v3.4", "links": [{"href": "http://controller:35357/v3/", "rel": "self"}]}} DEBUG (base:) Making authentication request to http://controller:35357/v3/auth/tokens
DEBUG (connectionpool:) "POST /v3/auth/tokens HTTP/1.1"
DEBUG (session:) Request returned failure status:
DEBUG (shell:) The request you have made requires authentication. (HTTP ) (Request-ID: req-1e2bdba2-c76d-4afd-bf3c-0cfdb2413025)
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/novaclient/shell.py", line , in main
OpenStackComputeShell().main(argv)
File "/usr/lib/python2.7/site-packages/novaclient/shell.py", line , in main
args.func(self.cs, args)
File "/usr/lib/python2.7/site-packages/novaclient/v2/shell.py", line , in do_list
sort_dirs=sort_dirs)
File "/usr/lib/python2.7/site-packages/novaclient/v2/servers.py", line , in list
return self._list("/servers%s%s" % (detail, query_string), "servers")
File "/usr/lib/python2.7/site-packages/novaclient/base.py", line , in _list
_resp, body = self.api.client.get(url)
File "/usr/lib/python2.7/site-packages/keystoneclient/adapter.py", line , in get
return self.request(url, 'GET', **kwargs)
File "/usr/lib/python2.7/site-packages/novaclient/client.py", line , in request
**kwargs)
File "/usr/lib/python2.7/site-packages/keystoneclient/adapter.py", line , in request
resp = super(LegacyJsonAdapter, self).request(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/keystoneclient/adapter.py", line , in request
return self.session.request(url, method, **kwargs)
File "/usr/lib/python2.7/site-packages/keystoneclient/utils.py", line , in inner
return func(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/keystoneclient/session.py", line , in request
auth_headers = self.get_auth_headers(auth)
File "/usr/lib/python2.7/site-packages/keystoneclient/session.py", line , in get_auth_headers
return auth.get_headers(self, **kwargs)
File "/usr/lib/python2.7/site-packages/keystoneclient/auth/base.py", line , in get_headers
token = self.get_token(session)
File "/usr/lib/python2.7/site-packages/keystoneclient/auth/identity/base.py", line , in get_token
return self.get_access(session).auth_token
File "/usr/lib/python2.7/site-packages/keystoneclient/auth/identity/base.py", line , in get_access
self.auth_ref = self.get_auth_ref(session)
File "/usr/lib/python2.7/site-packages/keystoneclient/auth/identity/generic/base.py", line , in get_auth_ref
return self._plugin.get_auth_ref(session, **kwargs)
File "/usr/lib/python2.7/site-packages/keystoneclient/auth/identity/v3/base.py", line , in get_auth_ref
authenticated=False, log=False, **rkwargs)
File "/usr/lib/python2.7/site-packages/keystoneclient/session.py", line , in post
return self.request(url, 'POST', **kwargs)
File "/usr/lib/python2.7/site-packages/keystoneclient/utils.py", line , in inner
return func(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/keystoneclient/session.py", line , in request
raise exceptions.from_response(resp, method, url)
Unauthorized: The request you have made requires authentication. (HTTP ) (Request-ID: req-1e2bdba2-c76d-4afd-bf3c-0cfdb2413025)
ERROR (Unauthorized): The request you have made requires authentication. (HTTP 401) (Request-ID: req-1e2bdba2-c76d-4afd-bf3c-0cfdb2413025)
问题点回想:在两次查看中间操作了什么?? 回想起更改了GUI界面admin用户的密码
即下图:
如果此时没有更改admin用户环境,就会导致401错误:
所以解决办法是:更改admin用户环境admin-openrc.sh
[root@controller ~]# cat admin-openrc.sh
export OS_PROJECT_DOMAIN_ID=default
export OS_USER_DOMAIN_ID=default
export OS_PROJECT_NAME=admin
export OS_TENANT_NAME=admin
export OS_USERNAME=admin
export OS_PASSWORD=NEW_PASSWORD -----<此密码就为上图中黄色位置的密码>
export OS_AUTH_URL=http://${HOSTNAME}:35357/v3
export OS_IMAGE_API_VERSION= export OS_VOLUME_API_VERSION= #export OS_URL=http://${HOSTNAME}:35357/v2.0
#export ADMIN_TOKEN=118befef8350d34fc931 [root@controller ~]# source admin-openrc.sh ---------<使更改生效> ========再查看就正常了 不再报401错误
[root@controller ~]# nova list
+----+------+--------+------------+-------------+----------+
| ID | Name | Status | Task State | Power State | Networks |
+----+------+--------+------------+-------------+----------+
+----+------+--------+------------+-------------+----------+
[原]openstack-kilo--issue(十三)Unauthorized: The request you have made requires authentication. (HTTP 401) (Request的更多相关文章
- 在安装Openstack的keystone认证服务时,出现The request you have made requires authentication. (HTTP 401) (Request-ID: req-f94bebba-f0c5-4a92-85问题的处理
创建openstack的keystone认证服务器报错: The request you have made requires authentication. (HTTP 401) (Reques ...
- devstack 使用openstack命令报错 The request you have made requires authentication. (HTTP 401) Missing value auth-url required for auth plugin password
关联错误: The request you have made requires authentication. (HTTP 401) (Request-ID: req-88ad2cba-0f2d-4 ...
- openstack kilo部署-基础环境
公司也想搞个私有云玩玩,于是展开了一系列的调研,部署测试,openstack 有几个版本真是坑爹!!,如果喜欢被虐有兄弟,你就试试 openstack 的 juno , icehouse等版本,用不了 ...
- Openstack(Kilo)安装系列之Keystone(五)
Create OpenStack client environment scripts To create the scripts Create client environment scripts ...
- [译] OpenStack Kilo 版本中 Neutron 的新变化
OpenStack Kilo 版本,OpenStack 这个开源项目的第11个版本,已经于2015年4月正式发布了.现在是个合适的时间来看看这个版本中Neutron到底发生了哪些变化了,以及引入了哪些 ...
- OpenStack Kilo版加CEPH部署手册
OpenStack Kilo版加CEPH部署手册 作者: yz联系方式: QQ: 949587200日期: 2015-7-13版本: Kilo 转载地址: http://mp.weixin.qq.co ...
- (转)OpenStack Kilo 版本中 Neutron 的新变化
OpenStack Kilo 版本,OpenStack 这个开源项目的第11个版本,已经于2015年4月正式发布了.现在是个合适的时间来看看这个版本中Neutron到底发生了哪些变化了,以及引入了哪些 ...
- scrapy-yield scrapy.Request()不执行、失效、Filtered offsite request to错误 [转]
scrapy错误:yield scrapy.Request()不执行.失效.Filtered offsite request to错误.首先我们在Request()方法里面添加这么一个东东: yiel ...
- 此时servlet中的request和我们在页面jsp中的request 是同一个request.
在tomcat容器启动的时候,jsp页面的内置对象request,response,同样是依赖于tomcat容器中的servlet-api.jar包,这个jar包和我们在web项目中的jar包是一样的 ...
随机推荐
- java- WatchService监控
java7中新增WatchService可以监控文件的变动信息(监控到文件是修改,新增.删除等事件:) 其中注册事件是需要的: StandardWatchEventKinds.ENTRY_MODIFY ...
- SpringBoot(八):系统错误统一拦截器
在日常 web 开发中发生了异常,往往需要通过一个统一的 异常处理,来保证客户端能够收到友好的提示.本文将会介绍 Spring Boot 中的 全局统一异常处理. Springboot的全局异常查是通 ...
- 【jQuery Demo】图片瀑布流实现
瀑布流就是像瀑布一样的网站——丰富的网站内容,特别是绚美的图片会让你流连忘返.你在浏览网站的时候只需要轻轻滑动一下鼠标滚轮,一切的美妙的图片精彩便可呈现在你面前.瀑布流网站是新兴的一种网站模式——她的 ...
- testng.xml 配置大全
1.TestNG的运行方式如下: 1 With a testng.xml file 直接run as test suite 2 With ant 使用ant 3 From the command li ...
- 【tp5】tp5实现空模块、空控制器、空操作的页面404跳转
写在最开始:本教程适用于tp5路由的[强制模式+半pathinfo模式+pathinfo模式],通用. 比网上的[通过路由去控制空模块更强力.更全面]. PS:路由控制空模块缺点:仅仅在[强制模式下才 ...
- <转>vmp3.0.9全保护拆分解析
以下为了避免插件干扰,故采用x64dbg原版进行分析. 首先我通过检测到调试器的弹窗进行栈回溯,定位到该关键点:CALL eax 由于才接触Vmp,所以是把各个保护拆分开来进行的分析,会比较简单一 ...
- Redis集群搭建(转自一菲聪天的“Windows下搭建Redis集群”)
配置Redis参考:http://blog.csdn.net/zsg88/article/details/73715947 使用Ruby配置集群参考:https://www.cnblogs.com/t ...
- 关于tomcat不同版本的maxPostSize
tomcat7.0.63之前: maxPostSize The maximum size in bytes of the POST which will be handled by the conta ...
- 通过nginx中转获取不到IP的问题解决
第一步:在nginx.conf中配置反向代理时把真实IP带上,例如: server { listen 80; server_name myibook.com.cn; loca ...
- Hive SQL grouping sets 用法
概述 GROUPING SETS,GROUPING__ID,CUBE,ROLLUP 这几个分析函数通常用于OLAP中,不能累加,而且需要根据不同维度上钻和下钻的指标统计,比如,分小时.天.月的UV数. ...