Revision history [back]

click to hide/show revision 1
initial version

heat stack-list returns ERROR: Authentication required

    So I followed the instructions at http://docs.openstack.org/juno/install-guide/install/yum/content/heat-install-controller-node.html to get heat installed, and all took fine. When I've started heat try to query I get:

    # heat --debug stack-list
    DEBUG (session) REQ: curl -i -X GET http://192.168.2.159:5000/v2.0/ -H "Accept: application/json" -H "User-Agent: python-keystoneclient"
    DEBUG (session) RESP: [200] {'content-length': '423', 'vary': 'X-Auth-Token', 'server': 'Apache/2.4.6 (CentOS)', 'connection': 'close', 'date': 'Thu, 19 Mar 2015 16:19:37 GMT', 'content-type': 'application/json'} 
    RESP BODY: {"version": {"status": "stable", "updated": "2014-04-17T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v2.0+json"}, {"base": "application/xml", "type": "application/vnd.openstack.identity-v2.0+xml"}], "id": "v2.0", "links": [{"href": "http://192.168.2.159:5000/v2.0/", "rel": "self"}, {"href": "http://docs.openstack.org/", "type": "text/html", "rel": "describedby"}]}}

    DEBUG (v2) Making authentication request to http://192.168.2.159:5000/v2.0/tokens
    DEBUG (session) REQ: curl -i -X GET http://192.168.2.159:8004/v1/df4608f936424a0cbe9633e64b276ab0/stacks? -H "Accept: application/json" -H "User-Agent: python-heatclient" -H "X-Region-Name: RegionOne" -H "X-Auth-Token: TOKEN_REDACTED" -H "Content-Type: application/json" -H "X-Auth-Url: http://192.168.2.159:5000/v2.0/"
    DEBUG (session) RESP:
    DEBUG (v2) Making authentication request to http://192.168.2.159:5000/v2.0/tokens
    DEBUG (session) RESP:
    Traceback (most recent call last):
      File "/usr/bin/heat", line 10, in <module>
        sys.exit(main())
      File "/usr/lib/python2.7/site-packages/heatclient/shell.py", line 656, in main
        HeatShell().main(args)
      File "/usr/lib/python2.7/site-packages/heatclient/shell.py", line 606, in main
        args.func(client, args)
      File "/usr/lib/python2.7/site-packages/heatclient/v1/shell.py", line 538, in do_stack_list
        utils.print_list(stacks, fields, sortby_index=3)
      File "/usr/lib/python2.7/site-packages/heatclient/openstack/common/cliutils.py", line 154, in print_list
        for o in objs:
      File "/usr/lib/python2.7/site-packages/heatclient/v1/stacks.py", line 85, in paginate
        stacks = self._list(url, 'stacks')
      File "/usr/lib/python2.7/site-packages/heatclient/openstack/common/apiclient/base.py", line 115, in _list
        body = self.client.get(url).json()
      File "/usr/lib/python2.7/site-packages/heatclient/common/http.py", line 280, in get
        return self.client_request("GET", url, **kwargs)
      File "/usr/lib/python2.7/site-packages/heatclient/common/http.py", line 273, in client_request
        resp, body = self.json_request(method, url, **kwargs)
      File "/usr/lib/python2.7/site-packages/heatclient/common/http.py", line 254, in json_request
        resp = self._http_request(url, method, **kwargs)
      File "/usr/lib/python2.7/site-packages/heatclient/common/http.py", line 344, in _http_request
        raise exc.from_response(resp)
    heatclient.exc.HTTPUnauthorized: ERROR: Authentication required


    2015-03-19 16:21:20.199 7175 WARNING keystonemiddleware.auth_token [-] Retrying on HTTP connection exception: Authentication failure: The request you have made requires authentication. (HTTP 401)
    2015-03-19 16:21:20.811 7175 WARNING keystonemiddleware.auth_token [-] Retrying on HTTP connection exception: Authentication failure: The request you have made requires authentication. (HTTP 401)
    2015-03-19 16:21:21.871 7175 WARNING keystonemiddleware.auth_token [-] Retrying on HTTP connection exception: Authentication failure: The request you have made requires authentication. (HTTP 401)
    2015-03-19 16:21:23.933 7175 ERROR keystonemiddleware.auth_token [-] HTTP connection exception: Authentication failure: The request you have made requires authentication. (HTTP 401)
    2015-03-19 16:21:23.933 7175 WARNING keystonemiddleware.auth_token [-] Authorization failed for token
    2015-03-19 16:21:23.933 7175 INFO keystonemiddleware.auth_token [-] Invalid user token - rejecting request
    2015-03-19 16:21:24.111 7175 WARNING keystonemiddleware.auth_token [-] Retrying on HTTP connection exception: Authentication failure: The request you have made requires authentication. (HTTP 401)
    2015-03-19 16:21:24.675 7175 WARNING keystonemiddleware.auth_token [-] Retrying on HTTP connection exception: Authentication failure: The request you have made requires authentication. (HTTP 401)
    2015-03-19 16:21:25.740 7175 WARNING keystonemiddleware.auth_token [-] Retrying on HTTP connection exception: Authentication failure: The request you have made requires authentication. (HTTP 401)
    2015-03-19 16:21:27.801 7175 ERROR keystonemiddleware.auth_token [-] HTTP connection exception: Authentication failure: The request you have made requires authentication. (HTTP 401)
    2015-03-19 16:21:27.801 7175 WARNING keystonemiddleware.auth_token [-] Authorization failed for token
    2015-03-19 16:21:27.801 7175 INFO keystonemiddleware.auth_token [-] Invalid user token - rejecting request


    So clearly username/password error. However, I can log into mysql with the heat username/password I've defined fine, and aslo with either the admin or demo user passwords listed in the relevant keystonerc files.

    For completeness, here's the entries I put into heat.conf:

    [DEFAULT]

    rpc_backend = rabbit
    rabbit_host = 192.168.2.159
    rabbit_password = guest
    heat_metadata_server_url = http://192.168.2.159:8000
    heat_waitcondition_server_url = http://192.168.2.159:8000/v1/waitcondition
    verbose = True
    ...
    [keystone_authtoken]
    auth_uri = http://192.168.2.159:5000/v2.0
    identity_uri = http://192.168.2.159:35357
    admin_tenant_name = service
    admin_user = heat
    admin_password = password
    [ec2authtoken]
    auth_uri = http://192.168.2.159:5000/v2.0

    As per a previous bug I've also checked the permisions on one of the tmp files:

    # ls -la /tmp/keystone-signing-heat
    total 8
    drwxr-xr-x.  2 heat heat    6 Mar 19 16:05 .
    drwxrwxrwt. 88 root root 4096 Mar 19 16:21 ..

    It doesn't matter whether I source the demo or admin rc files, same problem occurs.

I'm assuming it's the heat username/password it uses to authenticate?

I've even updated the password with:

keystone user-password-update --pass password heat

to make sure, but still no joy...

What am I missing this time!?! Thanks.

heat stack-list returns ERROR: Authentication required

 

So I followed the instructions at http://docs.openstack.org/juno/install-guide/install/yum/content/heat-install-controller-node.html to get heat installed, and all took fine. When I've started heat try to query I get: get:

    # heat --debug stack-list
    DEBUG (session) REQ: curl -i -X GET http://192.168.2.159:5000/v2.0/ -H "Accept: application/json" -H "User-Agent: python-keystoneclient"
    DEBUG (session) RESP: [200] {'content-length': '423', 'vary': 'X-Auth-Token', 'server': 'Apache/2.4.6 (CentOS)', 'connection': 'close', 'date': 'Thu, 19 Mar 2015 16:19:37 GMT', 'content-type': 'application/json'} 
    RESP BODY: {"version": {"status": "stable", "updated": "2014-04-17T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v2.0+json"}, {"base": "application/xml", "type": "application/vnd.openstack.identity-v2.0+xml"}], "id": "v2.0", "links": [{"href": "http://192.168.2.159:5000/v2.0/", "rel": "self"}, {"href": "http://docs.openstack.org/", "type": "text/html", "rel": "describedby"}]}}

    DEBUG (v2) Making authentication request to http://192.168.2.159:5000/v2.0/tokens
    DEBUG (session) REQ: curl -i -X GET http://192.168.2.159:8004/v1/df4608f936424a0cbe9633e64b276ab0/stacks? -H "Accept: application/json" -H "User-Agent: python-heatclient" -H "X-Region-Name: RegionOne" -H "X-Auth-Token: TOKEN_REDACTED" -H "Content-Type: application/json" -H "X-Auth-Url: http://192.168.2.159:5000/v2.0/"
    DEBUG (session) RESP:
    DEBUG (v2) Making authentication request to http://192.168.2.159:5000/v2.0/tokens
    DEBUG (session) RESP:
    Traceback (most recent call last):
      File "/usr/bin/heat", line 10, in <module>
        sys.exit(main())
      File "/usr/lib/python2.7/site-packages/heatclient/shell.py", line 656, in main
        HeatShell().main(args)
      File "/usr/lib/python2.7/site-packages/heatclient/shell.py", line 606, in main
        args.func(client, args)
      File "/usr/lib/python2.7/site-packages/heatclient/v1/shell.py", line 538, in do_stack_list
        utils.print_list(stacks, fields, sortby_index=3)
      File "/usr/lib/python2.7/site-packages/heatclient/openstack/common/cliutils.py", line 154, in print_list
        for o in objs:
      File "/usr/lib/python2.7/site-packages/heatclient/v1/stacks.py", line 85, in paginate
        stacks = self._list(url, 'stacks')
      File "/usr/lib/python2.7/site-packages/heatclient/openstack/common/apiclient/base.py", line 115, in _list
        body = self.client.get(url).json()
      File "/usr/lib/python2.7/site-packages/heatclient/common/http.py", line 280, in get
        return self.client_request("GET", url, **kwargs)
      File "/usr/lib/python2.7/site-packages/heatclient/common/http.py", line 273, in client_request
        resp, body = self.json_request(method, url, **kwargs)
      File "/usr/lib/python2.7/site-packages/heatclient/common/http.py", line 254, in json_request
        resp = self._http_request(url, method, **kwargs)
      File "/usr/lib/python2.7/site-packages/heatclient/common/http.py", line 344, in _http_request
        raise exc.from_response(resp)
    heatclient.exc.HTTPUnauthorized: ERROR: Authentication required


    2015-03-19 16:21:20.199 7175 WARNING keystonemiddleware.auth_token [-] Retrying on HTTP connection exception: Authentication failure: The request you have made requires authentication. (HTTP 401)
    2015-03-19 16:21:20.811 7175 WARNING keystonemiddleware.auth_token [-] Retrying on HTTP connection exception: Authentication failure: The request you have made requires authentication. (HTTP 401)
    2015-03-19 16:21:21.871 7175 WARNING keystonemiddleware.auth_token [-] Retrying on HTTP connection exception: Authentication failure: The request you have made requires authentication. (HTTP 401)
    2015-03-19 16:21:23.933 7175 ERROR keystonemiddleware.auth_token [-] HTTP connection exception: Authentication failure: The request you have made requires authentication. (HTTP 401)
    2015-03-19 16:21:23.933 7175 WARNING keystonemiddleware.auth_token [-] Authorization failed for token
    2015-03-19 16:21:23.933 7175 INFO keystonemiddleware.auth_token [-] Invalid user token - rejecting request
    2015-03-19 16:21:24.111 7175 WARNING keystonemiddleware.auth_token [-] Retrying on HTTP connection exception: Authentication failure: The request you have made requires authentication. (HTTP 401)
    2015-03-19 16:21:24.675 7175 WARNING keystonemiddleware.auth_token [-] Retrying on HTTP connection exception: Authentication failure: The request you have made requires authentication. (HTTP 401)
    2015-03-19 16:21:25.740 7175 WARNING keystonemiddleware.auth_token [-] Retrying on HTTP connection exception: Authentication failure: The request you have made requires authentication. (HTTP 401)
    2015-03-19 16:21:27.801 7175 ERROR keystonemiddleware.auth_token [-] HTTP connection exception: Authentication failure: The request you have made requires authentication. (HTTP 401)
    2015-03-19 16:21:27.801 7175 WARNING keystonemiddleware.auth_token [-] Authorization failed for token
    2015-03-19 16:21:27.801 7175 INFO keystonemiddleware.auth_token [-] Invalid user token - rejecting request
 

So clearly username/password error. However, I can log into mysql with the heat username/password I've defined fine, and aslo with either the admin or demo user passwords listed in the relevant keystonerc files. files.

For completeness, here's the entries I put into heat.conf: heat.conf:

    [DEFAULT]

    rpc_backend = rabbit
    rabbit_host = 192.168.2.159
    rabbit_password = guest
    heat_metadata_server_url = http://192.168.2.159:8000
    heat_waitcondition_server_url = http://192.168.2.159:8000/v1/waitcondition
    verbose = True
    ...
    [keystone_authtoken]
    auth_uri = http://192.168.2.159:5000/v2.0
    identity_uri = http://192.168.2.159:35357
    admin_tenant_name = service
    admin_user = heat
    admin_password = password
    [ec2authtoken]
    auth_uri = http://192.168.2.159:5000/v2.0
 

As per a previous bug I've also checked the permisions on one of the tmp files: files:

    # ls -la /tmp/keystone-signing-heat
    total 8
    drwxr-xr-x.  2 heat heat    6 Mar 19 16:05 .
    drwxrwxrwt. 88 root root 4096 Mar 19 16:21 ..
 

It doesn't matter whether I source the demo or admin rc files, same problem occurs. occurs.

I'm assuming it's the heat username/password it uses to authenticate? authenticate?

I've even updated the password with: with:

keystone user-password-update --pass password heat
 

to make sure, but still no joy...

joy...

What am I missing this time!?! Thanks.