Ask Your Question
0

Keystone problem : Authorization Failed: An unexpected error prevented the server from fulfilling your request. (HTTP 500)

asked 2015-03-31 04:54:05 -0500

brahimo gravatar image

Hi everyone i have a problem with keystone, I am istalling openstack following this tutorial https://github.com/ChaimaGhribi/OpenStack-Icehouse-Installation/blob/master/OpenStack-Icehouse-Installation.rst (https://github.com/ChaimaGhribi/OpenS...) when i enset the environment variables OS_SERVICE_TOKEN and OS_SERVICE_ENDPOINT and load the credential file admin_creds, then when i started the command keystone user-list or keystone token-get i got the error :

Authorization Failed: An unexpected error prevented the server from fulfilling your request. (HTTP 500)

here the configuration i have: in /etc/keystone/keystone.conf

[database]
connection = mysql://keystone:KEYSTONE_DBPASS@localhost/keystone

[DEFAULT]
admin_token=ADMIN
log_dir=/var/log/keystone

when i set the environment variables to

OS_SERVICE_TOKEN=ADMIN
OS_SERVICE_ENDPOINT=http://controller:35357/v2.0

everything work but when i unset these variables and load the file

export OS_USERNAME=admin
export OS_PASSWORD=admin_pass
export OS_TENANT_NAME=admin
export OS_AUTH_URL=http://controller:35357/v2.0

then that error appears, can anyone help to know what is my problem ? here is the output of keystone debug

2015-03-31 09:02:57.275 4874 DEBUG keystone-all [-] ******************************************************************************** log_opt_values /usr/lib/python2.7/site-packages/oslo/config/cfg.py:1932
2015-03-31 09:02:57.276 4874 DEBUG keystone-all [-] Configuration options gathered from: log_opt_values /usr/lib/python2.7/site-packages/oslo/config/cfg.py:1933
2015-03-31 09:02:57.276 4874 DEBUG keystone-all [-] command line args: ['-d'] log_opt_values /usr/lib/python2.7/site-packages/oslo/config/cfg.py:1934
2015-03-31 09:02:57.277 4874 DEBUG keystone-all [-] config files: ['/usr/share/keystone/keystone-dist.conf', '/etc/keystone/keystone.conf'] log_opt_values /usr/lib/python2.7/site-packages/oslo/config/cfg.py:1935
2015-03-31 09:02:57.277 4874 DEBUG keystone-all [-] ================================================================================ log_opt_values /usr/lib/python2.7/site-packages/oslo/config/cfg.py:1936
2015-03-31 09:02:57.277 4874 DEBUG keystone-all [-] admin_bind_host                = 0.0.0.0 log_opt_values /usr/lib/python2.7/site-packages/oslo/config/cfg.py:1945
2015-03-31 09:02:57.277 4874 DEBUG keystone-all [-] admin_endpoint                 = None log_opt_values /usr/lib/python2.7/site-packages/oslo/config/cfg.py:1945
2015-03-31 09:02:57.278 4874 DEBUG keystone-all [-] admin_port                     = 35357 log_opt_values /usr/lib/python2.7/site-packages/oslo/config/cfg.py:1945
2015-03-31 09:02:57.278 4874 DEBUG keystone-all [-] admin_token                    = ***** log_opt_values /usr/lib/python2.7/site-packages/oslo/config/cfg.py:1945
2015-03-31 09:02:57.278 4874 DEBUG keystone-all [-] compute_port                   = 8774 log_opt_values /usr/lib/python2.7/site-packages/oslo/config/cfg.py:1945
2015-03-31 09:02:57.278 4874 DEBUG keystone-all [-] config_dir                     = None log_opt_values /usr/lib/python2.7/site-packages/oslo/config/cfg.py:1945
2015-03-31 09:02:57.279 4874 DEBUG keystone-all [-] config_file                    = ['/usr/share/keystone/keystone-dist.conf', '/etc/keystone/keystone.conf'] log_opt_values /usr/lib/python2.7/site-packages/oslo/config/cfg.py:1945
2015-03-31 09:02:57.279 4874 DEBUG keystone-all [-] crypt_strength                 = 40000 log_opt_values /usr/lib/python2.7/site-packages/oslo/config/cfg.py:1945
2015-03-31 09:02:57.279 4874 DEBUG keystone-all [-] debug                          = True log_opt_values /usr/lib/python2.7/site-packages/oslo/config/cfg.py:1945
2015-03-31 09:02:57.279 4874 DEBUG keystone-all [-] default_log_levels             = ['amqp=WARN', 'amqplib=WARN', 'boto=WARN', 'qpid=WARN', 'sqlalchemy=WARN', 'suds=INFO', 'iso8601=WARN', 'requests.packages.urllib3.connectionpool ...
(more)
edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted
0

answered 2016-01-14 20:05:30 -0500

Kernel_Panic gravatar image

I had single quotes around mariadb password in keystone.conf mysql connection uri

Changed it from

[database] ... connection = mysql://keystone:'KEYSTONE_DBPASS'@controller/keystone

To..

[database] ... connection = mysql://keystone:KEYSTONE_DBPASS@controller/keystone

and viola!

edit flag offensive delete link more
0

answered 2015-10-01 09:12:35 -0500

Make sure that database service is running. In my case it is mysql.

service mysql restart

edit flag offensive delete link more
0

answered 2015-04-01 12:59:55 -0500

This line:

2015-03-31 09:02:57.681 4874 TRACE root error: [Errno 98] Address already in use

...suggests that Keystone's not starting because it's already running. Make sure the old Keystone's fully stopped before starting the new one.

$ ps aux |grep -i keystone

...will tell you if it's currently running or not.

edit flag offensive delete link more

Comments

now by running #keystone --os-username admin --os-password adminp --os-auth-url http://localhost:35357/v2.0 token-get i get: Authorization Failed: Unable to establish connection to http://localhost:35357/v2.0/tokens

brahimo gravatar imagebrahimo ( 2015-04-01 16:23:13 -0500 )edit
0

answered 2015-04-01 16:20:33 -0500

brahimo gravatar image

i stopped the service and started to run again without any environment variables, it returns a connection problem

[root@controller etc]# keystone --os-username admin --os-password adminp --os-auth-url http://localhost:35357/v2.0 token-get Authorization Failed: Unable to establish connection to http://localhost:35357/v2.0/tokens

when i reply the commend with debug option, it retuns this: [root@controller etc]# keystone --os-username admin --os-password adminp --os-auth-url http://localhost:35357/v2.0 --debug token-get DEBUG:keystoneclient.session:REQ: curl -i -X POST http://localhost:35357/v2.0/tokens -H "Content-Type: application/json" -H "Accept: application/json" -H "User-Agent: python-keystoneclient" -d '{"auth": {"passwordCredentials": {"username": "admin", "password": "adminp"}}}' INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): localhost Authorization Failed: Unable to establish connection to http://localhost:35357/v2.0/tokens

and nothing is added in the log file after running these commands.

edit flag offensive delete link more

Comments

Hi your adminrc file shows that your password is admin_pass . Try with that password.

keystone --os-username admin --os-password admin_pass --os-auth-url http://localhost:35357/v2.0 token-get

rahulrajvn gravatar imagerahulrajvn ( 2015-04-01 17:28:41 -0500 )edit

[root@controller ~]# keystone --os-username admin --os-password admin_pass --os-auth-url http://localhost:35357/v2.0 token-get
The request you have made requires authentication. (HTTP 401)

brahimo gravatar imagebrahimo ( 2015-04-01 18:06:46 -0500 )edit

[root@controller ~]# keystone --os-username admin --os-password adminpxxx --os-auth-url http://localhost:35357/v2.0 token-get
The request you have made requires authentication. (HTTP 401)

brahimo gravatar imagebrahimo ( 2015-04-01 18:08:28 -0500 )edit

[root@controller ~]# keystone --os-username admin --os-password adminp --os-auth-url http://localhost:35357/v2.0 token-get
Authorization Failed: An unexpected error prevented the server from fulfilling your request. (HTTP 500)

brahimo gravatar imagebrahimo ( 2015-04-01 18:09:13 -0500 )edit

then when i stop the service it returns the same output for the both passwords
[root@controller ~]# keystone --os-username admin --os-password admin_pass --os-auth-url http://localhost:35357/v2.0 token-get Authorization Failed: Unable to establish connection to http://localhost:35357/v2.0/tokens

brahimo gravatar imagebrahimo ( 2015-04-01 18:17:20 -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

1 follower

Stats

Asked: 2015-03-31 04:54:05 -0500

Seen: 15,077 times

Last updated: Jan 14 '16