Ask Your Question
0

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

asked 2016-02-17 23:36:36 -0500

Muad_dib gravatar image

Hi,

I have the same error The request you have made requires authentication. HTTP 401

I have Centos7, disabled SELinux & firewalld.

I am using: http://docs.openstack.org/liberty/install-guide-rdo/keystone-services.html (http://docs.openstack.org/liberty/ins...)

I run:

openstack service create --debug --name keystone --description "OpenStack Identity" identity

I see:

    ...
        RESP BODY: {"error": {"message": "The request you have made requires authentication.","code": 401, "title": "Unauthorize"}}
    ....

Request returned failure status: 401

I have got only httpd running.

netstat -tulpn 
tcp6     0       0  :::35357                :::*        LISTEN                  1947/httpd
tcp6     0       0  :::5000                 :::*        LISTEN                  1947/httpd

According to http://docs.openstack.org/liberty/install-guide-rdo/keystone-install.html (Liberty Installation Guide) only httpd service should be started. I have tried to start openstack-keystone.service unfortunately it cannot be started - the port is already assigned to httpd.

I have exported

export OS_TOKEN=294a4c8a8a475f9b9836      #the same as in /etc/keystone/keystone.conf
export OS_URL=http://controller:35357/v3
export OS_IDENTITY_API_VERSION=3

I can manually login into mysql using user keystone with password configured in /etc/keystone/keystone.conf

I look forward for suggestions how to fix the bug.

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
1

answered 2016-02-18 01:30:55 -0500

Aun gravatar image

Going through /var/log/keystone/keystone.log might show you more details of the exact problem. Also you can ensure that keystone database has bee populated properly with all tables. sometime Db sync script does not create all tables.

edit flag offensive delete link more

Comments

I have check /var/log/keystone/keystone.log = results are given above. Still no idea how to fix the issue..

Muad_dib gravatar imageMuad_dib ( 2016-02-19 00:21:08 -0500 )edit

It is working now, but I am not sure it is a correct way. Here is what I did:

systemctl stop httpd.service
systemctl start openstack-keystone.service

Question! Is it a correct way the openstack liberty configuration ?

Muad_dib gravatar imageMuad_dib ( 2016-02-19 02:21:00 -0500 )edit
0

answered 2016-02-18 10:46:49 -0500

Muad_dib gravatar image

Still cannot find the issue:

MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| keystone           |
| mysql              |
| performance_schema |
| test               |

MariaDB [(none)]> use keystone;
Database changed
MariaDB [keystone]> show tables;
Empty set (0.00 sec)

I have run: su -s /bin/sh -c "keystone-manage db_sync" keystone one more time. Still keystone db is empty.

[root@controller ~]# openstack service create --debug --name keystone --description "OpenStack Identity" identity
START with options: ['service', 'create', '--debug', '--name', 'keystone', '--description', 'OpenStack Identity', 'identity']
options: Namespace(access_token_endpoint='', auth_type='', auth_url='', cacert='', client_id='', client_secret='', cloud='', debug=True, default_domain='default', deferred_help=False, domain_id='', domain_name='', endpoint='', identity_provider='', identity_provider_url='', insecure=None, interface='', log_file=None, os_compute_api_version='', os_identity_api_version='3', os_image_api_version='', os_network_api_version='', os_object_api_version='', os_project_id=None, os_project_name=None, os_volume_api_version='', password='', project_domain_id='', project_domain_name='', project_id='', project_name='', protocol='', region_name='', scope='', service_provider_endpoint='', timing=False, token='58c1160ad3c5a88b306a', trust_id='', url='http://controller:35357/v3', user_domain_id='', user_domain_name='', user_id='', username='', verbose_level=3, verify=None)
defaults: {'auth_type': 'token_endpoint', 'compute_api_version': '2', 'key': None, 'database_api_version': '1.0', 'api_timeout': None, 'baremetal_api_version': '1', 'cacert': None, 'image_api_use_tasks': False, 'floating_ip_source': 'neutron', 'orchestration_api_version': '1', 'interface': None, 'network_api_version': '2', 'image_format': 'qcow2', 'object_api_version': '1', 'image_api_version': '2', 'verify': True, 'identity_api_version': '2', 'volume_api_version': '1', 'cert': None, 'secgroup_source': 'neutron', 'dns_api_version': '2', 'disable_vendor_agent': {}}
cloud cfg: {'auth_type': 'token_endpoint', 'compute_api_version': '2', 'orchestration_api_version': '1', 'database_api_version': '1.0', 'interface': None, 'network_api_version': '2', 'image_format': 'qcow2', 'object_api_version': '1', 'image_api_version': '2', 'verify': True, 'timing': False, 'dns_api_version': '2', 'verbose_level': 3, 'region_name': '', 'api_timeout': None, 'baremetal_api_version': '1', 'auth': {'url': 'http://controller:35357/v3', 'token': '58c1160ad3c5a88b306a'}, 'default_domain': 'default', 'image_api_use_tasks': False, 'floating_ip_source': 'neutron', 'key': None, 'cacert': None, 'deferred_help': False, 'identity_api_version': '3', 'volume_api_version': '1', 'cert': None, 'secgroup_source': 'neutron', 'debug': True, 'disable_vendor_agent': {}}
compute API version 2, cmd group openstack.compute.v2
network API version 2, cmd group openstack.network.v2
image API version 2, cmd group openstack.image.v2
volume API version 1, cmd group openstack.volume.v1
identity API version 3, cmd group openstack.identity.v3
object_store API version 1, cmd group openstack.object_store.v1
command: service create -> openstackclient.identity.v3.service.CreateService
Auth plugin token_endpoint selected
auth_type: token_endpoint
Using auth plugin: token_endpoint
Using parameters {'url': 'http://controller:35357/v3', 'token': '58c1160ad3c5a88b306a'}
Get auth_ref
take_action(Namespace(columns=[], description='OpenStack Identity', disable=False, enable=False, formatter='table', max_width=0, name='keystone', noindent=False, prefix='', type='identity', variables=[]))
Instantiating identity client: <class 'keystoneclient.v3.client.Client'>
REQ: curl -g -i -X POST http://controller:35357/v3/services -H "User-Agent: python-keystoneclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}b9bf18d204ae9fea2faaf3c8209dba893d1313d1" -d '{"service": {"enabled": true, "type": "identity", "description": "OpenStack Identity", "name": "keystone"}}'
Starting new HTTP connection (1): controller
"POST /v3/services HTTP/1.1" 401 114
RESP: [401] content-length: 114 vary: X-Auth-Token keep-alive: timeout=5, max=100 server: Apache/2.4.6 (CentOS) mod_wsgi/3.4 Python/2.7.5 connection: Keep-Alive date: Thu, 18 Feb 2016 16:34:45 GMT www-authenticate: Keystone uri="http://controller:35357" content-type: application/json x-openstack-request-id: req-e7918206-3683-4c22-8806-63ad4bcc18ce 
RESP BODY: {"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}}

Request returned failure status: 401
The request you have made requires authentication. (HTTP 401) (Request-ID: req-e7918206-3683-4c22-8806-63ad4bcc18ce)
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/cliff/app ...
(more)
edit flag offensive delete link more

Comments

reinstall the mysql

LIPEI gravatar imageLIPEI ( 2016-08-11 03:19:33 -0500 )edit
0

answered 2016-11-24 12:30:55 -0500

Ali Solangi gravatar image

https://bugs.launchpad.net/openstack-manuals/+bug/1575688 (https://bugs.launchpad.net/openstack-...) check this bug, it may help you

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: 2016-02-17 23:36:36 -0500

Seen: 5,951 times

Last updated: Nov 24 '16