在运行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. dhtmlxtree 节点 展开收缩:新增了直接点 文本内容 也 实现了 展开收缩 功能(并记住了展开、收缩状态)

    dhtmlxtree 节点 展开收缩通常情况我们按 +- 就实现了 展开收缩 功能,为了方便我们新增了直接点 文本内容 也 实现了 展开收缩 功能(并记住了展开.收缩状态) tree = new dh ...

  2. 【Storm】一张图搞定Storm的运行架构

  3. 从Encoder到Decoder实现Seq2Seq模型

    https://zhuanlan.zhihu.com/p/27608348 更新:感谢@Gang He指出的代码错误.get_batches函数中第15行与第19行,代码已经重新修改,GitHub已更 ...

  4. Web 安全 之 OpenSSL

    什么是OpenSSL协议? SSL(Secure SocketLayer,安全套接层)协议是使用最为普遍网站加密技术,用以保障在Internet上数据传输之安全,利用数据加密(Encryption)技 ...

  5. 原创:vsphere概念深入系列四:Nic Teaming若干问题

    参考文档:http://www.hyper-v.nu/archives/marcve/2013/01/lbfo-hyper-v-switch-qos-and-actual-performance-pa ...

  6. NuGet Package Explorer

    https://www.microsoft.com/zh-cn/store/p/nuget-package-explorer/9wzdncrdmdm3?ocid=badge&rtc=1

  7. centos7安装配置mysql5.6

    1. 下载mysql的repo源 $ wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm 2. 安装mysql-co ...

  8. 创建一个可拖动的DIV

    var drag = function(){ var obj = document.getElementById("id"); var s = obj.style; var b = ...

  9. 委托到Lambda的进化: ()=> {} 这个lambda表达式就是一个无参数的委托及具体方法的组合体。

    1.原始的委托 (.net 1.0) using System; using System.Collections.Generic; using System.ComponentModel; usin ...

  10. 审核流(1)SNF.WorkFlow审核流简介--SNF快速开发平台3.1

    本项目是的在Spring.Net.Framework 平台之上进行研发.SNF.WorkFlow审核流是一款完全自主知识产权研发的为软件项目. 审核流基本概念:什么是审核流? 审核流:两个或两个以上的 ...