在运行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. copy unicode HTML to clipboard

    How to copy unicode HTML code to the clipboard in html format, so it can be pasted into Writer, Word ...

  2. maven 引入外部jar包的几种方式(转)

    原文链接: maven 引入外部jar包的几种方式 方式1:dependency 本地jar包 <dependency> <groupId>com.hope.cloud< ...

  3. ReactNative: 搭建ReactNative开发环境

    搭建ReactNative开发环境 不废话,具体步骤如下: 一.安装需要的软件 1.Homebrew Homebrew, Mac系统的包管理器,用于安装NodeJS和一些其他必需的工具软件. /usr ...

  4. Spark2.2+ES6.4.2(三十二):ES API之index的create/update/delete/open/close(创建index时设置setting,并创建index后根据avro模板动态设置index的mapping)

    要想通过ES API对es的操作,必须获取到TransportClient对象,让后根据TransportClient获取到IndicesAdminClient对象后,方可以根据IndicesAdmi ...

  5. [Canvas]双方战机展示

    源码点此下载,用chrome浏览器打开index.html观看. 图例: 代码: <!DOCTYPE html> <html lang="utf-8"> & ...

  6. Apache log4net™ 手册——介绍【翻译】

    原文地址 本文内容 配置 配置属性 应用程序 appSettings 配置文件 配置语法 追加器(Appenders) 筛选器(Filters) 布局(Layouts) 根记录器(Root Logge ...

  7. Dubbo的使用入门

    一.包引入 1.父模块pom.xml中加入依赖: <!-- dubbo --> <dependency> <groupId>com.alibaba.boot< ...

  8. V-rep学习笔记:关节力矩控制

    Torque or force mode When the joint motor is enabled and the control loop is disabled, then the join ...

  9. python3用BeautifulSoup抓取id='xiaodeng',且正则包含‘elsie’的标签

    # -*- coding:utf-8 -*- #python 2.7 #XiaoDeng #http://tieba.baidu.com/p/2460150866 #使用多个指定名字的参数可以同时过滤 ...

  10. 抓取epsg.io的内容

    简述 epsg.io是一个查询EPSG坐标系相关信息的好网站,内容很全.有各种格式的定义可以直接下载,也有坐标系的范围名称等相关信息,所以想抓取这些信息下来,方便对接各个系统. epsg.io本身是开 ...