[Openstack] How to fix this bug?
Sam
batmanustc at gmail.com
Mon Mar 13 01:32:31 UTC 2017
Thank you, but which one is incorrect?
All my passwd is set to 'gateway', and I use 'gateway' username not 'admin'
or 'openstack'.
And in https://docs.openstack.org/ocata/install-guide-ubuntu/
keystone-install.html this step, I set every thing as doc said except env
as bellow, but event I set env as doc said(which set OS_USERNAME=admin), I
also got errors as bellow.
So how to do....
2017-03-12 23:01 GMT+08:00 Chris Suttles <suttles at gmail.com>:
> Your env looks incorrect to me. Take a look here for setting those vars
> correctly:
>
> https://docs.openstack.org/ocata/install-guide-ubuntu/
> keystone-install.html
>
> It's crucial that you set those variables to the same information you
> provide to keystone in the steps listed there.
>
> On Sun, Mar 12, 2017 at 6:35 AM, Sam <batmanustc at gmail.com> wrote:
>
>> Hi all,
>>
>> I'm installing openstack ocata version, in this step:
>> https://docs.openstack.org/ocata/install-guide-ubuntu/keystone-users.html
>> I got error while run 'openstack' command:
>> Unauthorized: The request you have made requires authentication. (HTTP
>> 401) (Request-ID: req-1ee39bdd-03b8-4ea8-9432-d027f91c131a)
>>
>> My env is:
>> export OS_USERNAME=gateway
>> export OS_PASSWORD=gateway
>> export OS_PROJECT_NAME=gateway
>> export OS_USER_DOMAIN_NAME=Default
>> export OS_PROJECT_DOMAIN_NAME=Default
>> export OS_AUTH_URL=http://controller:35357/v3
>> export OS_IDENTITY_API_VERSION=3
>>
>>
>> detail error is as bellow, does that mean my env is wrong? Thank you!
>>
>> gateway at gateway-virtual-machine:~$ openstack project create --domain
>> default --description "Service Project" service
>> The request you have made requires authentication. (HTTP 401)
>> (Request-ID: req-cf395e9a-a69f-4a71-9f08-26cb149cb7bd)
>> gateway at gateway-virtual-machine:~$ openstack project create --domain
>> default --description "Service Project" service --debug
>> START with options: [u'project', u'create', u'--domain', u'default',
>> u'--description', u'Service Project', u'service', u'--debug']
>> options: Namespace(access_key='', access_secret='***',
>> access_token='***', access_token_endpoint='', access_token_type='',
>> auth_type='', auth_url='http://controller:35357/v3', cacert=None,
>> cert='', client_id='', client_secret='***', cloud='', code='',
>> consumer_key='', consumer_secret='***', debug=True,
>> default_domain='default', default_domain_id='', default_domain_name='',
>> deferred_help=False, discovery_endpoint='', domain_id='', domain_name='',
>> endpoint='', identity_provider='', identity_provider_url='', insecure=None,
>> interface='', key='', log_file=None, old_profile=None, openid_scope='',
>> os_beta_command=False, 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='', passcode='',
>> password='***', profile=None, project_domain_id='',
>> project_domain_name='Default', project_id='', project_name='gateway',
>> protocol='', redirect_uri='', region_name='', timing=False, token='***',
>> trust_id='', url='', user_domain_id='', user_domain_name='Default',
>> user_id='', username='gateway', verbose_level=3, verify=None)
>> Auth plugin password selected
>> auth_config_hook(): {'auth_type': 'password', 'beta_command': False,
>> u'compute_api_version': u'2', 'key': None, u'database_api_version': u'1.0',
>> 'cacert': None, 'auth_url': 'http://controller:35357/v3',
>> u'network_api_version': u'2', u'message': u'', u'image_format': u'qcow2',
>> 'networks': [], u'image_api_version': u'2', 'verify': True,
>> u'dns_api_version': u'2', u'object_store_api_version': u'1', 'username':
>> 'gateway', u'container_infra_api_version': u'1', 'verbose_level': 3,
>> 'region_name': '', 'api_timeout': None, u'baremetal_api_version': u'1',
>> 'auth': {'user_domain_name': 'Default', 'project_name': 'gateway',
>> 'project_domain_name': 'Default'}, 'default_domain': 'default',
>> u'container_api_version': u'1', u'image_api_use_tasks': False,
>> u'floating_ip_source': u'neutron', u'orchestration_api_version': u'1',
>> 'timing': False, 'password': '***', u'application_catalog_api_version':
>> u'1', u'key_manager_api_version': u'v1', u'metering_api_version': u'2',
>> 'deferred_help': False, u'identity_api_version': '3',
>> u'volume_api_version': u'2', 'cert': None, u'secgroup_source': u'neutron',
>> u'status': u'active', 'debug': True, u'interface': None,
>> u'disable_vendor_agent': {}}
>> defaults: {u'auth_type': 'password', u'status': u'active',
>> u'compute_api_version': u'2', 'key': None, u'database_api_version': u'1.0',
>> 'api_timeout': None, u'baremetal_api_version': u'1', u'image_api_version':
>> u'2', u'container_infra_api_version': u'1', u'metering_api_version':
>> u'2', u'image_api_use_tasks': False, u'floating_ip_source': u'neutron',
>> u'orchestration_api_version': u'1', 'cacert': None, u'network_api_version':
>> u'2', u'message': u'', u'image_format': u'qcow2',
>> u'application_catalog_api_version': u'1', u'key_manager_api_version':
>> u'v1', 'verify': True, u'identity_api_version': u'2.0',
>> u'volume_api_version': u'2', 'cert': None, u'secgroup_source': u'neutron',
>> u'container_api_version': u'1', u'dns_api_version': u'2',
>> u'object_store_api_version': u'1', u'interface': None,
>> u'disable_vendor_agent': {}}
>> cloud cfg: {'auth_type': 'password', 'beta_command': False,
>> u'compute_api_version': u'2', 'key': None, u'database_api_version': u'1.0',
>> 'cacert': None, 'auth_url': 'http://controller:35357/v3',
>> u'network_api_version': u'2', u'message': u'', u'image_format': u'qcow2',
>> 'networks': [], u'image_api_version': u'2', 'verify': True,
>> u'dns_api_version': u'2', u'object_store_api_version': u'1', 'username':
>> 'gateway', u'container_infra_api_version': u'1', 'verbose_level': 3,
>> 'region_name': '', 'api_timeout': None, u'baremetal_api_version': u'1',
>> 'auth': {'user_domain_name': 'Default', 'project_name': 'gateway',
>> 'project_domain_name': 'Default'}, 'default_domain': 'default',
>> u'container_api_version': u'1', u'image_api_use_tasks': False,
>> u'floating_ip_source': u'neutron', u'orchestration_api_version': u'1',
>> 'timing': False, 'password': '***', u'application_catalog_api_version':
>> u'1', u'key_manager_api_version': u'v1', u'metering_api_version': u'2',
>> 'deferred_help': False, u'identity_api_version': '3',
>> u'volume_api_version': u'2', 'cert': None, u'secgroup_source': u'neutron',
>> u'status': u'active', 'debug': True, u'interface': None,
>> u'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 2, cmd group openstack.volume.v2
>> identity API version 3, cmd group openstack.identity.v3
>> object_store API version 1, cmd group openstack.object_store.v1
>> neutronclient API version 2, cmd group openstack.neutronclient.v2
>> Auth plugin password selected
>> auth_config_hook(): {'auth_type': 'password', 'beta_command': False,
>> u'compute_api_version': u'2', 'key': None, u'database_api_version': u'1.0',
>> 'cacert': None, 'auth_url': 'http://controller:35357/v3',
>> u'network_api_version': u'2', u'message': u'', u'image_format': u'qcow2',
>> 'networks': [], u'image_api_version': u'2', 'verify': True,
>> u'dns_api_version': u'2', u'object_store_api_version': u'1', 'username':
>> 'gateway', u'container_infra_api_version': u'1', 'verbose_level': 3,
>> 'region_name': '', 'api_timeout': None, u'baremetal_api_version': u'1',
>> 'auth': {'user_domain_name': 'Default', 'project_name': 'gateway',
>> 'project_domain_name': 'Default'}, 'default_domain': 'default',
>> u'container_api_version': u'1', u'image_api_use_tasks': False,
>> u'floating_ip_source': u'neutron', u'orchestration_api_version': u'1',
>> 'timing': False, 'password': '***', u'application_catalog_api_version':
>> u'1', u'key_manager_api_version': u'v1', u'metering_api_version': u'2',
>> 'deferred_help': False, u'identity_api_version': '3',
>> u'volume_api_version': u'2', 'cert': None, u'secgroup_source': u'neutron',
>> u'status': u'active', 'debug': True, u'interface': None,
>> u'disable_vendor_agent': {}}
>> Auth plugin password selected
>> auth_config_hook(): {'auth_type': 'password', 'beta_command': False,
>> u'compute_api_version': u'2', 'key': None, u'database_api_version': u'1.0',
>> 'cacert': None, 'auth_url': 'http://controller:35357/v3',
>> u'network_api_version': u'2', u'message': u'', u'image_format': u'qcow2',
>> 'networks': [], u'image_api_version': u'2', 'verify': True,
>> u'dns_api_version': u'2', u'object_store_api_version': u'1', 'username':
>> 'gateway', u'container_infra_api_version': u'1', 'verbose_level': 3,
>> 'region_name': '', 'api_timeout': None, u'baremetal_api_version': u'1',
>> 'auth': {'user_domain_name': 'Default', 'project_name': 'gateway',
>> 'project_domain_name': 'Default'}, 'default_domain': 'default',
>> u'container_api_version': u'1', u'image_api_use_tasks': False,
>> u'floating_ip_source': u'neutron', u'orchestration_api_version': u'1',
>> 'timing': False, 'password': '***', u'application_catalog_api_version':
>> u'1', u'key_manager_api_version': u'v1', u'metering_api_version': u'2',
>> 'deferred_help': False, u'identity_api_version': '3',
>> u'volume_api_version': u'2', 'cert': None, u'secgroup_source': u'neutron',
>> u'status': u'active', 'debug': True, u'interface': None,
>> u'disable_vendor_agent': {}}
>> command: project create -> openstackclient.identity.v3.pr
>> oject.CreateProject
>> Auth plugin password selected
>> auth_config_hook(): {'auth_type': 'password', 'beta_command': False,
>> u'compute_api_version': u'2', 'key': None, u'database_api_version': u'1.0',
>> 'cacert': None, 'auth_url': 'http://controller:35357/v3',
>> u'network_api_version': u'2', u'message': u'', u'image_format': u'qcow2',
>> 'networks': [], u'image_api_version': u'2', 'verify': True,
>> u'dns_api_version': u'2', u'object_store_api_version': u'1', 'username':
>> 'gateway', u'container_infra_api_version': u'1', 'verbose_level': 3,
>> 'region_name': '', 'api_timeout': None, u'baremetal_api_version': u'1',
>> 'auth': {'user_domain_name': 'Default', 'project_name': 'gateway',
>> 'project_domain_name': 'Default'}, 'default_domain': 'default',
>> u'container_api_version': u'1', u'image_api_use_tasks': False,
>> u'floating_ip_source': u'neutron', u'orchestration_api_version': u'1',
>> 'timing': False, 'password': '***', u'application_catalog_api_version':
>> u'1', u'key_manager_api_version': u'v1', u'metering_api_version': u'2',
>> 'deferred_help': False, u'identity_api_version': '3',
>> u'volume_api_version': u'2', 'cert': None, u'secgroup_source': u'neutron',
>> u'status': u'active', 'debug': True, u'interface': None,
>> u'disable_vendor_agent': {}}
>> Using auth plugin: password
>> Using parameters {'username': 'gateway', 'project_name': 'gateway',
>> 'user_domain_name': 'Default', 'auth_url': 'http://controller:35357/v3',
>> 'password': '***', 'project_domain_name': 'Default'}
>> Get auth_ref
>> REQ: curl -g -i -X GET http://controller:35357/v3 -H "Accept:
>> application/json" -H "User-Agent: osc-lib/1.3.0 keystoneauth1/2.18.0
>> python-requests/2.12.4 CPython/2.7.12"
>> Starting new HTTP connection (1): controller
>> http://controller:35357 "GET /v3 HTTP/1.1" 200 250
>> RESP: [200] Date: Sun, 12 Mar 2017 07:42:13 GMT Server: Apache/2.4.18
>> (Ubuntu) Vary: X-Auth-Token X-Distribution: Ubuntu x-openstack-request-id:
>> req-a5985b14-797e-4269-88bb-c2a7147742db Content-Length: 250 Keep-Alive:
>> timeout=5, max=100 Connection: Keep-Alive Content-Type: application/json
>> RESP BODY: {"version": {"status": "stable", "updated":
>> "2017-02-22T00:00:00Z", "media-types": [{"base": "application/json",
>> "type": "application/vnd.openstack.identity-v3+json"}], "id": "v3.8",
>> "links": [{"href": "http://controller:35357/v3/", "rel": "self"}]}}
>>
>> GET call to None for http://controller:35357/v3 used request id
>> req-a5985b14-797e-4269-88bb-c2a7147742db
>> Making authentication request to http://controller:35357/v3/auth/tokens
>> http://controller:35357 "POST /v3/auth/tokens HTTP/1.1" 401 114
>> Request returned failure status: 401
>> The request you have made requires authentication. (HTTP 401)
>> (Request-ID: req-1ee39bdd-03b8-4ea8-9432-d027f91c131a)
>> Traceback (most recent call last):
>> File "/usr/lib/python2.7/dist-packages/cliff/app.py", line 393, in
>> run_subcommand
>> self.prepare_to_run_command(cmd)
>> File "/usr/lib/python2.7/dist-packages/openstackclient/shell.py", line
>> 198, in prepare_to_run_command
>> return super(OpenStackShell, self).prepare_to_run_command(cmd)
>> File "/usr/lib/python2.7/dist-packages/osc_lib/shell.py", line 457, in
>> prepare_to_run_command
>> self.client_manager.auth_ref
>> File "/usr/lib/python2.7/dist-packages/osc_lib/clientmanager.py", line
>> 215, in auth_ref
>> self._auth_ref = self.auth.get_auth_ref(self.session)
>> File "/usr/lib/python2.7/dist-packages/keystoneauth1/identity/generic/base.py",
>> line 198, in get_auth_ref
>> return self._plugin.get_auth_ref(session, **kwargs)
>> File "/usr/lib/python2.7/dist-packages/keystoneauth1/identity/v3/base.py",
>> line 167, in get_auth_ref
>> authenticated=False, log=False, **rkwargs)
>> File "/usr/lib/python2.7/dist-packages/keystoneauth1/session.py", line
>> 766, in post
>> return self.request(url, 'POST', **kwargs)
>> File "/usr/lib/python2.7/dist-packages/osc_lib/session.py", line 40,
>> in request
>> resp = super(TimingSession, self).request(url, method, **kwargs)
>> File "/usr/lib/python2.7/dist-packages/positional/__init__.py", line
>> 101, in inner
>> return wrapped(*args, **kwargs)
>> File "/usr/lib/python2.7/dist-packages/keystoneauth1/session.py", line
>> 655, in request
>> raise exceptions.from_response(resp, method, url)
>> Unauthorized: The request you have made requires authentication. (HTTP
>> 401) (Request-ID: req-1ee39bdd-03b8-4ea8-9432-d027f91c131a)
>> clean_up CreateProject: The request you have made requires
>> authentication. (HTTP 401) (Request-ID: req-1ee39bdd-03b8-4ea8-9432-d0
>> 27f91c131a)
>> Traceback (most recent call last):
>> File "/usr/lib/python2.7/dist-packages/osc_lib/shell.py", line 135, in
>> run
>> ret_val = super(OpenStackShell, self).run(argv)
>> File "/usr/lib/python2.7/dist-packages/cliff/app.py", line 279, in run
>> result = self.run_subcommand(remainder)
>> File "/usr/lib/python2.7/dist-packages/osc_lib/shell.py", line 180, in
>> run_subcommand
>> ret_value = super(OpenStackShell, self).run_subcommand(argv)
>> File "/usr/lib/python2.7/dist-packages/cliff/app.py", line 393, in
>> run_subcommand
>> self.prepare_to_run_command(cmd)
>> File "/usr/lib/python2.7/dist-packages/openstackclient/shell.py", line
>> 198, in prepare_to_run_command
>> return super(OpenStackShell, self).prepare_to_run_command(cmd)
>> File "/usr/lib/python2.7/dist-packages/osc_lib/shell.py", line 457, in
>> prepare_to_run_command
>> self.client_manager.auth_ref
>> File "/usr/lib/python2.7/dist-packages/osc_lib/clientmanager.py", line
>> 215, in auth_ref
>> self._auth_ref = self.auth.get_auth_ref(self.session)
>> File "/usr/lib/python2.7/dist-packages/keystoneauth1/identity/generic/base.py",
>> line 198, in get_auth_ref
>> return self._plugin.get_auth_ref(session, **kwargs)
>> File "/usr/lib/python2.7/dist-packages/keystoneauth1/identity/v3/base.py",
>> line 167, in get_auth_ref
>> authenticated=False, log=False, **rkwargs)
>> File "/usr/lib/python2.7/dist-packages/keystoneauth1/session.py", line
>> 766, in post
>> return self.request(url, 'POST', **kwargs)
>> File "/usr/lib/python2.7/dist-packages/osc_lib/session.py", line 40,
>> in request
>> resp = super(TimingSession, self).request(url, method, **kwargs)
>> File "/usr/lib/python2.7/dist-packages/positional/__init__.py", line
>> 101, in inner
>> return wrapped(*args, **kwargs)
>> File "/usr/lib/python2.7/dist-packages/keystoneauth1/session.py", line
>> 655, in request
>> raise exceptions.from_response(resp, method, url)
>> Unauthorized: The request you have made requires authentication. (HTTP
>> 401) (Request-ID: req-1ee39bdd-03b8-4ea8-9432-d027f91c131a)
>>
>> END return value: 1
>>
>>
>> _______________________________________________
>> Mailing list: http://lists.openstack.org/cgi
>> -bin/mailman/listinfo/openstack
>> Post to : openstack at lists.openstack.org
>> Unsubscribe : http://lists.openstack.org/cgi
>> -bin/mailman/listinfo/openstack
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20170313/57bc82bc/attachment.html>
More information about the Openstack
mailing list