Ask Your Question
0

ERROR: openstack The request you have made requires authentication. (HTTP 401)

asked 2015-05-24 08:02:22 -0500

Kamil Babayev gravatar image

updated 2015-05-24 08:03:40 -0500

I am installing openstack Kilo on Ubuntu 14. I am using official documentation for step by step installtion. As I reach to
openstack service create --name keystone --description "OpenStack Identity" identity

command I can not continue so I get this error message:

ERROR: openstack The request you have made requires authentication. (HTTP 401)

I have checked already with two fresh installed server. Maybe this is bug with Kilo release . Please help me with this issue.

edit retag flag offensive close merge delete

Comments

Hi, could you paste here the tail of /var/log/keystone/keystone.log?

Jose gravatar imageJose ( 2015-05-25 09:20:16 -0500 )edit

7 answers

Sort by ยป oldest newest most voted
1

answered 2015-05-25 00:39:16 -0500

hello,

please check these values are available in environment env

export OS_TOKEN=ADMIN_TOKEN
export OS_TOKEN=294a4c8a8a475f9b9836
export OS_URL=http://controller:35357/v2.0

and these values are local to the terminal.

edit flag offensive delete link more

Comments

How did you get the OS_TOKEN value?

sanjana gravatar imagesanjana ( 2017-06-07 00:24:46 -0500 )edit

openssl rand -hex 10

mheniMerzouki gravatar imagemheniMerzouki ( 2019-01-17 11:00:57 -0500 )edit
1

answered 2017-11-04 12:49:51 -0500

ulrich_nathan@yahoo.fr gravatar image

Hello,

I am now building Openstack newton on CentOs 7, using official Documentation (https://docs.openstack.org/newton/install-guide-rdo/glance-install.html (https://docs.openstack.org/newton/ins...)).

I failed when wanting to launch this commande : openstack project create --domain default --description "Service Project" service I had a same error "The request you have made requires authentication. (HTTP 401)l"

For troobleshooting, what i did :

  • I uncommented the line "admin_token = <none>" under section [DEFAULT] of /etc/keystone/keystone.conf.
  • I relauched these command :
    • /bin/sh -c "keystone-manage db_sync" keystone (without su - because I'm root user (warning), after that, please connect to the database and check if all keystones tables are created)
    • keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone
    • keystone-manage credential_setup --keystone-user keystone --keystone-group keystone
    • keystone-manage bootstrap --bootstrap-password ADMIN_PASS --bootstrap-admin-url http://controller:35357/v3/ --bootstrap-internal-url http://controller:35357/v3/ --bootstrap-public-url http://controller:5000/v3/ --bootstrap-region-id RegionOne

After relauching openstack command, everything seems to work fine.

P.S : I don't know what are the repercussion of these manip, but actually, it seems to work fine for me. Maybe it could help someone.

Regards

edit flag offensive delete link more

Comments

Thank you so much !!

Zwayyed gravatar imageZwayyed ( 2018-07-29 21:33:41 -0500 )edit
0

answered 2016-11-24 03:14:53 -0500

Ali Solangi gravatar image

I am working on Openstack Newton with Ubunutu 16.04 release, follwoing http://docs.openstack.org/newton/install-guide-ubuntu/keystone-install.html (http://docs.openstack.org/newton/inst...), this is fresh installation, once I'm going to create "openstack project create --domain default --description "Service Project" service"

It throws error: "The request you have made requires authentication. (HTTP 401)l"

keystone.log complaining: keystone.auth.controllers Could not find domain: default Authorization failed. The request you have made requires authentication. from 10.0.0.11

In Liberty, normally we give admin-token, but here In Newton, there is no any token is suggested.

Any help will be appreciated.

edit flag offensive delete link more

Comments

Guys, I solved this problem, there was a mistake export OS_AUTH_URL=http://localhost:35357/v3

instead of "http://controller:35357/v3 hope this may be help full for some one.

I used

Ali Solangi gravatar imageAli Solangi ( 2016-11-25 14:25:44 -0500 )edit
1

I have the same problem. any help will be appreciated...

dtom gravatar imagedtom ( 2016-11-29 09:00:44 -0500 )edit

@dtom, check this link https://bugs.launchpad.net/openstack-manuals/+bug/1644641 (https://bugs.launchpad.net/openstack-...), I have solved for my one node, but for second controller, I'm facing the same problem, I have re-installed my server, followed strictly installation guide but no luck for 2nd controller, try this method, it may help!

Ali Solangi gravatar imageAli Solangi ( 2016-11-29 10:15:19 -0500 )edit

Hi I had the same issue. I used postgresql as database backend in the beginning. With the change to the default database mysql/mariadb all works fine now.

Meckie gravatar imageMeckie ( 2016-12-13 07:14:02 -0500 )edit

I digged a bit deeper. Looks like a case issue in the SQL requests. Postgresql is case sensitive and mysql isn't. Not sure how to solve this, since I'm not a programmer. It's in the where clause when the project name gets filtered. Keystone asks for "default", but the database has only an "Default"

Meckie gravatar imageMeckie ( 2016-12-13 07:47:58 -0500 )edit
0

answered 2015-09-25 10:00:58 -0500

Kalyan gravatar image

The fix is simple. 3 check points required here :

  1. ADMIN_TOKEN should be generated using "openssl rand -hex 10" command and should be applied in /etc/keystone/keystone.conf file "ADMIN_TOKEN" section. ( eg : ADMIN_TOKEN=<your generated="" token="" id="">

  2. endpoint URL should be the hostname of your controller machine. Use the exact hostname which you have configured in your linux /etc/hosts and /etc/hostname files.

  3. database connection in /etc/keystone/keystone.conf file should be reflecting the same hostname of your controller machine. eg : connection=mysql://keystone:DB_PASSWD@<hostname>/keystone

NOTE : I am using my hostname as http://controller.example.com and i have configured DNS with my controller machine as master DNS, compute and network as clients. ( This is not mandatory ).

edit flag offensive delete link more
0

answered 2015-05-29 18:44:49 -0500

yaolin gravatar image

updated 2015-05-29 18:57:56 -0500

I am getting the same error with Kilo/Ubuntu 14.04.

OS_TOKEN is the same as admin_token in /etc/keystone/keystone.conf. I also make sure connection in /etc/keystone/keystone.conf is set correctly.

I used to have icehouse running on this machine.

One interesting thing is that, when I first upgrade from icehouse to kilo, I was still using mysql instead of mariadb. I didn't have this issue. Howevr, I got into other issue further down the path. So I dropped database keystone, removed mysql, installed mariadb; and create database keystone. Now I am getting this error.

edit flag offensive delete link more
0

answered 2015-05-27 00:14:10 -0500

Kamil Babayev gravatar image

Thanks for your answers. As it was demonstration in Forum. I build it with Juno release successfully. I hope your comments will be helpful for others and me in future deployment. I will try Kilo installation again if same errors occur again I will feedback here.

Thanks for all.

edit flag offensive delete link more
0

answered 2015-05-25 09:21:32 -0500

Jose gravatar image

I would check the database connection is in the [database] section or properly defined on your keystone.conf file.

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

3 followers

Stats

Asked: 2015-05-24 08:02:22 -0500

Seen: 51,871 times

Last updated: Nov 24 '16