Ask Your Question
0

"ERROR: Unauthorized (HTTP 401)" after i input command "nova image-list

asked 2014-04-12 21:14:29 -0500

tongzhou gravatar image

updated 2014-04-13 05:59:58 -0500

Hi Guys,

I follow the beginner install guide step by step and got the error message "ERROR: Unauthorized (HTTP 401)" after i input command "nova image-list".

the document link is http://docs.openstack.org/havana/install-guide/install/apt/content/nova-controller.html (http://docs.openstack.org/havana/inst...)

And I check the config file again and again, still have the problem.

  1. "glance image-list" is ok for me.

  2. the "nova --debug image-list" error message is

DEBUG (shell:740) Unauthorized (HTTP 401) Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/novaclient/shell.py", line 737, in main OpenStackComputeShell().main(map(strutils.safe_decode, sys.argv[1:])) File "/usr/lib/python2.7/dist-packages/novaclient/shell.py", line 673, in main args.func(self.cs, args) File "/usr/lib/python2.7/dist-packages/novaclient/v1_1/shell.py", line 915, in do_image_list image_list = cs.images.list(limit=limit) File "/usr/lib/python2.7/dist-packages/novaclient/v1_1/images.py", line 54, in list return self._list('/images%s%s' % (detail, query), 'images') File "/usr/lib/python2.7/dist-packages/novaclient/base.py", line 61, in _list _resp, body = self.api.client.get(url) File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line 229, in get return self._cs_request(url, 'GET', **kwargs) File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line 226, in _cs_request raise e Unauthorized: Unauthorized (HTTP 401) ERROR: Unauthorized (HTTP 401)

edit retag flag offensive close merge delete

Comments

Would try :-

    # .  ./keystonerc_admin
    where
    root@dfw02 ~(keystone_admin)]$ cat  keystonerc_admin
    export OS_USERNAME=admin
    export OS_TENANT_NAME=admin
    export OS_PASSWORD=xxxxxxxx
    export OS_AUTH_URL=http://192.168.1.127:35357/v2.0/
    export PS1='[\u@\h \W(keystone_admin)]$ '
    and run command again

Another option Login to dashboard as admin and set status of images to Public is YES
dbaxps gravatar imagedbaxps ( 2014-04-13 00:15:29 -0500 )edit

I have already run it before, but it don't work for me

tongzhou gravatar imagetongzhou ( 2014-04-13 06:05:17 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-04-15 00:53:47 -0500

fifieldt gravatar image

updated 2014-04-15 00:56:37 -0500

You probably have the wrong settings in keystone_authtoken in nova.conf. The 401 is coming from nova failing to authenticate with another OpenStack service.

Check your keystone logs.

edit flag offensive delete link more

Comments

thanks for your answer, here is my nova.conf.

[[keystone_authtoken]

auth_host = controller

auth_port = 35357

auth_protocol = http

admin_tenant_name = service

admin_user = nova

admin_password = MYPASSWORD
tongzhou gravatar imagetongzhou ( 2014-04-15 01:55:21 -0500 )edit

keystone.log:

2014-04-15 14:54:45.627 31400 WARNING keystone.common.wsgi [-] Authorization failed. The request you have made requires authentication. from 127.0.0.1

2014-04-15 14:54:45.722 31400 WARNING keystone.common.wsgi [-] Authorization failed. The request you have made requires authentication. from 127.0.0.1

tongzhou gravatar imagetongzhou ( 2014-04-15 01:58:26 -0500 )edit

see the '[[' in your nova.conf ... looks like a typo?

fifieldt gravatar imagefifieldt ( 2014-04-21 06:25:53 -0500 )edit

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

2 followers

Stats

Asked: 2014-04-12 21:14:29 -0500

Seen: 8,382 times

Last updated: Apr 15 '14