在运行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的更多相关文章

  1. 在安装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 ...

  2. 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 ...

  3. openstack kilo部署-基础环境

    公司也想搞个私有云玩玩,于是展开了一系列的调研,部署测试,openstack 有几个版本真是坑爹!!,如果喜欢被虐有兄弟,你就试试 openstack 的 juno , icehouse等版本,用不了 ...

  4. Openstack(Kilo)安装系列之Keystone(五)

    Create OpenStack client environment scripts To create the scripts Create client environment scripts ...

  5. [译] OpenStack Kilo 版本中 Neutron 的新变化

    OpenStack Kilo 版本,OpenStack 这个开源项目的第11个版本,已经于2015年4月正式发布了.现在是个合适的时间来看看这个版本中Neutron到底发生了哪些变化了,以及引入了哪些 ...

  6. OpenStack Kilo版加CEPH部署手册

    OpenStack Kilo版加CEPH部署手册 作者: yz联系方式: QQ: 949587200日期: 2015-7-13版本: Kilo 转载地址: http://mp.weixin.qq.co ...

  7. (转)OpenStack Kilo 版本中 Neutron 的新变化

    OpenStack Kilo 版本,OpenStack 这个开源项目的第11个版本,已经于2015年4月正式发布了.现在是个合适的时间来看看这个版本中Neutron到底发生了哪些变化了,以及引入了哪些 ...

  8. scrapy-yield scrapy.Request()不执行、失效、Filtered offsite request to错误 [转]

    scrapy错误:yield scrapy.Request()不执行.失效.Filtered offsite request to错误.首先我们在Request()方法里面添加这么一个东东: yiel ...

  9. 此时servlet中的request和我们在页面jsp中的request 是同一个request.

    在tomcat容器启动的时候,jsp页面的内置对象request,response,同样是依赖于tomcat容器中的servlet-api.jar包,这个jar包和我们在web项目中的jar包是一样的 ...

随机推荐

  1. 奇怪吸引子---LiuChen

    奇怪吸引子是混沌学的重要组成理论,用于演化过程的终极状态,具有如下特征:终极性.稳定性.吸引性.吸引子是一个数学概念,描写运动的收敛类型.它是指这样的一个集合,当时间趋于无穷大时,在任何一个有界集上出 ...

  2. Redis集群规范

    Redis集群规范 什么是 Redis 集群 分布式(distributed) 容错(fault-tolerant) 是普通单机 Redis 所能使用的功能的一个子集(subset). 集群的容错功能 ...

  3. 第十五章 dubbo结果缓存机制

    dubbo提供了三种结果缓存机制: lru:基于最近最少使用原则删除多余缓存,保持最热的数据被缓存 threadlocal:当前线程缓存 jcache:可以桥接各种缓存实现 一.使用方式 <du ...

  4. 手机 https 抓包---Charles篇

    原文出处: Lu尼玛的想疗院 作为一名现代前端,除了要掌握html,css,js 以及一系列乱七八糟框架之外,还得懂得如何抓包改包.当然,常规的网站或者自主开发的我们往往使用 chrome或者 fir ...

  5. IDEA环境设置

    设置SDK:https://blog.csdn.net/y999666/article/details/51893348 打开模板使用说明,找到Maven本地安装目录, 备份E:\Program Fi ...

  6. 空间谱专题10:MUSIC算法

    作者:桂. 时间:2017-09-19  19:41:40 链接:http://www.cnblogs.com/xingshansi/p/7553746.html 前言 MUSIC(Multiple ...

  7. 译:3.消费一个RESTful Web Service

    这节课我们根据官网教程学习如何去消费(调用)一个 RESTful Web Service . 原文链接 https://spring.io/guides/gs/consuming-rest/ 本指南将 ...

  8. Atitit 翻页功能的解决方案与版本历史 v4 r49

    Atitit 翻页功能的解决方案与版本历史 v4 r49 1. 版本历史与分支版本,项目版本记录1 1.1. 主干版本历史1 1.2. 分支版本  项目版本记录.1 2. Easyui 的翻页组件2 ...

  9. Python验证码识别 安装Pillow、tesseract-ocr与pytesseract模块的安装以及错误解决

    1.安装Pillow pip install Pillow 2.安装tesseract-ocr OCR(Optical Character Recognition, 光学字符识别) 软件 安装包含两个 ...

  10. Fluent动网格【6】:部件变形案例

    本案例描述使用动网格过程中处理边界变形的问题. 案例描述 本案例几何为一个抛物线旋转成型的几何体.如图所示. 其中上壁面刚体运动引起抛物面变形.刚体运动方程为: \[ v=\left\{ \begin ...