Ask Your Question
1

ERROR: Authorization Failed: The resource could not be found. (HTTP 404)

asked 2013-11-08 06:38:37 -0600

rahatapash gravatar image

Hi,

While creating a stack through heat we are getting this error (we are getting the same error from admin and demo users . The command is -

heat stack-create mystack --template-file=my.template

and this is my.template , just to create a single instance -

cat my.template

heat_template_version: 2013-05-23

description: Simple template to deploy a single compute instance

resources: my_instance: type: OS::Nova::Server properties: key_name: heat_key image: F17 flavor: m1.small

Below is our heat-engine.log -

2013-11-08 11:57:57.918 6896 INFO heat.engine.service [-] template is {u'heat_template_version': u'2013-05-23', u'description': u'Simple template to deploy a single compute instance', u'resources': {u'my_instance': {u'type': u'OS::Nova::Server', u'properties': {u'key_name': u'heat_key', u'image': u'F17', u'flavor': u'm1.small'}}}} 2013-11-08 11:57:57.944 6896 INFO heat.engine.resource [-] Validating Server "my_instance" 2013-11-08 11:57:57.986 6896 INFO urllib3.connectionpool [-] Starting new HTTP connection (1): 192.168.2.5 2013-11-08 11:57:57.990 6896 ERROR heat.engine.parser [-] Authorization Failed: The resource could not be found. (HTTP 404) 2013-11-08 11:57:57.990 6896 TRACE heat.engine.parser Traceback (most recent call last): 2013-11-08 11:57:57.990 6896 TRACE heat.engine.parser File "/usr/lib/python2.7/dist-packages/heat/engine/parser.py", line 308, in validate 2013-11-08 11:57:57.990 6896 TRACE heat.engine.parser result = res.validate() 2013-11-08 11:57:57.990 6896 TRACE heat.engine.parser File "/usr/lib/python2.7/dist-packages/heat/engine/resources/server.py", line 371, in validate 2013-11-08 11:57:57.990 6896 TRACE heat.engine.parser nova_utils.get_keypair(self.nova(), key_name) 2013-11-08 11:57:57.990 6896 TRACE heat.engine.parser File "/usr/lib/python2.7/dist-packages/heat/engine/resource.py", line 315, in nova 2013-11-08 11:57:57.990 6896 TRACE heat.engine.parser return self.stack.clients.nova(service_type) 2013-11-08 11:57:57.990 6896 TRACE heat.engine.parser File "/usr/lib/python2.7/dist-packages/heat/engine/clients.py", line 111, in nova 2013-11-08 11:57:57.990 6896 TRACE heat.engine.parser management_url = self.url_for(service_type=service_type) 2013-11-08 11:57:57.990 6896 TRACE heat.engine.parser File "/usr/lib/python2.7/dist-packages/heat/engine/clients.py", line 86, in url_for 2013-11-08 11:57:57.990 6896 TRACE heat.engine.parser return self.keystone().url_for(kwargs) 2013-11-08 11:57:57.990 6896 TRACE heat.engine.parser File "/usr/lib/python2.7/dist-packages/heat/common/heat_keystoneclient.py", line 309, in url_for 2013-11-08 11:57:57.990 6896 TRACE heat.engine.parser return self.client_v2.service_catalog.url_for(kwargs) 2013-11-08 11:57:57.990 6896 TRACE heat.engine.parser File "/usr/lib/python2.7/dist-packages/heat/common/heat_keystoneclient.py", line 73, in client_v2 2013-11-08 11:57:57.990 6896 TRACE heat.engine.parser self._client_v2 = self._v2_client_init() 2013-11-08 11:57:57.990 6896 TRACE heat.engine.parser File "/usr/lib/python2.7/dist-packages/heat/common/heat_keystoneclient.py", line 103, in _v2_client_init 2013-11-08 11:57:57.990 6896 TRACE heat.engine ... (more)

edit retag flag offensive close merge delete

10 answers

Sort by ยป oldest newest most voted
0

answered 2013-11-09 19:27:02 -0600

bmartins gravatar image

just to add to my previous comment the heat-api log shows the below, validated the service auth, endpoint URL's etc. I haven't tried submitting this through the API yet, but was validating this setup as I normally do using the heat cli.

2013-11-09 14:19:57.903 1723 ERROR root [-] Unexpected error occurred serving API: Authorization Failed: The resource could not be found. (HTTP 404) 2013-11-09 14:19:57.903 1723 TRACE root Traceback (most recent call last): 2013-11-09 14:19:57.903 1723 TRACE root File "/usr/lib/python2.7/dist-packages/heat/common/wsgi.py", line 661, in __call__ 2013-11-09 14:19:57.903 1723 TRACE root request, *action_args) 2013-11-09 14:19:57.903 1723 TRACE root File "/usr/lib/python2.7/dist-packages/heat/common/wsgi.py", line 729, in dispatch 2013-11-09 14:19:57.903 1723 TRACE root return method(args, *kwargs) 2013-11-09 14:19:57.903 1723 TRACE root File "/usr/lib/python2.7/dist-packages/heat/api/openstack/v1/util.py", line 30, in handle_stack_method 2013-11-09 14:19:57.903 1723 TRACE root return handler(controller, req, *kwargs) 2013-11-09 14:19:57.903 1723 TRACE root File "/usr/lib/python2.7/dist-packages/heat/api/openstack/v1/stacks.py", line 221, in create 2013-11-09 14:19:57.903 1723 TRACE root data.args()) 2013-11-09 14:19:57.903 1723 TRACE root File "/usr/lib/python2.7/dist-packages/heat/rpc/client.py", line 88, in create_stack 2013-11-09 14:19:57.903 1723 TRACE root params=params, files=files, args=args)) 2013-11-09 14:19:57.903 1723 TRACE root File "/usr/lib/python2.7/dist-packages/heat/openstack/common/rpc/proxy.py", line 126, in call 2013-11-09 14:19:57.903 1723 TRACE root result = rpc.call(context, real_topic, msg, timeout) 2013-11-09 14:19:57.903 1723 TRACE root File "/usr/lib/python2.7/dist-packages/heat/openstack/common/rpc/__init__.py", line 141, in call 2013-11-09 14:19:57.903 1723 TRACE root return _get_impl().call(CONF, context, topic, msg, timeout) 2013-11-09 14:19:57.903 1723 TRACE root File "/usr/lib/python2.7/dist-packages/heat/openstack/common/rpc/impl_kombu.py", line 816, in call 2013-11-09 14:19:57.903 1723 TRACE root rpc_amqp.get_connection_pool(conf, Connection)) 2013-11-09 14:19:57.903 1723 TRACE root File "/usr/lib/python2.7/dist-packages/heat/openstack/common/rpc/amqp.py", line 574, in call 2013-11-09 14:19:57.903 1723 TRACE root rv = list(rv) 2013-11-09 14:19:57.903 1723 TRACE root File "/usr/lib/python2.7/dist-packages/heat/openstack/common/rpc/amqp.py", line 539, in __iter__ 2013-11-09 14:19:57.903 1723 TRACE root raise result 2013-11-09 14:19:57.903 1723 TRACE root StackValidationFailed_Remote: Authorization Failed: The resource could not be found. (HTTP 404) 2013-11-09 14:19:57.903 1723 TRACE root Traceback (most recent call last): 2013-11-09 14:19:57.903 1723 TRACE root 2013-11-09 14:19:57.903 1723 TRACE root File "/usr/lib/python2.7/dist-packages/heat/openstack/common/rpc/amqp.py", line 461, in ... (more)

edit flag offensive delete link more
0

answered 2013-11-09 21:48:50 -0600

bmartins gravatar image

I was able to resolve my problem by adding the below to the /etc/heat/api-paste.ini

auth_uri = http://${keystone-server}:35357/v2.0

replace the ${keystone-server} with your keystone server and restart the heat services

service heat-engine restart service heat-api restart service heat-api-cfn restart

edit flag offensive delete link more
0

answered 2013-11-08 16:25:57 -0600

Did you customized your keystone-paste.ini ?

edit flag offensive delete link more
0

answered 2013-11-09 18:58:27 -0600

bmartins gravatar image

I am seeing the same thing on one of my test setups as well, I have not customized the keystone-paste.ini

edit flag offensive delete link more
0

answered 2013-11-09 23:26:56 -0600

Actually, api-paste.ini is not meant to be modified ever.

Instead could you please try setting auth_uri in /etc/heat/heat.conf, sections [keystone_authtoken] and [ec2authtoken]

edit flag offensive delete link more
0

answered 2013-11-10 01:10:14 -0600

bmartins gravatar image

sorry typo in my config which caused the API to fail to start, so you are correct

but if what you say is true all of the installation guides should be changed than to modify the heat.conf and not the api-paste.ini

anyway hopefully what I posted helps the original poster with their problem.

edit flag offensive delete link more
0

answered 2013-11-10 20:11:58 -0600

I've asked that section 7 of http://docs.openstack.org/havana/install-guide/install/apt/content/heat-install.html (http://docs.openstack.org/havana/inst...) be updated to refer to heat.conf instead of api-paste.ini.

I haven't found any other install guide which mentions api-paste.ini. If you know of any then please let me know so they can be corrected.

thanks.

edit flag offensive delete link more
0

answered 2013-11-11 06:09:10 -0600

rahatapash gravatar image

I have only added auth_url in /etc/heat/api-paste.ini as below

[filter:authtoken] paste.filter_factory = heat.common.auth_token:filter_factory auth_host = 192.168.2.5 auth_port = 35357 auth_protocol = http admin_tenant_name = service admin_user = heat admin_password = service_pass auth_uri = http://192.168.2.5:35357/v2.0

And restarted heat related services, Now i am successfully creating satck. My problem was solved.

Thanks for your help.

edit flag offensive delete link more
0

answered 2014-02-24 10:33:05 -0600

boum gravatar image

Hi i did the same and it also solved my issue : StackValidationFailed: Authorization Failed: The resource could not be found. (HTTP 404)

Auth middleware that validates token against keystone

[filter:authtoken] paste.filter_factory = heat.common.auth_token:filter_factory

Bugg manual add

auth_uri = http://172.17.1.99:35357/v2.0

Thanks

edit flag offensive delete link more
0

answered 2013-11-10 00:59:58 -0600

bmartins gravatar image

Steven thanks, but [keystone_authtoken] does not exist in the default package for heat.conf ?

removing that configuration from the /etc/heat/api-paste.ini and placing it in /etc/heat/heat.conf as you suggested causes the heat-api and heat-api-cfn to fail to start.

modifying this file is indicated in the installation guide on the openstack site and many others including redhat's installation guide for openstack

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: 2013-11-08 06:38:37 -0600

Seen: 6,975 times

Last updated: Feb 24 '14