[openstack-dev] [gnocchi] gnocchi-keystone verification failed.

__ mango. 935540343 at qq.com
Thu Mar 15 04:03:45 UTC 2018


hi,
I have a question about the validation of gnocchi keystone.
I run the following command, but it is not successful.(api.auth_mode :basic, basic mode can be successful)

# gnocchi status --debug
REQ: curl -g -i -X GET http://localhost:8041/v1/status?details=False -H "Authorization: {SHA1}d4daf1cf567f14f32dbc762154b3a281b4ea4c62" -H "Accept: application/json, */*" -H "User-Agent: gnocchi keystoneauth1/3.1.0 python-requests/2.18.1 CPython/2.7.12"
Starting new HTTP connection (1): localhost
http://localhost:8041 "GET /v1/status?details=False HTTP/1.1" 401 114
RESP: [401] Content-Type: application/json Content-Length: 114 WWW-Authenticate: Keystone uri='http://192.168.12.244:5000/v3' Connection: Keep-Alive 
RESP BODY: {"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}}

The request you have made requires authentication. (HTTP 401)
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/cliff/app.py", line 400, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python2.7/dist-packages/cliff/display.py", line 113, in run
    column_names, data = self.take_action(parsed_args)
  File "/usr/local/lib/python2.7/dist-packages/gnocchiclient/v1/status_cli.py", line 23, in take_action
    status = utils.get_client(self).status.get()
  File "/usr/local/lib/python2.7/dist-packages/gnocchiclient/v1/status.py", line 21, in get
    return self._get(self.url + '?details=%s' % details).json()
  File "/usr/local/lib/python2.7/dist-packages/gnocchiclient/v1/base.py", line 37, in _get
    return self.client.api.get(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/keystoneauth1/adapter.py", line 288, in get
    return self.request(url, 'GET', **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/gnocchiclient/client.py", line 52, in request
    raise exceptions.from_response(resp, method)
Unauthorized: The request you have made requires authentication. (HTTP 401)
Traceback (most recent call last):
  File "/usr/local/bin/gnocchi", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/gnocchiclient/shell.py", line 251, in main
    return GnocchiShell().run(args)
  File "/usr/lib/python2.7/dist-packages/cliff/app.py", line 279, in run
    result = self.run_subcommand(remainder)
  File "/usr/lib/python2.7/dist-packages/cliff/app.py", line 400, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python2.7/dist-packages/cliff/display.py", line 113, in run
    column_names, data = self.take_action(parsed_args)
  File "/usr/local/lib/python2.7/dist-packages/gnocchiclient/v1/status_cli.py", line 23, in take_action
    status = utils.get_client(self).status.get()
  File "/usr/local/lib/python2.7/dist-packages/gnocchiclient/v1/status.py", line 21, in get
    return self._get(self.url + '?details=%s' % details).json()
  File "/usr/local/lib/python2.7/dist-packages/gnocchiclient/v1/base.py", line 37, in _get
    return self.client.api.get(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/keystoneauth1/adapter.py", line 288, in get
    return self.request(url, 'GET', **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/gnocchiclient/client.py", line 52, in request
    raise exceptions.from_response(resp, method)
gnocchiclient.exceptions.Unauthorized: The request you have made requires authentication. (HTTP 401)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20180315/1eb4df57/attachment.html>


More information about the OpenStack-dev mailing list