Ask Your Question
0

keystoneauth1.exceptions.auth.AuthorizationFailure: Authorization Failed: (http://127.0.0.1/identity/v3/tokens): The resource could not be found. (HTTP 404)

asked 2017-07-30 23:01:41 -0600

rajivmucheli gravatar image

Hi All,

I am trying to install the below prometheus_openstack exporter, on Devstack Pike:

https://github.com/gvauter/prometheus_openstack (https://github.com/gvauter/prometheus...)

All the openstack commands works (with admin credentials), for example:

stack@i331795-devstack:~/devstack$ openstack project list +----------------------------------+--------------------+ | ID | Name | +----------------------------------+--------------------+ | 2d3d2485ba3e4abba3d023737f769e28 | invisible_to_admin | | 39dc7e5682734b55a821f6c7b16ae4ac | alt_demo | | ab7b8e2a24e5425d97fc556d04781b0f | admin | | b84aaa311fdf48bdaf733d8ba0c31679 | service | | bc379373112345eabee389dc6e2806a3 | demo | +----------------------------------+--------------------+

stack@i331795-devstack:~/devstack$ openstack service list +----------------------------------+-------------+----------------+ | ID | Name | Type | +----------------------------------+-------------+----------------+ | 124408cb831a45e0af94df441b35ad4f | cinderv2 | volumev2 | | 12827dffa93643a995675cbf84d2bc17 | glance | image | | 2ec547eb67af4e6da35fc91cd032c121 | cinderv3 | volumev3 | | 4b62270d7d244a0dab1ab7381e5210be | keystone | identity | | 690d2eec94554d7ca7ff6da56edde2e9 | neutron | network | | 6ca258124b8c4ca2837db3320fc43398 | cinder | volume | | 7a00a48b903140569b3c41ad75dd2bb7 | nova | compute | | d6d41cd2847b463584f25217928086ee | nova_legacy | compute_legacy | | efcb5cadc4594e4eb668d2a8b9e3a988 | placement | placement | +----------------------------------+-------------+----------------+

But, while executing openstack_exporter --config config.yaml, as mentioned in the repo, i get the below error:

stack@i331795-devstack:~/devstack$ openstack_exporter --config config.yaml Traceback (most recent call last): File "/usr/local/bin/openstack_exporter", line 21, in <module> start_exporter(yaml.load(args.config), args.port, args.interval) File "/usr/local/lib/python2.7/dist-packages/openstack_exporter/exporter.py", line 12, in start_exporter REGISTRY.register(NovaCollector(config)) File "/usr/local/lib/python2.7/dist-packages/prometheus_client/core.py", line 50, in register names = self._get_names(collector) File "/usr/local/lib/python2.7/dist-packages/prometheus_client/core.py", line 86, in _get_names for metric in desc_func(): File "/usr/local/lib/python2.7/dist-packages/openstack_exporter/collector.py", line 27, in collect auth_url = auth_url) File "/usr/local/lib/python2.7/dist-packages/keystoneclient/v2_0/client.py", line 176, in __init__ self.authenticate() File "/usr/local/lib/python2.7/dist-packages/positional/__init__.py", line 101, in inner return wrapped(*args, kwargs) File "/usr/local/lib/python2.7/dist-packages/keystoneclient/httpclient.py", line 581, in authenticate resp = self.get_raw_token_from_identity_service(kwargs) File "/usr/local/lib/python2.7/dist-packages/keystoneclient/v2_0/client.py", line 220, in get_raw_token_from_identity_service _("Authorization Failed: %s") % e) keystoneauth1.exceptions.auth.AuthorizationFailure: Authorization Failed: (http://127.0.0.1/identity/v3/tokens): The resource could not be found. (HTTP 404) (Request-ID: req-1f780410-5ea3-4f58-a9d6-119742392351)

Below is the config.yaml:

openstack: username: admin password: secret tenant: admin auth_url: http://127.0.0.1/identity/v3

Troubleshooting: 1. I added the below in keystone.conf

admin_token = gAAAAABZfqcDnDRJ81TnXs6wzTHZlgdJHYeXJRwHbBXSvdaOXhYKVcJLBCdeBjRN9mq8aBYy5_hLGZ516nLqRIo-9r2eG2vt_nYF6Yh0gFy4tH0bmG_1TdZFdjmjAE30Y8fkNXS-Ij5gMBZ8cCO-OQDLkxRtOV8EZS3Z65hnz8Yt6RbN6ScbXYY public_endpoint = http://127.0.0.1/identity/v3

public_endpoint = http://127.0.0.1/identity/v3 admin_endpoint = http://127.0.0.1/identity/v3

  1. /var/log/syslog shows the same authentication error.

  2. I did review this forum but had no luck.

Please check the above and please let me know if further data would be required!!

Regards, Rajiv

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-08-02 08:12:18 -0600

sowmya gravatar image

updated 2017-08-03 01:09:28 -0600

Do check, if the version of the keystoneclient matches with the version listed for the openstack release and update the client accordingly.

From the above log

File "/usr/local/lib/python2.7/dist-packages/keystoneclient/v2_0/client.py",

looks like the keystone client is pointing to V2_0 version. Set OS_IDENTITY_API_VERSION=3 while exporting the ENV variables (or add to openrc file).

Hope that helps.!

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2017-07-30 23:01:41 -0600

Seen: 450 times

Last updated: Aug 03 '17