Ask Your Question
0

nova.api.openstack Unauthorized: The request you have made requires authentication. (HTTP 401) error while launching instance

asked 2015-06-25 09:57:20 -0500

ogzy gravatar image

Below is the nova-api.log output while i am trying to launch a cirros instance:

2015-06-25 17:48:02.259 30315 DEBUG oslo_concurrency.lockutils [req-e2fdaac9-e40d-42fe-83dc-b1075c80b2b7 d4f493a61db34b7c9a762c8896c393ce c3b4d0862a9248afbd8a61f708e85757 - - -] Acquired semaphore "neutron_admin_auth_token_lock" lock /usr/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py:391
2015-06-25 17:48:02.259 30315 DEBUG keystoneclient.auth.identity.v2 [req-e2fdaac9-e40d-42fe-83dc-b1075c80b2b7 d4f493a61db34b7c9a762c8896c393ce c3b4d0862a9248afbd8a61f708e85757 - - -] Making authentication request to http://controller:35357/v2.0/tokens get_auth_ref /usr/lib/python2.7/dist-packages/keystoneclient/auth/identity/v2.py:76
2015-06-25 17:48:02.321 30315 DEBUG keystoneclient.session [req-e2fdaac9-e40d-42fe-83dc-b1075c80b2b7 d4f493a61db34b7c9a762c8896c393ce c3b4d0862a9248afbd8a61f708e85757 - - -] Request returned failure status: 401 request /usr/lib/python2.7/dist-packages/keystoneclient/session.py:388
2015-06-25 17:48:02.322 30315 DEBUG oslo_concurrency.lockutils [req-e2fdaac9-e40d-42fe-83dc-b1075c80b2b7 d4f493a61db34b7c9a762c8896c393ce c3b4d0862a9248afbd8a61f708e85757 - - -] Releasing semaphore "neutron_admin_auth_token_lock" lock /usr/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py:404
2015-06-25 17:48:02.323 30315 ERROR nova.api.openstack [req-e2fdaac9-e40d-42fe-83dc-b1075c80b2b7 d4f493a61db34b7c9a762c8896c393ce c3b4d0862a9248afbd8a61f708e85757 - - -] Caught error: The request you have made requires authentication. (HTTP 401) (Request-ID: req-3b9cc52b-077f-4baf-8f55-28ac22abc2df)
2015-06-25 17:48:02.323 30315 TRACE nova.api.openstack Traceback (most recent call last):
2015-06-25 17:48:02.323 30315 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/nova/api/openstack/__init__.py", line 125, in __call__
2015-06-25 17:48:02.323 30315 TRACE nova.api.openstack     return req.get_response(self.application)
2015-06-25 17:48:02.323 30315 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
2015-06-25 17:48:02.323 30315 TRACE nova.api.openstack     application, catch_exc_info=False)
2015-06-25 17:48:02.323 30315 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
2015-06-25 17:48:02.323 30315 TRACE nova.api.openstack     app_iter = application(self.environ, start_response)
2015-06-25 17:48:02.323 30315 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
2015-06-25 17:48:02.323 30315 TRACE nova.api.openstack     return resp(environ, start_response)
2015-06-25 17:48:02.323 30315 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/keystonemiddleware/auth_token/__init__.py", line 634, in __call__
2015-06-25 17:48:02.323 30315 TRACE nova.api.openstack     return self._call_app(env, start_response)
2015-06-25 17:48:02.323 30315 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/keystonemiddleware/auth_token/__init__.py", line 554, in _call_app
2015-06-25 17:48:02.323 30315 TRACE nova.api.openstack     return self._app(env, _fake_start_response)
2015-06-25 17:48:02.323 30315 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
2015-06-25 17:48:02.323 30315 TRACE nova.api.openstack     return resp(environ, start_response)
2015-06-25 17:48:02.323 30315 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
2015-06-25 17:48:02.323 30315 TRACE nova.api.openstack     return resp(environ, start_response)
2015-06-25 17:48:02.323 30315 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/routes/middleware.py", line 131, in __call__
2015-06-25 17:48:02.323 ...
(more)
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-06-26 03:20:55 -0500

RAHUL1603 gravatar image

Please check that you have permission to launch an instance. For doing this make sure you have admin permissions or you can login using admin user.

If you have the permissions and still not able to create the VM, delete the nova database from mysql.

delete database nova;

and recreate it, assign permissions to user nova.

GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'localhost' \ IDENTIFIED BY 'NOVA_DBPASS'; mysql> GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'%' \ IDENTIFIED BY 'NOVA_DBPASS';

and then do a sync su -s /bin/sh -c "nova-manage db sync" nova

and now the authorization should work.

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: 2015-06-25 09:57:20 -0500

Seen: 3,263 times

Last updated: Jun 26 '15