settingsLogin | Registersettings

[Openstack] How to fix this bug?

0 votes

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 OSUSERNAME=gateway
export OS
PASSWORD=gateway
export OSPROJECTNAME=gateway
export OSUSERDOMAINNAME=Default
export OS
PROJECTDOMAINNAME=Default
export OSAUTHURL=http://controller:35357/v3
export OSIDENTITYAPI_VERSION=3

detail error is as bellow, does that mean my env is wrong? Thank you!

gateway@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@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(accesskey='', accesssecret='', access_token='',
accesstokenendpoint='', accesstokentype='', authtype='', authurl='
http://controller:35357/v3', cacert=None, cert='', clientid='',
client
secret='', cloud='', code='', consumerkey='',
consumer
secret='
', debug=True, defaultdomain='default',
default
domainid='', defaultdomainname='', deferredhelp=False,
discoveryendpoint='', domainid='', domainname='', endpoint='',
identity
provider='', identityproviderurl='', insecure=None,
interface='', key='', logfile=None, oldprofile=None, openidscope='',
os
betacommand=False, oscomputeapiversion='',
osidentityapiversion='3', osimageapiversion='',
osnetworkapiversion='', osobjectapiversion='', osprojectid=None,
osprojectname=None, osvolumeapiversion='', passcode='',
password='***', profile=None, project
domainid='',
project
domainname='Default', projectid='', projectname='gateway',
protocol='', redirect
uri='', regionname='', timing=False, token='***',
trust
id='', url='', userdomainid='', userdomainname='Default',
userid='', username='gateway', verboselevel=3, verify=None)
Auth plugin password selected
authconfighook(): {'authtype': 'password', 'betacommand': False,
u'computeapiversion': u'2', 'key': None, u'databaseapiversion': u'1.0',
'cacert': None, 'authurl': 'http://controller:35357/v3',
u'network
apiversion': u'2', u'message': u'', u'imageformat': u'qcow2',
'networks': [], u'imageapiversion': u'2', 'verify': True,
u'dnsapiversion': u'2', u'objectstoreapiversion': u'1', 'username':
'gateway', u'container
infraapiversion': u'1', 'verboselevel': 3,
'region
name': '', 'apitimeout': None, u'baremetalapiversion': u'1',
'auth': {'user
domainname': 'Default', 'projectname': 'gateway',
'projectdomainname': 'Default'}, 'defaultdomain': 'default',
u'container
apiversion': u'1', u'imageapiusetasks': False,
u'floatingipsource': u'neutron', u'orchestrationapiversion': u'1',
'timing': False, 'password': '', u'applicationcatalogapiversion':
u'1', u'key
managerapiversion': u'v1', u'meteringapiversion': u'2',
'deferredhelp': False, u'identityapiversion': '3',
u'volume
apiversion': u'2', 'cert': None, u'secgroupsource': u'neutron',
u'status': u'active', 'debug': True, u'interface': None,
u'disablevendoragent': {}}
defaults: {u'authtype': 'password', u'status': u'active',
u'compute
apiversion': u'2', 'key': None, u'databaseapiversion': u'1.0',
'api
timeout': None, u'baremetalapiversion': u'1', u'imageapiversion':
u'2', u'containerinfraapiversion': u'1', u'meteringapiversion': u'2',
u'image
apiusetasks': False, u'floatingipsource': u'neutron',
u'orchestrationapiversion': u'1', 'cacert': None, u'networkapiversion':
u'2', u'message': u'', u'imageformat': u'qcow2',
u'application
catalogapiversion': u'1', u'keymanagerapiversion':
u'v1', 'verify': True, u'identity
apiversion': u'2.0',
u'volume
apiversion': u'2', 'cert': None, u'secgroupsource': u'neutron',
u'containerapiversion': u'1', u'dnsapiversion': u'2',
u'objectstoreapiversion': u'1', u'interface': None,
u'disable
vendoragent': {}}
cloud cfg: {'auth
type': 'password', 'betacommand': False,
u'compute
apiversion': u'2', 'key': None, u'databaseapiversion': u'1.0',
'cacert': None, 'auth
url': 'http://controller:35357/v3',
u'networkapiversion': u'2', u'message': u'', u'imageformat': u'qcow2',
'networks': [], u'image
apiversion': u'2', 'verify': True,
u'dns
apiversion': u'2', u'objectstoreapiversion': u'1', 'username':
'gateway', u'containerinfraapiversion': u'1', 'verboselevel': 3,
'regionname': '', 'apitimeout': None, u'baremetalapiversion': u'1',
'auth': {'userdomainname': 'Default', 'projectname': 'gateway',
'project
domainname': 'Default'}, 'defaultdomain': 'default',
u'containerapiversion': u'1', u'imageapiusetasks': False,
u'floating
ipsource': u'neutron', u'orchestrationapi_version': u'1',
'timing': False, 'password': '
', u'applicationcatalogapiversion':
u'1', u'key
managerapiversion': u'v1', u'meteringapiversion': u'2',
'deferredhelp': False, u'identityapiversion': '3',
u'volume
apiversion': u'2', 'cert': None, u'secgroupsource': u'neutron',
u'status': u'active', 'debug': True, u'interface': None,
u'disablevendoragent': {}}
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
objectstore API version 1, cmd group openstack.objectstore.v1
neutronclient API version 2, cmd group openstack.neutronclient.v2
Auth plugin password selected
authconfighook(): {'authtype': 'password', 'betacommand': False,
u'computeapiversion': u'2', 'key': None, u'databaseapiversion': u'1.0',
'cacert': None, 'authurl': 'http://controller:35357/v3',
u'network
apiversion': u'2', u'message': u'', u'imageformat': u'qcow2',
'networks': [], u'imageapiversion': u'2', 'verify': True,
u'dnsapiversion': u'2', u'objectstoreapiversion': u'1', 'username':
'gateway', u'container
infraapiversion': u'1', 'verboselevel': 3,
'region
name': '', 'apitimeout': None, u'baremetalapiversion': u'1',
'auth': {'user
domainname': 'Default', 'projectname': 'gateway',
'projectdomainname': 'Default'}, 'defaultdomain': 'default',
u'container
apiversion': u'1', u'imageapiusetasks': False,
u'floatingipsource': u'neutron', u'orchestrationapiversion': u'1',
'timing': False, 'password': '', u'applicationcatalogapiversion':
u'1', u'key
managerapiversion': u'v1', u'meteringapiversion': u'2',
'deferredhelp': False, u'identityapiversion': '3',
u'volume
apiversion': u'2', 'cert': None, u'secgroupsource': u'neutron',
u'status': u'active', 'debug': True, u'interface': None,
u'disablevendoragent': {}}
Auth plugin password selected
authconfighook(): {'authtype': 'password', 'betacommand': False,
u'computeapiversion': u'2', 'key': None, u'databaseapiversion': u'1.0',
'cacert': None, 'authurl': 'http://controller:35357/v3',
u'network
apiversion': u'2', u'message': u'', u'imageformat': u'qcow2',
'networks': [], u'imageapiversion': u'2', 'verify': True,
u'dnsapiversion': u'2', u'objectstoreapiversion': u'1', 'username':
'gateway', u'container
infraapiversion': u'1', 'verboselevel': 3,
'region
name': '', 'apitimeout': None, u'baremetalapiversion': u'1',
'auth': {'user
domainname': 'Default', 'projectname': 'gateway',
'projectdomainname': 'Default'}, 'defaultdomain': 'default',
u'container
apiversion': u'1', u'imageapiusetasks': False,
u'floatingipsource': u'neutron', u'orchestrationapiversion': u'1',
'timing': False, 'password': '
', u'applicationcatalogapiversion':
u'1', u'key
managerapiversion': u'v1', u'meteringapiversion': u'2',
'deferredhelp': False, u'identityapiversion': '3',
u'volume
apiversion': u'2', 'cert': None, u'secgroupsource': u'neutron',
u'status': u'active', 'debug': True, u'interface': None,
u'disablevendoragent': {}}
command: project create -> openstackclient.identity.v3.project.CreateProject
Auth plugin password selected
authconfighook(): {'authtype': 'password', 'betacommand': False,
u'computeapiversion': u'2', 'key': None, u'databaseapiversion': u'1.0',
'cacert': None, 'authurl': 'http://controller:35357/v3',
u'network
apiversion': u'2', u'message': u'', u'imageformat': u'qcow2',
'networks': [], u'imageapiversion': u'2', 'verify': True,
u'dnsapiversion': u'2', u'objectstoreapiversion': u'1', 'username':
'gateway', u'container
infraapiversion': u'1', 'verboselevel': 3,
'region
name': '', 'apitimeout': None, u'baremetalapiversion': u'1',
'auth': {'user
domainname': 'Default', 'projectname': 'gateway',
'projectdomainname': 'Default'}, 'defaultdomain': 'default',
u'container
apiversion': u'1', u'imageapiusetasks': False,
u'floatingipsource': u'neutron', u'orchestrationapiversion': u'1',
'timing': False, 'password': '', u'applicationcatalogapiversion':
u'1', u'key
managerapiversion': u'v1', u'meteringapiversion': u'2',
'deferredhelp': False, u'identityapiversion': '3',
u'volume
apiversion': u'2', 'cert': None, u'secgroupsource': u'neutron',
u'status': u'active', 'debug': True, u'interface': None,
u'disablevendoragent': {}}
Using auth plugin: password
Using parameters {'username': 'gateway', 'projectname': 'gateway',
'user
domainname': 'Default', 'authurl': 'http://controller:35357/v3',
'password': '
', 'projectdomainname': '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
runsubcommand
self.prepare
toruncommand(cmd)
File "/usr/lib/python2.7/dist-packages/openstackclient/shell.py", line
198, in preparetoruncommand
return super(OpenStackShell, self).prepare
toruncommand(cmd)
File "/usr/lib/python2.7/dist-packages/osclib/shell.py", line 457, in
prepare
toruncommand
self.clientmanager.authref
File "/usr/lib/python2.7/dist-packages/osclib/clientmanager.py", line
215, in auth
ref
self.authref = self.auth.getauthref(self.session)
File
"/usr/lib/python2.7/dist-packages/keystoneauth1/identity/generic/base.py",
line 198, in getauthref
return self.plugin.getauth_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-d027f91c131a)
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@lists.openstack.org
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
asked Mar 12, 2017 in openstack by yewgang (980 points)   3

7 Responses

0 votes

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 OSUSERNAME=gateway
export OS
PASSWORD=gateway
export OSPROJECTNAME=gateway
export OSUSERDOMAINNAME=Default
export OS
PROJECTDOMAINNAME=Default
export OSAUTHURL=http://controller:35357/v3
export OSIDENTITYAPI_VERSION=3

detail error is as bellow, does that mean my env is wrong? Thank you!

gateway@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@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(accesskey='', accesssecret='', access_token='',
accesstokenendpoint='', accesstokentype='', authtype='', authurl='
http://controller:35357/v3', cacert=None, cert='', clientid='',
client
secret='', cloud='', code='', consumerkey='',
consumer
secret='
', debug=True, defaultdomain='default',
default
domainid='', defaultdomainname='', deferredhelp=False,
discoveryendpoint='', domainid='', domainname='', endpoint='',
identity
provider='', identityproviderurl='', insecure=None,
interface='', key='', logfile=None, oldprofile=None, openidscope='',
os
betacommand=False, oscomputeapiversion='',
osidentityapiversion='3', osimageapiversion='',
osnetworkapiversion='', osobjectapiversion='', osprojectid=None,
osprojectname=None, osvolumeapiversion='', passcode='',
password='***', profile=None, project
domainid='',
project
domainname='Default', projectid='', projectname='gateway',
protocol='', redirect
uri='', regionname='', timing=False, token='***',
trust
id='', url='', userdomainid='', userdomainname='Default',
userid='', username='gateway', verboselevel=3, verify=None)
Auth plugin password selected
authconfighook(): {'authtype': 'password', 'betacommand': False,
u'computeapiversion': u'2', 'key': None, u'databaseapiversion': u'1.0',
'cacert': None, 'authurl': 'http://controller:35357/v3',
u'network
apiversion': u'2', u'message': u'', u'imageformat': u'qcow2',
'networks': [], u'imageapiversion': u'2', 'verify': True,
u'dnsapiversion': u'2', u'objectstoreapiversion': u'1', 'username':
'gateway', u'container
infraapiversion': u'1', 'verboselevel': 3,
'region
name': '', 'apitimeout': None, u'baremetalapiversion': u'1',
'auth': {'user
domainname': 'Default', 'projectname': 'gateway',
'projectdomainname': 'Default'}, 'defaultdomain': 'default',
u'container
apiversion': u'1', u'imageapiusetasks': False,
u'floatingipsource': u'neutron', u'orchestrationapiversion': u'1',
'timing': False, 'password': '', u'applicationcatalogapiversion':
u'1', u'key
managerapiversion': u'v1', u'meteringapiversion': u'2',
'deferredhelp': False, u'identityapiversion': '3',
u'volume
apiversion': u'2', 'cert': None, u'secgroupsource': u'neutron',
u'status': u'active', 'debug': True, u'interface': None,
u'disablevendoragent': {}}
defaults: {u'authtype': 'password', u'status': u'active',
u'compute
apiversion': u'2', 'key': None, u'databaseapiversion': u'1.0',
'api
timeout': None, u'baremetalapiversion': u'1', u'imageapiversion':
u'2', u'containerinfraapiversion': u'1', u'meteringapiversion': u'2',
u'image
apiusetasks': False, u'floatingipsource': u'neutron',
u'orchestrationapiversion': u'1', 'cacert': None, u'networkapiversion':
u'2', u'message': u'', u'imageformat': u'qcow2',
u'application
catalogapiversion':
u'1', u'keymanagerapiversion': u'v1', 'verify': True,
u'identity
apiversion': u'2.0', u'volumeapiversion': u'2', 'cert': None,
u'secgroup
source': u'neutron', u'containerapiversion': u'1',
u'dnsapiversion': u'2', u'objectstoreapiversion': u'1', u'interface':
None, u'disable
vendoragent': {}}
cloud cfg: {'auth
type': 'password', 'betacommand': False,
u'compute
apiversion': u'2', 'key': None, u'databaseapiversion': u'1.0',
'cacert': None, 'auth
url': 'http://controller:35357/v3',
u'networkapiversion': u'2', u'message': u'', u'imageformat': u'qcow2',
'networks': [], u'image
apiversion': u'2', 'verify': True,
u'dns
apiversion': u'2', u'objectstoreapiversion': u'1', 'username':
'gateway', u'containerinfraapiversion': u'1', 'verboselevel': 3,
'regionname': '', 'apitimeout': None, u'baremetalapiversion': u'1',
'auth': {'userdomainname': 'Default', 'projectname': 'gateway',
'project
domainname': 'Default'}, 'defaultdomain': 'default',
u'containerapiversion': u'1', u'imageapiusetasks': False,
u'floating
ipsource': u'neutron', u'orchestrationapi_version': u'1',
'timing': False, 'password': '
', u'applicationcatalogapiversion':
u'1', u'key
managerapiversion': u'v1', u'meteringapiversion': u'2',
'deferredhelp': False, u'identityapiversion': '3',
u'volume
apiversion': u'2', 'cert': None, u'secgroupsource': u'neutron',
u'status': u'active', 'debug': True, u'interface': None,
u'disablevendoragent': {}}
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
objectstore API version 1, cmd group openstack.objectstore.v1
neutronclient API version 2, cmd group openstack.neutronclient.v2
Auth plugin password selected
authconfighook(): {'authtype': 'password', 'betacommand': False,
u'computeapiversion': u'2', 'key': None, u'databaseapiversion': u'1.0',
'cacert': None, 'authurl': 'http://controller:35357/v3',
u'network
apiversion': u'2', u'message': u'', u'imageformat': u'qcow2',
'networks': [], u'imageapiversion': u'2', 'verify': True,
u'dnsapiversion': u'2', u'objectstoreapiversion': u'1', 'username':
'gateway', u'container
infraapiversion': u'1', 'verboselevel': 3,
'region
name': '', 'apitimeout': None, u'baremetalapiversion': u'1',
'auth': {'user
domainname': 'Default', 'projectname': 'gateway',
'projectdomainname': 'Default'}, 'defaultdomain': 'default',
u'container
apiversion': u'1', u'imageapiusetasks': False,
u'floatingipsource': u'neutron', u'orchestrationapiversion': u'1',
'timing': False, 'password': '', u'applicationcatalogapiversion':
u'1', u'key
managerapiversion': u'v1', u'meteringapiversion': u'2',
'deferredhelp': False, u'identityapiversion': '3',
u'volume
apiversion': u'2', 'cert': None, u'secgroupsource': u'neutron',
u'status': u'active', 'debug': True, u'interface': None,
u'disablevendoragent': {}}
Auth plugin password selected
authconfighook(): {'authtype': 'password', 'betacommand': False,
u'computeapiversion': u'2', 'key': None, u'databaseapiversion': u'1.0',
'cacert': None, 'authurl': 'http://controller:35357/v3',
u'network
apiversion': u'2', u'message': u'', u'imageformat': u'qcow2',
'networks': [], u'imageapiversion': u'2', 'verify': True,
u'dnsapiversion': u'2', u'objectstoreapiversion': u'1', 'username':
'gateway', u'container
infraapiversion': u'1', 'verboselevel': 3,
'region
name': '', 'apitimeout': None, u'baremetalapiversion': u'1',
'auth': {'user
domainname': 'Default', 'projectname': 'gateway',
'projectdomainname': 'Default'}, 'defaultdomain': 'default',
u'container
apiversion': u'1', u'imageapiusetasks': False,
u'floatingipsource': u'neutron', u'orchestrationapiversion': u'1',
'timing': False, 'password': '
', u'applicationcatalogapiversion':
u'1', u'key
managerapiversion': u'v1', u'meteringapiversion': u'2',
'deferredhelp': False, u'identityapiversion': '3',
u'volume
apiversion': u'2', 'cert': None, u'secgroupsource': u'neutron',
u'status': u'active', 'debug': True, u'interface': None,
u'disablevendoragent': {}}
command: project create -> openstackclient.identity.v3.project.CreateProject
Auth plugin password selected
authconfighook(): {'authtype': 'password', 'betacommand': False,
u'computeapiversion': u'2', 'key': None, u'databaseapiversion': u'1.0',
'cacert': None, 'authurl': 'http://controller:35357/v3',
u'network
apiversion': u'2', u'message': u'', u'imageformat': u'qcow2',
'networks': [], u'imageapiversion': u'2', 'verify': True,
u'dnsapiversion': u'2', u'objectstoreapiversion': u'1', 'username':
'gateway', u'container
infraapiversion': u'1', 'verboselevel': 3,
'region
name': '', 'apitimeout': None, u'baremetalapiversion': u'1',
'auth': {'user
domainname': 'Default', 'projectname': 'gateway',
'projectdomainname': 'Default'}, 'defaultdomain': 'default',
u'container
apiversion': u'1', u'imageapiusetasks': False,
u'floatingipsource': u'neutron', u'orchestrationapiversion': u'1',
'timing': False, 'password': '', u'applicationcatalogapiversion':
u'1', u'key
managerapiversion': u'v1', u'meteringapiversion': u'2',
'deferredhelp': False, u'identityapiversion': '3',
u'volume
apiversion': u'2', 'cert': None, u'secgroupsource': u'neutron',
u'status': u'active', 'debug': True, u'interface': None,
u'disablevendoragent': {}}
Using auth plugin: password
Using parameters {'username': 'gateway', 'projectname': 'gateway',
'user
domainname': 'Default', 'authurl': 'http://controller:35357/v3',
'password': '
', 'projectdomainname': '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
runsubcommand
self.prepare
toruncommand(cmd)
File "/usr/lib/python2.7/dist-packages/openstackclient/shell.py", line
198, in preparetoruncommand
return super(OpenStackShell, self).prepare
toruncommand(cmd)
File "/usr/lib/python2.7/dist-packages/osclib/shell.py", line 457, in
prepare
toruncommand
self.clientmanager.authref
File "/usr/lib/python2.7/dist-packages/osclib/clientmanager.py", line
215, in auth
ref
self.authref = self.auth.getauthref(self.session)
File "/usr/lib/python2.7/dist-packages/keystoneauth1/identity/generic/base.py",
line 198, in getauthref
return self.plugin.getauth_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-d027f91c131a)
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@lists.openstack.org
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
responded Mar 12, 2017 by yewgang (980 points)   3
0 votes

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@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 OSUSERNAME=gateway
export OS
PASSWORD=gateway
export OSPROJECTNAME=gateway
export OSUSERDOMAINNAME=Default
export OS
PROJECTDOMAINNAME=Default
export OSAUTHURL=http://controller:35357/v3
export OSIDENTITYAPI_VERSION=3

detail error is as bellow, does that mean my env is wrong? Thank you!

gateway@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@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(accesskey='', accesssecret='', access_token='',
accesstokenendpoint='', accesstokentype='', authtype='', authurl='
http://controller:35357/v3', cacert=None, cert='', clientid='',
client
secret='', cloud='', code='', consumerkey='',
consumer
secret='
', debug=True, defaultdomain='default',
default
domainid='', defaultdomainname='', deferredhelp=False,
discoveryendpoint='', domainid='', domainname='', endpoint='',
identity
provider='', identityproviderurl='', insecure=None,
interface='', key='', logfile=None, oldprofile=None, openidscope='',
os
betacommand=False, oscomputeapiversion='',
osidentityapiversion='3', osimageapiversion='',
osnetworkapiversion='', osobjectapiversion='', osprojectid=None,
osprojectname=None, osvolumeapiversion='', passcode='',
password='***', profile=None, project
domainid='',
project
domainname='Default', projectid='', projectname='gateway',
protocol='', redirect
uri='', regionname='', timing=False, token='***',
trust
id='', url='', userdomainid='', userdomainname='Default',
userid='', username='gateway', verboselevel=3, verify=None)
Auth plugin password selected
authconfighook(): {'authtype': 'password', 'betacommand': False,
u'computeapiversion': u'2', 'key': None, u'databaseapiversion': u'1.0',
'cacert': None, 'authurl': 'http://controller:35357/v3',
u'network
apiversion': u'2', u'message': u'', u'imageformat': u'qcow2',
'networks': [], u'imageapiversion': u'2', 'verify': True,
u'dnsapiversion': u'2', u'objectstoreapiversion': u'1', 'username':
'gateway', u'container
infraapiversion': u'1', 'verboselevel': 3,
'region
name': '', 'apitimeout': None, u'baremetalapiversion': u'1',
'auth': {'user
domainname': 'Default', 'projectname': 'gateway',
'projectdomainname': 'Default'}, 'defaultdomain': 'default',
u'container
apiversion': u'1', u'imageapiusetasks': False,
u'floatingipsource': u'neutron', u'orchestrationapiversion': u'1',
'timing': False, 'password': '', u'applicationcatalogapiversion':
u'1', u'key
managerapiversion': u'v1', u'meteringapiversion': u'2',
'deferredhelp': False, u'identityapiversion': '3',
u'volume
apiversion': u'2', 'cert': None, u'secgroupsource': u'neutron',
u'status': u'active', 'debug': True, u'interface': None,
u'disablevendoragent': {}}
defaults: {u'authtype': 'password', u'status': u'active',
u'compute
apiversion': u'2', 'key': None, u'databaseapiversion': u'1.0',
'api
timeout': None, u'baremetalapiversion': u'1', u'imageapiversion':
u'2', u'containerinfraapiversion': u'1', u'meteringapiversion':
u'2', u'image
apiusetasks': False, u'floatingipsource': u'neutron',
u'orchestrationapiversion': u'1', 'cacert': None, u'networkapiversion':
u'2', u'message': u'', u'imageformat': u'qcow2',
u'application
catalogapiversion': u'1', u'keymanagerapiversion':
u'v1', 'verify': True, u'identity
apiversion': u'2.0',
u'volume
apiversion': u'2', 'cert': None, u'secgroupsource': u'neutron',
u'containerapiversion': u'1', u'dnsapiversion': u'2',
u'objectstoreapiversion': u'1', u'interface': None,
u'disable
vendoragent': {}}
cloud cfg: {'auth
type': 'password', 'betacommand': False,
u'compute
apiversion': u'2', 'key': None, u'databaseapiversion': u'1.0',
'cacert': None, 'auth
url': 'http://controller:35357/v3',
u'networkapiversion': u'2', u'message': u'', u'imageformat': u'qcow2',
'networks': [], u'image
apiversion': u'2', 'verify': True,
u'dns
apiversion': u'2', u'objectstoreapiversion': u'1', 'username':
'gateway', u'containerinfraapiversion': u'1', 'verboselevel': 3,
'regionname': '', 'apitimeout': None, u'baremetalapiversion': u'1',
'auth': {'userdomainname': 'Default', 'projectname': 'gateway',
'project
domainname': 'Default'}, 'defaultdomain': 'default',
u'containerapiversion': u'1', u'imageapiusetasks': False,
u'floating
ipsource': u'neutron', u'orchestrationapi_version': u'1',
'timing': False, 'password': '
', u'applicationcatalogapiversion':
u'1', u'key
managerapiversion': u'v1', u'meteringapiversion': u'2',
'deferredhelp': False, u'identityapiversion': '3',
u'volume
apiversion': u'2', 'cert': None, u'secgroupsource': u'neutron',
u'status': u'active', 'debug': True, u'interface': None,
u'disablevendoragent': {}}
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
objectstore API version 1, cmd group openstack.objectstore.v1
neutronclient API version 2, cmd group openstack.neutronclient.v2
Auth plugin password selected
authconfighook(): {'authtype': 'password', 'betacommand': False,
u'computeapiversion': u'2', 'key': None, u'databaseapiversion': u'1.0',
'cacert': None, 'authurl': 'http://controller:35357/v3',
u'network
apiversion': u'2', u'message': u'', u'imageformat': u'qcow2',
'networks': [], u'imageapiversion': u'2', 'verify': True,
u'dnsapiversion': u'2', u'objectstoreapiversion': u'1', 'username':
'gateway', u'container
infraapiversion': u'1', 'verboselevel': 3,
'region
name': '', 'apitimeout': None, u'baremetalapiversion': u'1',
'auth': {'user
domainname': 'Default', 'projectname': 'gateway',
'projectdomainname': 'Default'}, 'defaultdomain': 'default',
u'container
apiversion': u'1', u'imageapiusetasks': False,
u'floatingipsource': u'neutron', u'orchestrationapiversion': u'1',
'timing': False, 'password': '', u'applicationcatalogapiversion':
u'1', u'key
managerapiversion': u'v1', u'meteringapiversion': u'2',
'deferredhelp': False, u'identityapiversion': '3',
u'volume
apiversion': u'2', 'cert': None, u'secgroupsource': u'neutron',
u'status': u'active', 'debug': True, u'interface': None,
u'disablevendoragent': {}}
Auth plugin password selected
authconfighook(): {'authtype': 'password', 'betacommand': False,
u'computeapiversion': u'2', 'key': None, u'databaseapiversion': u'1.0',
'cacert': None, 'authurl': 'http://controller:35357/v3',
u'network
apiversion': u'2', u'message': u'', u'imageformat': u'qcow2',
'networks': [], u'imageapiversion': u'2', 'verify': True,
u'dnsapiversion': u'2', u'objectstoreapiversion': u'1', 'username':
'gateway', u'container
infraapiversion': u'1', 'verboselevel': 3,
'region
name': '', 'apitimeout': None, u'baremetalapiversion': u'1',
'auth': {'user
domainname': 'Default', 'projectname': 'gateway',
'projectdomainname': 'Default'}, 'defaultdomain': 'default',
u'container
apiversion': u'1', u'imageapiusetasks': False,
u'floatingipsource': u'neutron', u'orchestrationapiversion': u'1',
'timing': False, 'password': '
', u'applicationcatalogapiversion':
u'1', u'key
managerapiversion': u'v1', u'meteringapiversion': u'2',
'deferredhelp': False, u'identityapiversion': '3',
u'volume
apiversion': u'2', 'cert': None, u'secgroupsource': u'neutron',
u'status': u'active', 'debug': True, u'interface': None,
u'disablevendoragent': {}}
command: project create -> openstackclient.identity.v3.pr
oject.CreateProject
Auth plugin password selected
authconfighook(): {'authtype': 'password', 'betacommand': False,
u'computeapiversion': u'2', 'key': None, u'databaseapiversion': u'1.0',
'cacert': None, 'authurl': 'http://controller:35357/v3',
u'network
apiversion': u'2', u'message': u'', u'imageformat': u'qcow2',
'networks': [], u'imageapiversion': u'2', 'verify': True,
u'dnsapiversion': u'2', u'objectstoreapiversion': u'1', 'username':
'gateway', u'container
infraapiversion': u'1', 'verboselevel': 3,
'region
name': '', 'apitimeout': None, u'baremetalapiversion': u'1',
'auth': {'user
domainname': 'Default', 'projectname': 'gateway',
'projectdomainname': 'Default'}, 'defaultdomain': 'default',
u'container
apiversion': u'1', u'imageapiusetasks': False,
u'floatingipsource': u'neutron', u'orchestrationapiversion': u'1',
'timing': False, 'password': '', u'applicationcatalogapiversion':
u'1', u'key
managerapiversion': u'v1', u'meteringapiversion': u'2',
'deferredhelp': False, u'identityapiversion': '3',
u'volume
apiversion': u'2', 'cert': None, u'secgroupsource': u'neutron',
u'status': u'active', 'debug': True, u'interface': None,
u'disablevendoragent': {}}
Using auth plugin: password
Using parameters {'username': 'gateway', 'projectname': 'gateway',
'user
domainname': 'Default', 'authurl': 'http://controller:35357/v3',
'password': '
', 'projectdomainname': '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
runsubcommand
self.prepare
toruncommand(cmd)
File "/usr/lib/python2.7/dist-packages/openstackclient/shell.py", line
198, in preparetoruncommand
return super(OpenStackShell, self).prepare
toruncommand(cmd)
File "/usr/lib/python2.7/dist-packages/osclib/shell.py", line 457, in
prepare
toruncommand
self.clientmanager.authref
File "/usr/lib/python2.7/dist-packages/osclib/clientmanager.py", line
215, in auth
ref
self.authref = self.auth.getauthref(self.session)
File "/usr/lib/python2.7/dist-packages/keystoneauth1/identity/generic/base.py",
line 198, in getauthref
return self.plugin.getauth_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-d027f91c131a)
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@lists.openstack.org
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/
openstack


Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to : openstack@lists.openstack.org
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
responded Mar 12, 2017 by Chris_Suttles (500 points)  
0 votes

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@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@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 OSUSERNAME=gateway
export OS
PASSWORD=gateway
export OSPROJECTNAME=gateway
export OSUSERDOMAINNAME=Default
export OS
PROJECTDOMAINNAME=Default
export OSAUTHURL=http://controller:35357/v3
export OSIDENTITYAPI_VERSION=3

detail error is as bellow, does that mean my env is wrong? Thank you!

gateway@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@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(accesskey='', accesssecret='',
access_token='
', accesstokenendpoint='', accesstokentype='',
authtype='', authurl='http://controller:35357/v3', cacert=None,
cert='', clientid='', clientsecret='', cloud='', code='',
consumerkey='', consumersecret='
', debug=True,
defaultdomain='default', defaultdomainid='', defaultdomainname='',
deferred
help=False, discoveryendpoint='', domainid='', domainname='',
endpoint='', identity
provider='', identityproviderurl='', insecure=None,
interface='', key='', logfile=None, oldprofile=None, openidscope='',
os
betacommand=False, oscomputeapiversion='',
osidentityapiversion='3', osimageapiversion='',
osnetworkapiversion='', osobjectapiversion='', osprojectid=None,
osprojectname=None, osvolumeapiversion='', passcode='',
password='***', profile=None, project
domainid='',
project
domainname='Default', projectid='', projectname='gateway',
protocol='', redirect
uri='', regionname='', timing=False, token='***',
trust
id='', url='', userdomainid='', userdomainname='Default',
userid='', username='gateway', verboselevel=3, verify=None)
Auth plugin password selected
authconfighook(): {'authtype': 'password', 'betacommand': False,
u'computeapiversion': u'2', 'key': None, u'databaseapiversion': u'1.0',
'cacert': None, 'authurl': 'http://controller:35357/v3',
u'network
apiversion': u'2', u'message': u'', u'imageformat': u'qcow2',
'networks': [], u'imageapiversion': u'2', 'verify': True,
u'dnsapiversion': u'2', u'objectstoreapiversion': u'1', 'username':
'gateway', u'container
infraapiversion': u'1', 'verboselevel': 3,
'region
name': '', 'apitimeout': None, u'baremetalapiversion': u'1',
'auth': {'user
domainname': 'Default', 'projectname': 'gateway',
'projectdomainname': 'Default'}, 'defaultdomain': 'default',
u'container
apiversion': u'1', u'imageapiusetasks': False,
u'floatingipsource': u'neutron', u'orchestrationapiversion': u'1',
'timing': False, 'password': '', u'applicationcatalogapiversion':
u'1', u'key
managerapiversion': u'v1', u'meteringapiversion': u'2',
'deferredhelp': False, u'identityapiversion': '3',
u'volume
apiversion': u'2', 'cert': None, u'secgroupsource': u'neutron',
u'status': u'active', 'debug': True, u'interface': None,
u'disablevendoragent': {}}
defaults: {u'authtype': 'password', u'status': u'active',
u'compute
apiversion': u'2', 'key': None, u'databaseapiversion': u'1.0',
'api
timeout': None, u'baremetalapiversion': u'1', u'imageapiversion':
u'2', u'containerinfraapiversion': u'1', u'meteringapiversion':
u'2', u'image
apiusetasks': False, u'floatingipsource': u'neutron',
u'orchestrationapiversion': u'1', 'cacert': None, u'networkapiversion':
u'2', u'message': u'', u'imageformat': u'qcow2',
u'application
catalogapiversion': u'1', u'keymanagerapiversion':
u'v1', 'verify': True, u'identity
apiversion': u'2.0',
u'volume
apiversion': u'2', 'cert': None, u'secgroupsource': u'neutron',
u'containerapiversion': u'1', u'dnsapiversion': u'2',
u'objectstoreapiversion': u'1', u'interface': None,
u'disable
vendoragent': {}}
cloud cfg: {'auth
type': 'password', 'betacommand': False,
u'compute
apiversion': u'2', 'key': None, u'databaseapiversion': u'1.0',
'cacert': None, 'auth
url': 'http://controller:35357/v3',
u'networkapiversion': u'2', u'message': u'', u'imageformat': u'qcow2',
'networks': [], u'image
apiversion': u'2', 'verify': True,
u'dns
apiversion': u'2', u'objectstoreapiversion': u'1', 'username':
'gateway', u'containerinfraapiversion': u'1', 'verboselevel': 3,
'regionname': '', 'apitimeout': None, u'baremetalapiversion': u'1',
'auth': {'userdomainname': 'Default', 'projectname': 'gateway',
'project
domainname': 'Default'}, 'defaultdomain': 'default',
u'containerapiversion': u'1', u'imageapiusetasks': False,
u'floating
ipsource': u'neutron', u'orchestrationapi_version': u'1',
'timing': False, 'password': '
', u'applicationcatalogapiversion':
u'1', u'key
managerapiversion': u'v1', u'meteringapiversion': u'2',
'deferredhelp': False, u'identityapiversion': '3',
u'volume
apiversion': u'2', 'cert': None, u'secgroupsource': u'neutron',
u'status': u'active', 'debug': True, u'interface': None,
u'disablevendoragent': {}}
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
objectstore API version 1, cmd group openstack.objectstore.v1
neutronclient API version 2, cmd group openstack.neutronclient.v2
Auth plugin password selected
authconfighook(): {'authtype': 'password', 'betacommand': False,
u'computeapiversion': u'2', 'key': None, u'databaseapiversion': u'1.0',
'cacert': None, 'authurl': 'http://controller:35357/v3',
u'network
apiversion': u'2', u'message': u'', u'imageformat': u'qcow2',
'networks': [], u'imageapiversion': u'2', 'verify': True,
u'dnsapiversion': u'2', u'objectstoreapiversion': u'1', 'username':
'gateway', u'container
infraapiversion': u'1', 'verboselevel': 3,
'region
name': '', 'apitimeout': None, u'baremetalapiversion': u'1',
'auth': {'user
domainname': 'Default', 'projectname': 'gateway',
'projectdomainname': 'Default'}, 'defaultdomain': 'default',
u'container
apiversion': u'1', u'imageapiusetasks': False,
u'floatingipsource': u'neutron', u'orchestrationapiversion': u'1',
'timing': False, 'password': '', u'applicationcatalogapiversion':
u'1', u'key
managerapiversion': u'v1', u'meteringapiversion': u'2',
'deferredhelp': False, u'identityapiversion': '3',
u'volume
apiversion': u'2', 'cert': None, u'secgroupsource': u'neutron',
u'status': u'active', 'debug': True, u'interface': None,
u'disablevendoragent': {}}
Auth plugin password selected
authconfighook(): {'authtype': 'password', 'betacommand': False,
u'computeapiversion': u'2', 'key': None, u'databaseapiversion': u'1.0',
'cacert': None, 'authurl': 'http://controller:35357/v3',
u'network
apiversion': u'2', u'message': u'', u'imageformat': u'qcow2',
'networks': [], u'imageapiversion': u'2', 'verify': True,
u'dnsapiversion': u'2', u'objectstoreapiversion': u'1', 'username':
'gateway', u'container
infraapiversion': u'1', 'verboselevel': 3,
'region
name': '', 'apitimeout': None, u'baremetalapiversion': u'1',
'auth': {'user
domainname': 'Default', 'projectname': 'gateway',
'projectdomainname': 'Default'}, 'defaultdomain': 'default',
u'container
apiversion': u'1', u'imageapiusetasks': False,
u'floatingipsource': u'neutron', u'orchestrationapiversion': u'1',
'timing': False, 'password': '
', u'applicationcatalogapiversion':
u'1', u'key
managerapiversion': u'v1', u'meteringapiversion': u'2',
'deferredhelp': False, u'identityapiversion': '3',
u'volume
apiversion': u'2', 'cert': None, u'secgroupsource': u'neutron',
u'status': u'active', 'debug': True, u'interface': None,
u'disablevendoragent': {}}
command: project create -> openstackclient.identity.v3.pr
oject.CreateProject
Auth plugin password selected
authconfighook(): {'authtype': 'password', 'betacommand': False,
u'computeapiversion': u'2', 'key': None, u'databaseapiversion': u'1.0',
'cacert': None, 'authurl': 'http://controller:35357/v3',
u'network
apiversion': u'2', u'message': u'', u'imageformat': u'qcow2',
'networks': [], u'imageapiversion': u'2', 'verify': True,
u'dnsapiversion': u'2', u'objectstoreapiversion': u'1', 'username':
'gateway', u'container
infraapiversion': u'1', 'verboselevel': 3,
'region
name': '', 'apitimeout': None, u'baremetalapiversion': u'1',
'auth': {'user
domainname': 'Default', 'projectname': 'gateway',
'projectdomainname': 'Default'}, 'defaultdomain': 'default',
u'container
apiversion': u'1', u'imageapiusetasks': False,
u'floatingipsource': u'neutron', u'orchestrationapiversion': u'1',
'timing': False, 'password': '', u'applicationcatalogapiversion':
u'1', u'key
managerapiversion': u'v1', u'meteringapiversion': u'2',
'deferredhelp': False, u'identityapiversion': '3',
u'volume
apiversion': u'2', 'cert': None, u'secgroupsource': u'neutron',
u'status': u'active', 'debug': True, u'interface': None,
u'disablevendoragent': {}}
Using auth plugin: password
Using parameters {'username': 'gateway', 'projectname': 'gateway',
'user
domainname': 'Default', 'authurl': 'http://controller:35357/v3',
'password': '
', 'projectdomainname': '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
runsubcommand
self.prepare
toruncommand(cmd)
File "/usr/lib/python2.7/dist-packages/openstackclient/shell.py", line
198, in preparetoruncommand
return super(OpenStackShell, self).prepare
toruncommand(cmd)
File "/usr/lib/python2.7/dist-packages/osclib/shell.py", line 457, in
prepare
toruncommand
self.clientmanager.authref
File "/usr/lib/python2.7/dist-packages/osclib/clientmanager.py", line
215, in auth
ref
self.authref = self.auth.getauthref(self.session)
File "/usr/lib/python2.7/dist-packages/keystoneauth1/identity/generic/base.py",
line 198, in getauthref
return self.plugin.getauth_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@lists.openstack.org
Unsubscribe : http://lists.openstack.org/cgi
-bin/mailman/listinfo/openstack


Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to : openstack@lists.openstack.org
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
responded Mar 13, 2017 by yewgang (980 points)   3
0 votes

The OS_PROJECT variable should probably still be admin.

I urge you to consider following the guide verbatim, and customizing once you are done.

-Chris

On Mar 12, 2017, at 6:32 PM, Sam batmanustc@gmail.com wrote:

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@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@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 OSUSERNAME=gateway
export OS
PASSWORD=gateway
export OSPROJECTNAME=gateway
export OSUSERDOMAINNAME=Default
export OS
PROJECTDOMAINNAME=Default
export OSAUTHURL=http://controller:35357/v3
export OSIDENTITYAPI_VERSION=3

detail error is as bellow, does that mean my env is wrong? Thank you!

gateway@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@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(accesskey='', accesssecret='', access_token='', accesstokenendpoint='', accesstokentype='', authtype='', authurl='http://controller:35357/v3', cacert=None, cert='', clientid='', clientsecret='', cloud='', code='', consumerkey='', consumersecret='', debug=True, defaultdomain='default', defaultdomainid='', defaultdomainname='', deferredhelp=False, discoveryendpoint='', domainid='', domainname='', endpoint='', identityprovider='', identityproviderurl='', insecure=None, interface='', key='', logfile=None, oldprofile=None, openidscope='', osbetacommand=False, oscomputeapiversion='', osidentityapiversion='3', osimageapiversion='', osnetworkapiversion='', osobjectapiversion='', osprojectid=None, osprojectname=None, osvolumeapiversion='', passcode='', password='***', profile=None, projectdomainid='', projectdomainname='Default', projectid='', projectname='gateway', protocol='', redirecturi='', regionname='', timing=False, token='***', trustid='', url='', userdomainid='', userdomainname='Default', userid='', username='gateway', verboselevel=3, verify=None)
Auth plugin password selected
authconfighook(): {'authtype': 'password', 'betacommand': False, u'computeapiversion': u'2', 'key': None, u'databaseapiversion': u'1.0', 'cacert': None, 'authurl': 'http://controller:35357/v3', u'networkapiversion': u'2', u'message': u'', u'imageformat': u'qcow2', 'networks': [], u'imageapiversion': u'2', 'verify': True, u'dnsapiversion': u'2', u'objectstoreapiversion': u'1', 'username': 'gateway', u'containerinfraapiversion': u'1', 'verboselevel': 3, 'regionname': '', 'apitimeout': None, u'baremetalapiversion': u'1', 'auth': {'userdomainname': 'Default', 'projectname': 'gateway', 'projectdomainname': 'Default'}, 'defaultdomain': 'default', u'containerapiversion': u'1', u'imageapiusetasks': False, u'floatingipsource': u'neutron', u'orchestrationapiversion': u'1', 'timing': False, 'password': '', u'applicationcatalogapiversion': u'1', u'keymanagerapiversion': u'v1', u'meteringapiversion': u'2', 'deferredhelp': False, u'identityapiversion': '3', u'volumeapiversion': u'2', 'cert': None, u'secgroupsource': u'neutron', u'status': u'active', 'debug': True, u'interface': None, u'disablevendoragent': {}}
defaults: {u'authtype': 'password', u'status': u'active', u'computeapiversion': u'2', 'key': None, u'databaseapiversion': u'1.0', 'apitimeout': None, u'baremetalapiversion': u'1', u'imageapiversion': u'2', u'containerinfraapiversion': u'1', u'meteringapiversion': u'2', u'imageapiusetasks': False, u'floatingipsource': u'neutron', u'orchestrationapiversion': u'1', 'cacert': None, u'networkapiversion': u'2', u'message': u'', u'imageformat': u'qcow2', u'applicationcatalogapiversion': u'1', u'keymanagerapiversion': u'v1', 'verify': True, u'identityapiversion': u'2.0', u'volumeapiversion': u'2', 'cert': None, u'secgroupsource': u'neutron', u'containerapiversion': u'1', u'dnsapiversion': u'2', u'objectstoreapiversion': u'1', u'interface': None, u'disablevendoragent': {}}
cloud cfg: {'auth
type': 'password', 'betacommand': False, u'computeapiversion': u'2', 'key': None, u'databaseapiversion': u'1.0', 'cacert': None, 'authurl': 'http://controller:35357/v3', u'networkapiversion': u'2', u'message': u'', u'imageformat': u'qcow2', 'networks': [], u'imageapiversion': u'2', 'verify': True, u'dnsapiversion': u'2', u'objectstoreapiversion': u'1', 'username': 'gateway', u'containerinfraapiversion': u'1', 'verboselevel': 3, 'regionname': '', 'apitimeout': None, u'baremetalapiversion': u'1', 'auth': {'userdomainname': 'Default', 'projectname': 'gateway', 'projectdomainname': 'Default'}, 'defaultdomain': 'default', u'containerapiversion': u'1', u'imageapiusetasks': False, u'floatingipsource': u'neutron', u'orchestrationapi_version': u'1', 'timing': False, 'password': '
', u'applicationcatalogapiversion': u'1', u'keymanagerapiversion': u'v1', u'meteringapiversion': u'2', 'deferredhelp': False, u'identityapiversion': '3', u'volumeapiversion': u'2', 'cert': None, u'secgroupsource': u'neutron', u'status': u'active', 'debug': True, u'interface': None, u'disablevendoragent': {}}
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
objectstore API version 1, cmd group openstack.objectstore.v1
neutronclient API version 2, cmd group openstack.neutronclient.v2
Auth plugin password selected
authconfighook(): {'authtype': 'password', 'betacommand': False, u'computeapiversion': u'2', 'key': None, u'databaseapiversion': u'1.0', 'cacert': None, 'authurl': 'http://controller:35357/v3', u'networkapiversion': u'2', u'message': u'', u'imageformat': u'qcow2', 'networks': [], u'imageapiversion': u'2', 'verify': True, u'dnsapiversion': u'2', u'objectstoreapiversion': u'1', 'username': 'gateway', u'containerinfraapiversion': u'1', 'verboselevel': 3, 'regionname': '', 'apitimeout': None, u'baremetalapiversion': u'1', 'auth': {'userdomainname': 'Default', 'projectname': 'gateway', 'projectdomainname': 'Default'}, 'defaultdomain': 'default', u'containerapiversion': u'1', u'imageapiusetasks': False, u'floatingipsource': u'neutron', u'orchestrationapiversion': u'1', 'timing': False, 'password': '', u'applicationcatalogapiversion': u'1', u'keymanagerapiversion': u'v1', u'meteringapiversion': u'2', 'deferredhelp': False, u'identityapiversion': '3', u'volumeapiversion': u'2', 'cert': None, u'secgroupsource': u'neutron', u'status': u'active', 'debug': True, u'interface': None, u'disablevendoragent': {}}
Auth plugin password selected
authconfighook(): {'authtype': 'password', 'betacommand': False, u'computeapiversion': u'2', 'key': None, u'databaseapiversion': u'1.0', 'cacert': None, 'authurl': 'http://controller:35357/v3', u'networkapiversion': u'2', u'message': u'', u'imageformat': u'qcow2', 'networks': [], u'imageapiversion': u'2', 'verify': True, u'dnsapiversion': u'2', u'objectstoreapiversion': u'1', 'username': 'gateway', u'containerinfraapiversion': u'1', 'verboselevel': 3, 'regionname': '', 'apitimeout': None, u'baremetalapiversion': u'1', 'auth': {'userdomainname': 'Default', 'projectname': 'gateway', 'projectdomainname': 'Default'}, 'defaultdomain': 'default', u'containerapiversion': u'1', u'imageapiusetasks': False, u'floatingipsource': u'neutron', u'orchestrationapiversion': u'1', 'timing': False, 'password': '
', u'applicationcatalogapiversion': u'1', u'keymanagerapiversion': u'v1', u'meteringapiversion': u'2', 'deferredhelp': False, u'identityapiversion': '3', u'volumeapiversion': u'2', 'cert': None, u'secgroupsource': u'neutron', u'status': u'active', 'debug': True, u'interface': None, u'disablevendoragent': {}}
command: project create -> openstackclient.identity.v3.project.CreateProject
Auth plugin password selected
authconfighook(): {'authtype': 'password', 'betacommand': False, u'computeapiversion': u'2', 'key': None, u'databaseapiversion': u'1.0', 'cacert': None, 'authurl': 'http://controller:35357/v3', u'networkapiversion': u'2', u'message': u'', u'imageformat': u'qcow2', 'networks': [], u'imageapiversion': u'2', 'verify': True, u'dnsapiversion': u'2', u'objectstoreapiversion': u'1', 'username': 'gateway', u'containerinfraapiversion': u'1', 'verboselevel': 3, 'regionname': '', 'apitimeout': None, u'baremetalapiversion': u'1', 'auth': {'userdomainname': 'Default', 'projectname': 'gateway', 'projectdomainname': 'Default'}, 'defaultdomain': 'default', u'containerapiversion': u'1', u'imageapiusetasks': False, u'floatingipsource': u'neutron', u'orchestrationapiversion': u'1', 'timing': False, 'password': '', u'applicationcatalogapiversion': u'1', u'keymanagerapiversion': u'v1', u'meteringapiversion': u'2', 'deferredhelp': False, u'identityapiversion': '3', u'volumeapiversion': u'2', 'cert': None, u'secgroupsource': u'neutron', u'status': u'active', 'debug': True, u'interface': None, u'disablevendoragent': {}}
Using auth plugin: password
Using parameters {'username': 'gateway', 'projectname': 'gateway', 'userdomainname': 'Default', 'authurl': 'http://controller:35357/v3', 'password': '
', 'projectdomainname': '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 runsubcommand
self.prepare
toruncommand(cmd)
File "/usr/lib/python2.7/dist-packages/openstackclient/shell.py", line 198, in preparetoruncommand
return super(OpenStackShell, self).prepare
toruncommand(cmd)
File "/usr/lib/python2.7/dist-packages/osclib/shell.py", line 457, in preparetoruncommand
self.clientmanager.authref
File "/usr/lib/python2.7/dist-packages/osclib/clientmanager.py", line 215, in authref
self.authref = self.auth.getauthref(self.session)
File "/usr/lib/python2.7/dist-packages/keystoneauth1/identity/generic/base.py", line 198, in getauthref
return self.plugin.getauth_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-d027f91c131a)
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@lists.openstack.org
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack


Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to : openstack@lists.openstack.org
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
responded Mar 13, 2017 by Chris_Suttles (500 points)  
0 votes

Hi,

Assuming that the user and password are correct, then I'd look at the
domain info - very easy to get tripped up about whether the name is
'Default' or 'default'. Maybe try setting the ID instead of the NAME e.g:

export OSUSERDOMAINID=default
export OS
PROJECTDOMAINID=default

regards

Mark

On 13/03/17 02:35, Sam wrote:
Hi all,

I'm installing openstack ocata version, in this step:
https://docs.openstack.org/ocata/install-guide-ubuntu/keystone-users.html
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 OSUSERNAME=gateway
export OS
PASSWORD=gateway
export OSPROJECTNAME=gateway
export OSUSERDOMAINNAME=Default
export OS
PROJECTDOMAINNAME=Default
export OSAUTHURL=http://controller:35357/v3
export OSIDENTITYAPI_VERSION=3

detail error is as bellow, does that mean my env is wrong? Thank you!

gateway@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@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(accesskey='', accesssecret='',
access_token='
', accesstokenendpoint='', accesstokentype='',
authtype='', authurl='http://controller:35357/v3
', cacert=None, cert='', clientid='',
client
secret='', cloud='', code='', consumerkey='',
consumer
secret='
', debug=True, defaultdomain='default',
default
domainid='', defaultdomainname='', deferredhelp=False,
discoveryendpoint='', domainid='', domainname='', endpoint='',
identity
provider='', identityproviderurl='', insecure=None,
interface='', key='', logfile=None, oldprofile=None,
openidscope='', osbetacommand=False, oscomputeapiversion='',
osidentityapiversion='3', osimageapiversion='',
osnetworkapiversion='', osobjectapiversion='',
osprojectid=None, osprojectname=None, osvolumeapiversion='',
passcode='', password='***', profile=None, project
domainid='',
project
domainname='Default', projectid='', projectname='gateway',
protocol='', redirect
uri='', regionname='', timing=False,
token='***', trust
id='', url='', userdomainid='',
userdomainname='Default', userid='', username='gateway',
verbose
level=3, verify=None)
Auth plugin password selected
authconfighook(): {'authtype': 'password', 'betacommand': False,
u'computeapiversion': u'2', 'key': None, u'databaseapiversion':
u'1.0', 'cacert': None, 'authurl': 'http://controller:35357/v3',
u'network
apiversion': u'2', u'message': u'', u'imageformat':
u'qcow2', 'networks': [], u'imageapiversion': u'2', 'verify': True,
u'dnsapiversion': u'2', u'objectstoreapiversion': u'1',
'username': 'gateway', u'container
infraapiversion': u'1',
'verboselevel': 3, 'regionname': '', 'apitimeout': None,
u'baremetal
apiversion': u'1', 'auth': {'userdomainname':
'Default', 'project
name': 'gateway', 'projectdomainname':
'Default'}, 'defaultdomain': 'default', u'containerapiversion':
u'1', u'image
apiusetasks': False, u'floatingipsource':
u'neutron', u'orchestrationapiversion': u'1', 'timing': False,
'password': '', u'applicationcatalogapiversion': u'1',
u'key
managerapiversion': u'v1', u'meteringapiversion': u'2',
'deferredhelp': False, u'identityapiversion': '3',
u'volume
apiversion': u'2', 'cert': None, u'secgroupsource':
u'neutron', u'status': u'active', 'debug': True, u'interface': None,
u'disablevendoragent': {}}
defaults: {u'authtype': 'password', u'status': u'active',
u'compute
apiversion': u'2', 'key': None, u'databaseapiversion':
u'1.0', 'api
timeout': None, u'baremetalapiversion': u'1',
u'imageapiversion': u'2', u'containerinfraapiversion': u'1',
u'metering
apiversion': u'2', u'imageapiusetasks': False,
u'floatingipsource': u'neutron', u'orchestrationapiversion': u'1',
'cacert': None, u'networkapiversion': u'2', u'message': u'',
u'imageformat': u'qcow2', u'applicationcatalogapiversion': u'1',
u'keymanagerapiversion': u'v1', 'verify': True,
u'identity
apiversion': u'2.0', u'volumeapiversion': u'2', 'cert':
None, u'secgroup
source': u'neutron', u'containerapiversion': u'1',
u'dnsapiversion': u'2', u'objectstoreapiversion': u'1',
u'interface': None, u'disable
vendoragent': {}}
cloud cfg: {'auth
type': 'password', 'betacommand': False,
u'compute
apiversion': u'2', 'key': None, u'databaseapiversion':
u'1.0', 'cacert': None, 'auth
url': 'http://controller:35357/v3',
u'networkapiversion': u'2', u'message': u'', u'imageformat':
u'qcow2', 'networks': [], u'image
apiversion': u'2', 'verify': True,
u'dns
apiversion': u'2', u'objectstoreapiversion': u'1',
'username': 'gateway', u'containerinfraapiversion': u'1',
'verbose
level': 3, 'regionname': '', 'apitimeout': None,
u'baremetalapiversion': u'1', 'auth': {'userdomainname':
'Default', 'projectname': 'gateway', 'projectdomainname':
'Default'}, 'default
domain': 'default', u'containerapiversion':
u'1', u'imageapiusetasks': False, u'floatingipsource':
u'neutron', u'orchestration
api_version': u'1', 'timing': False,
'password': '
', u'applicationcatalogapiversion': u'1',
u'key
managerapiversion': u'v1', u'meteringapiversion': u'2',
'deferredhelp': False, u'identityapiversion': '3',
u'volume
apiversion': u'2', 'cert': None, u'secgroupsource':
u'neutron', u'status': u'active', 'debug': True, u'interface': None,
u'disablevendoragent': {}}
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
objectstore API version 1, cmd group openstack.objectstore.v1
neutronclient API version 2, cmd group openstack.neutronclient.v2
Auth plugin password selected
authconfighook(): {'authtype': 'password', 'betacommand': False,
u'computeapiversion': u'2', 'key': None, u'databaseapiversion':
u'1.0', 'cacert': None, 'authurl': 'http://controller:35357/v3',
u'network
apiversion': u'2', u'message': u'', u'imageformat':
u'qcow2', 'networks': [], u'imageapiversion': u'2', 'verify': True,
u'dnsapiversion': u'2', u'objectstoreapiversion': u'1',
'username': 'gateway', u'container
infraapiversion': u'1',
'verboselevel': 3, 'regionname': '', 'apitimeout': None,
u'baremetal
apiversion': u'1', 'auth': {'userdomainname':
'Default', 'project
name': 'gateway', 'projectdomainname':
'Default'}, 'defaultdomain': 'default', u'containerapiversion':
u'1', u'image
apiusetasks': False, u'floatingipsource':
u'neutron', u'orchestrationapiversion': u'1', 'timing': False,
'password': '', u'applicationcatalogapiversion': u'1',
u'key
managerapiversion': u'v1', u'meteringapiversion': u'2',
'deferredhelp': False, u'identityapiversion': '3',
u'volume
apiversion': u'2', 'cert': None, u'secgroupsource':
u'neutron', u'status': u'active', 'debug': True, u'interface': None,
u'disablevendoragent': {}}
Auth plugin password selected
authconfighook(): {'authtype': 'password', 'betacommand': False,
u'computeapiversion': u'2', 'key': None, u'databaseapiversion':
u'1.0', 'cacert': None, 'authurl': 'http://controller:35357/v3',
u'network
apiversion': u'2', u'message': u'', u'imageformat':
u'qcow2', 'networks': [], u'imageapiversion': u'2', 'verify': True,
u'dnsapiversion': u'2', u'objectstoreapiversion': u'1',
'username': 'gateway', u'container
infraapiversion': u'1',
'verboselevel': 3, 'regionname': '', 'apitimeout': None,
u'baremetal
apiversion': u'1', 'auth': {'userdomainname':
'Default', 'project
name': 'gateway', 'projectdomainname':
'Default'}, 'defaultdomain': 'default', u'containerapiversion':
u'1', u'image
apiusetasks': False, u'floatingipsource':
u'neutron', u'orchestrationapiversion': u'1', 'timing': False,
'password': '
', u'applicationcatalogapiversion': u'1',
u'key
managerapiversion': u'v1', u'meteringapiversion': u'2',
'deferredhelp': False, u'identityapiversion': '3',
u'volume
apiversion': u'2', 'cert': None, u'secgroupsource':
u'neutron', u'status': u'active', 'debug': True, u'interface': None,
u'disablevendoragent': {}}
command: project create ->
openstackclient.identity.v3.project.CreateProject
Auth plugin password selected
authconfighook(): {'authtype': 'password', 'betacommand': False,
u'computeapiversion': u'2', 'key': None, u'databaseapiversion':
u'1.0', 'cacert': None, 'authurl': 'http://controller:35357/v3',
u'network
apiversion': u'2', u'message': u'', u'imageformat':
u'qcow2', 'networks': [], u'imageapiversion': u'2', 'verify': True,
u'dnsapiversion': u'2', u'objectstoreapiversion': u'1',
'username': 'gateway', u'container
infraapiversion': u'1',
'verboselevel': 3, 'regionname': '', 'apitimeout': None,
u'baremetal
apiversion': u'1', 'auth': {'userdomainname':
'Default', 'project
name': 'gateway', 'projectdomainname':
'Default'}, 'defaultdomain': 'default', u'containerapiversion':
u'1', u'image
apiusetasks': False, u'floatingipsource':
u'neutron', u'orchestrationapiversion': u'1', 'timing': False,
'password': '', u'applicationcatalogapiversion': u'1',
u'key
managerapiversion': u'v1', u'meteringapiversion': u'2',
'deferredhelp': False, u'identityapiversion': '3',
u'volume
apiversion': u'2', 'cert': None, u'secgroupsource':
u'neutron', u'status': u'active', 'debug': True, u'interface': None,
u'disablevendoragent': {}}
Using auth plugin: password
Using parameters {'username': 'gateway', 'projectname': 'gateway',
'user
domainname': 'Default', 'authurl':
'http://controller:35357/v3', 'password': '
',
'projectdomainname': '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
runsubcommand
self.prepare
toruncommand(cmd)
File "/usr/lib/python2.7/dist-packages/openstackclient/shell.py",
line 198, in preparetoruncommand
return super(OpenStackShell, self).prepare
toruncommand(cmd)
File "/usr/lib/python2.7/dist-packages/osclib/shell.py", line 457,
in prepare
toruncommand
self.clientmanager.authref
File "/usr/lib/python2.7/dist-packages/osclib/clientmanager.py",
line 215, in auth
ref
self.authref = self.auth.getauthref(self.session)
File
"/usr/lib/python2.7/dist-packages/keystoneauth1/identity/generic/base.py",
line 198, in getauthref
return self.plugin.getauth_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-d027f91c131a)
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@lists.openstack.org
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack


Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to : openstack@lists.openstack.org
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
responded Mar 13, 2017 by Mark_Kirkwood (5,760 points)   1 8 13
0 votes

Hello Sam,

Hope you must have bootstrapped keystone with the correct password
ADMIN_PASS

keystone-manage bootstrap --bootstrap-password ADMIN_PASS \
--bootstrap-admin-url http://controller:35357/v3/ \
--bootstrap-internal-url http://controller:5000/v3/ \
--bootstrap-public-url http://controller:5000/v3/ \
--bootstrap-region-id RegionOne

Thanks
Mohit.
On 13 Mar 2017 07:38, "Chris Suttles" suttles@gmail.com wrote:

The OS_PROJECT variable should probably still be admin.

I urge you to consider following the guide verbatim, and customizing once
you are done.

-Chris

On Mar 12, 2017, at 6:32 PM, Sam batmanustc@gmail.com wrote:

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/key
stone-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@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/keysto
ne-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@gmail.com wrote:

Hi all,

I'm installing openstack ocata version, in this step:
https://docs.openstack.org/ocata/install-guide-ubuntu/keysto
ne-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 OSUSERNAME=gateway
export OS
PASSWORD=gateway
export OSPROJECTNAME=gateway
export OSUSERDOMAINNAME=Default
export OS
PROJECTDOMAINNAME=Default
export OSAUTHURL=http://controller:35357/v3
export OSIDENTITYAPI_VERSION=3

detail error is as bellow, does that mean my env is wrong? Thank you!

gateway@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@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(accesskey='', accesssecret='',
access_token='
', accesstokenendpoint='', accesstokentype='',
authtype='', authurl='http://controller:35357/v3', cacert=None,
cert='', clientid='', clientsecret='', cloud='', code='',
consumerkey='', consumersecret='
', debug=True,
defaultdomain='default', defaultdomainid='', defaultdomainname='',
deferred
help=False, discoveryendpoint='', domainid='', domainname='',
endpoint='', identity
provider='', identityproviderurl='', insecure=None,
interface='', key='', logfile=None, oldprofile=None, openidscope='',
os
betacommand=False, oscomputeapiversion='',
osidentityapiversion='3', osimageapiversion='',
osnetworkapiversion='', osobjectapiversion='', osprojectid=None,
osprojectname=None, osvolumeapiversion='', passcode='',
password='***', profile=None, project
domainid='',
project
domainname='Default', projectid='', projectname='gateway',
protocol='', redirect
uri='', regionname='', timing=False, token='***',
trust
id='', url='', userdomainid='', userdomainname='Default',
userid='', username='gateway', verboselevel=3, verify=None)
Auth plugin password selected
authconfighook(): {'authtype': 'password', 'betacommand': False,
u'computeapiversion': u'2', 'key': None, u'databaseapiversion': u'1.0',
'cacert': None, 'authurl': 'http://controller:35357/v3',
u'network
apiversion': u'2', u'message': u'', u'imageformat': u'qcow2',
'networks': [], u'imageapiversion': u'2', 'verify': True,
u'dnsapiversion': u'2', u'objectstoreapiversion': u'1', 'username':
'gateway', u'container
infraapiversion': u'1', 'verboselevel': 3,
'region
name': '', 'apitimeout': None, u'baremetalapiversion': u'1',
'auth': {'user
domainname': 'Default', 'projectname': 'gateway',
'projectdomainname': 'Default'}, 'defaultdomain': 'default',
u'container
apiversion': u'1', u'imageapiusetasks': False,
u'floatingipsource': u'neutron', u'orchestrationapiversion': u'1',
'timing': False, 'password': '', u'applicationcatalogapiversion':
u'1', u'key
managerapiversion': u'v1', u'meteringapiversion': u'2',
'deferredhelp': False, u'identityapiversion': '3',
u'volume
apiversion': u'2', 'cert': None, u'secgroupsource': u'neutron',
u'status': u'active', 'debug': True, u'interface': None,
u'disablevendoragent': {}}
defaults: {u'authtype': 'password', u'status': u'active',
u'compute
apiversion': u'2', 'key': None, u'databaseapiversion': u'1.0',
'api
timeout': None, u'baremetalapiversion': u'1', u'imageapiversion':
u'2', u'containerinfraapiversion': u'1', u'meteringapiversion':
u'2', u'image
apiusetasks': False, u'floatingipsource': u'neutron',
u'orchestrationapiversion': u'1', 'cacert': None, u'networkapiversion':
u'2', u'message': u'', u'imageformat': u'qcow2',
u'application
catalogapiversion': u'1', u'keymanagerapiversion':
u'v1', 'verify': True, u'identity
apiversion': u'2.0',
u'volume
apiversion': u'2', 'cert': None, u'secgroupsource': u'neutron',
u'containerapiversion': u'1', u'dnsapiversion': u'2',
u'objectstoreapiversion': u'1', u'interface': None,
u'disable
vendoragent': {}}
cloud cfg: {'auth
type': 'password', 'betacommand': False,
u'compute
apiversion': u'2', 'key': None, u'databaseapiversion': u'1.0',
'cacert': None, 'auth
url': 'http://controller:35357/v3',
u'networkapiversion': u'2', u'message': u'', u'imageformat': u'qcow2',
'networks': [], u'image
apiversion': u'2', 'verify': True,
u'dns
apiversion': u'2', u'objectstoreapiversion': u'1', 'username':
'gateway', u'containerinfraapiversion': u'1', 'verboselevel': 3,
'regionname': '', 'apitimeout': None, u'baremetalapiversion': u'1',
'auth': {'userdomainname': 'Default', 'projectname': 'gateway',
'project
domainname': 'Default'}, 'defaultdomain': 'default',
u'containerapiversion': u'1', u'imageapiusetasks': False,
u'floating
ipsource': u'neutron', u'orchestrationapi_version': u'1',
'timing': False, 'password': '
', u'applicationcatalogapiversion':
u'1', u'key
managerapiversion': u'v1', u'meteringapiversion': u'2',
'deferredhelp': False, u'identityapiversion': '3',
u'volume
apiversion': u'2', 'cert': None, u'secgroupsource': u'neutron',
u'status': u'active', 'debug': True, u'interface': None,
u'disablevendoragent': {}}
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
objectstore API version 1, cmd group openstack.objectstore.v1
neutronclient API version 2, cmd group openstack.neutronclient.v2
Auth plugin password selected
authconfighook(): {'authtype': 'password', 'betacommand': False,
u'computeapiversion': u'2', 'key': None, u'databaseapiversion': u'1.0',
'cacert': None, 'authurl': 'http://controller:35357/v3',
u'network
apiversion': u'2', u'message': u'', u'imageformat': u'qcow2',
'networks': [], u'imageapiversion': u'2', 'verify': True,
u'dnsapiversion': u'2', u'objectstoreapiversion': u'1', 'username':
'gateway', u'container
infraapiversion': u'1', 'verboselevel': 3,
'region
name': '', 'apitimeout': None, u'baremetalapiversion': u'1',
'auth': {'user
domainname': 'Default', 'projectname': 'gateway',
'projectdomainname': 'Default'}, 'defaultdomain': 'default',
u'container
apiversion': u'1', u'imageapiusetasks': False,
u'floatingipsource': u'neutron', u'orchestrationapiversion': u'1',
'timing': False, 'password': '', u'applicationcatalogapiversion':
u'1', u'key
managerapiversion': u'v1', u'meteringapiversion': u'2',
'deferredhelp': False, u'identityapiversion': '3',
u'volume
apiversion': u'2', 'cert': None, u'secgroupsource': u'neutron',
u'status': u'active', 'debug': True, u'interface': None,
u'disablevendoragent': {}}
Auth plugin password selected
authconfighook(): {'authtype': 'password', 'betacommand': False,
u'computeapiversion': u'2', 'key': None, u'databaseapiversion': u'1.0',
'cacert': None, 'authurl': 'http://controller:35357/v3',
u'network
apiversion': u'2', u'message': u'', u'imageformat': u'qcow2',
'networks': [], u'imageapiversion': u'2', 'verify': True,
u'dnsapiversion': u'2', u'objectstoreapiversion': u'1', 'username':
'gateway', u'container
infraapiversion': u'1', 'verboselevel': 3,
'region
name': '', 'apitimeout': None, u'baremetalapiversion': u'1',
'auth': {'user
domainname': 'Default', 'projectname': 'gateway',
'projectdomainname': 'Default'}, 'defaultdomain': 'default',
u'container
apiversion': u'1', u'imageapiusetasks': False,
u'floatingipsource': u'neutron', u'orchestrationapiversion': u'1',
'timing': False, 'password': '
', u'applicationcatalogapiversion':
u'1', u'key
managerapiversion': u'v1', u'meteringapiversion': u'2',
'deferredhelp': False, u'identityapiversion': '3',
u'volume
apiversion': u'2', 'cert': None, u'secgroupsource': u'neutron',
u'status': u'active', 'debug': True, u'interface': None,
u'disablevendoragent': {}}
command: project create -> openstackclient.identity.v3.pr
oject.CreateProject
Auth plugin password selected
authconfighook(): {'authtype': 'password', 'betacommand': False,
u'computeapiversion': u'2', 'key': None, u'databaseapiversion': u'1.0',
'cacert': None, 'authurl': 'http://controller:35357/v3',
u'network
apiversion': u'2', u'message': u'', u'imageformat': u'qcow2',
'networks': [], u'imageapiversion': u'2', 'verify': True,
u'dnsapiversion': u'2', u'objectstoreapiversion': u'1', 'username':
'gateway', u'container
infraapiversion': u'1', 'verboselevel': 3,
'region
name': '', 'apitimeout': None, u'baremetalapiversion': u'1',
'auth': {'user
domainname': 'Default', 'projectname': 'gateway',
'projectdomainname': 'Default'}, 'defaultdomain': 'default',
u'container
apiversion': u'1', u'imageapiusetasks': False,
u'floatingipsource': u'neutron', u'orchestrationapiversion': u'1',
'timing': False, 'password': '', u'applicationcatalogapiversion':
u'1', u'key
managerapiversion': u'v1', u'meteringapiversion': u'2',
'deferredhelp': False, u'identityapiversion': '3',
u'volume
apiversion': u'2', 'cert': None, u'secgroupsource': u'neutron',
u'status': u'active', 'debug': True, u'interface': None,
u'disablevendoragent': {}}
Using auth plugin: password
Using parameters {'username': 'gateway', 'projectname': 'gateway',
'user
domainname': 'Default', 'authurl': 'http://controller:35357/v3',
'password': '
', 'projectdomainname': '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
runsubcommand
self.prepare
toruncommand(cmd)
File "/usr/lib/python2.7/dist-packages/openstackclient/shell.py",
line 198, in preparetoruncommand
return super(OpenStackShell, self).prepare
toruncommand(cmd)
File "/usr/lib/python2.7/dist-packages/osclib/shell.py", line 457,
in prepare
toruncommand
self.clientmanager.authref
File "/usr/lib/python2.7/dist-packages/osclib/clientmanager.py",
line 215, in auth
ref
self.authref = self.auth.getauthref(self.session)
File "/usr/lib/python2.7/dist-packages/keystoneauth1/identity/generic/base.py",
line 198, in getauthref
return self.plugin.getauth_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@lists.openstack.org
Unsubscribe : http://lists.openstack.org/cgi
-bin/mailman/listinfo/openstack


Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/
openstack
Post to : openstack@lists.openstack.org
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/
openstack


Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to : openstack@lists.openstack.org
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
responded Mar 13, 2017 by Mohit_. (180 points)  
0 votes

Thank you all, I have solved by re-configure last 3 step in
https://docs.openstack.org/ocata/install-guide-ubuntu/keystone-users.html by
adding 'sudo', then it works.

It seems that I miss some step...

Thank you!

2017-03-13 10:16 GMT+08:00 Mohit . workonopenstack@gmail.com:

Hello Sam,

Hope you must have bootstrapped keystone with the correct password
ADMIN_PASS

keystone-manage bootstrap --bootstrap-password ADMIN_PASS \
--bootstrap-admin-url http://controller:35357/v3/ \
--bootstrap-internal-url http://controller:5000/v3/ \
--bootstrap-public-url http://controller:5000/v3/ \
--bootstrap-region-id RegionOne

Thanks
Mohit.
On 13 Mar 2017 07:38, "Chris Suttles" suttles@gmail.com wrote:

The OS_PROJECT variable should probably still be admin.

I urge you to consider following the guide verbatim, and customizing once
you are done.

-Chris

On Mar 12, 2017, at 6:32 PM, Sam batmanustc@gmail.com wrote:

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/key
stone-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@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/keysto
ne-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@gmail.com wrote:

Hi all,

I'm installing openstack ocata version, in this step:
https://docs.openstack.org/ocata/install-guide-ubuntu/keysto
ne-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 OSUSERNAME=gateway
export OS
PASSWORD=gateway
export OSPROJECTNAME=gateway
export OSUSERDOMAINNAME=Default
export OS
PROJECTDOMAINNAME=Default
export OSAUTHURL=http://controller:35357/v3
export OSIDENTITYAPI_VERSION=3

detail error is as bellow, does that mean my env is wrong? Thank you!

gateway@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@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(accesskey='', accesssecret='',
access_token='
', accesstokenendpoint='', accesstokentype='',
authtype='', authurl='http://controller:35357/v3', cacert=None,
cert='', clientid='', clientsecret='', cloud='', code='',
consumerkey='', consumersecret='
', debug=True,
defaultdomain='default', defaultdomainid='', defaultdomainname='',
deferred
help=False, discoveryendpoint='', domainid='', domainname='',
endpoint='', identity
provider='', identityproviderurl='', insecure=None,
interface='', key='', logfile=None, oldprofile=None, openidscope='',
os
betacommand=False, oscomputeapiversion='',
osidentityapiversion='3', osimageapiversion='',
osnetworkapiversion='', osobjectapiversion='', osprojectid=None,
osprojectname=None, osvolumeapiversion='', passcode='',
password='***', profile=None, project
domainid='',
project
domainname='Default', projectid='', projectname='gateway',
protocol='', redirect
uri='', regionname='', timing=False, token='***',
trust
id='', url='', userdomainid='', userdomainname='Default',
userid='', username='gateway', verboselevel=3, verify=None)
Auth plugin password selected
authconfighook(): {'authtype': 'password', 'betacommand': False,
u'computeapiversion': u'2', 'key': None, u'databaseapiversion': u'1.0',
'cacert': None, 'authurl': 'http://controller:35357/v3',
u'network
apiversion': u'2', u'message': u'', u'imageformat': u'qcow2',
'networks': [], u'imageapiversion': u'2', 'verify': True,
u'dnsapiversion': u'2', u'objectstoreapiversion': u'1', 'username':
'gateway', u'container
infraapiversion': u'1', 'verboselevel': 3,
'region
name': '', 'apitimeout': None, u'baremetalapiversion': u'1',
'auth': {'user
domainname': 'Default', 'projectname': 'gateway',
'projectdomainname': 'Default'}, 'defaultdomain': 'default',
u'container
apiversion': u'1', u'imageapiusetasks': False,
u'floatingipsource': u'neutron', u'orchestrationapiversion': u'1',
'timing': False, 'password': '', u'applicationcatalogapiversion':
u'1', u'key
managerapiversion': u'v1', u'meteringapiversion': u'2',
'deferredhelp': False, u'identityapiversion': '3',
u'volume
apiversion': u'2', 'cert': None, u'secgroupsource': u'neutron',
u'status': u'active', 'debug': True, u'interface': None,
u'disablevendoragent': {}}
defaults: {u'authtype': 'password', u'status': u'active',
u'compute
apiversion': u'2', 'key': None, u'databaseapiversion': u'1.0',
'api
timeout': None, u'baremetalapiversion': u'1', u'imageapiversion':
u'2', u'containerinfraapiversion': u'1', u'meteringapiversion':
u'2', u'image
apiusetasks': False, u'floatingipsource': u'neutron',
u'orchestrationapiversion': u'1', 'cacert': None, u'networkapiversion':
u'2', u'message': u'', u'imageformat': u'qcow2',
u'application
catalogapiversion': u'1', u'keymanagerapiversion':
u'v1', 'verify': True, u'identity
apiversion': u'2.0',
u'volume
apiversion': u'2', 'cert': None, u'secgroupsource': u'neutron',
u'containerapiversion': u'1', u'dnsapiversion': u'2',
u'objectstoreapiversion': u'1', u'interface': None,
u'disable
vendoragent': {}}
cloud cfg: {'auth
type': 'password', 'betacommand': False,
u'compute
apiversion': u'2', 'key': None, u'databaseapiversion': u'1.0',
'cacert': None, 'auth
url': 'http://controller:35357/v3',
u'networkapiversion': u'2', u'message': u'', u'imageformat': u'qcow2',
'networks': [], u'image
apiversion': u'2', 'verify': True,
u'dns
apiversion': u'2', u'objectstoreapiversion': u'1', 'username':
'gateway', u'containerinfraapiversion': u'1', 'verboselevel': 3,
'regionname': '', 'apitimeout': None, u'baremetalapiversion': u'1',
'auth': {'userdomainname': 'Default', 'projectname': 'gateway',
'project
domainname': 'Default'}, 'defaultdomain': 'default',
u'containerapiversion': u'1', u'imageapiusetasks': False,
u'floating
ipsource': u'neutron', u'orchestrationapi_version': u'1',
'timing': False, 'password': '
', u'applicationcatalogapiversion':
u'1', u'key
managerapiversion': u'v1', u'meteringapiversion': u'2',
'deferredhelp': False, u'identityapiversion': '3',
u'volume
apiversion': u'2', 'cert': None, u'secgroupsource': u'neutron',
u'status': u'active', 'debug': True, u'interface': None,
u'disablevendoragent': {}}
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
objectstore API version 1, cmd group openstack.objectstore.v1
neutronclient API version 2, cmd group openstack.neutronclient.v2
Auth plugin password selected
authconfighook(): {'authtype': 'password', 'betacommand': False,
u'computeapiversion': u'2', 'key': None, u'databaseapiversion': u'1.0',
'cacert': None, 'authurl': 'http://controller:35357/v3',
u'network
apiversion': u'2', u'message': u'', u'imageformat': u'qcow2',
'networks': [], u'imageapiversion': u'2', 'verify': True,
u'dnsapiversion': u'2', u'objectstoreapiversion': u'1', 'username':
'gateway', u'container
infraapiversion': u'1', 'verboselevel': 3,
'region
name': '', 'apitimeout': None, u'baremetalapiversion': u'1',
'auth': {'user
domainname': 'Default', 'projectname': 'gateway',
'projectdomainname': 'Default'}, 'defaultdomain': 'default',
u'container
apiversion': u'1', u'imageapiusetasks': False,
u'floatingipsource': u'neutron', u'orchestrationapiversion': u'1',
'timing': False, 'password': '', u'applicationcatalogapiversion':
u'1', u'key
managerapiversion': u'v1', u'meteringapiversion': u'2',
'deferredhelp': False, u'identityapiversion': '3',
u'volume
apiversion': u'2', 'cert': None, u'secgroupsource': u'neutron',
u'status': u'active', 'debug': True, u'interface': None,
u'disablevendoragent': {}}
Auth plugin password selected
authconfighook(): {'authtype': 'password', 'betacommand': False,
u'computeapiversion': u'2', 'key': None, u'databaseapiversion': u'1.0',
'cacert': None, 'authurl': 'http://controller:35357/v3',
u'network
apiversion': u'2', u'message': u'', u'imageformat': u'qcow2',
'networks': [], u'imageapiversion': u'2', 'verify': True,
u'dnsapiversion': u'2', u'objectstoreapiversion': u'1', 'username':
'gateway', u'container
infraapiversion': u'1', 'verboselevel': 3,
'region
name': '', 'apitimeout': None, u'baremetalapiversion': u'1',
'auth': {'user
domainname': 'Default', 'projectname': 'gateway',
'projectdomainname': 'Default'}, 'defaultdomain': 'default',
u'container
apiversion': u'1', u'imageapiusetasks': False,
u'floatingipsource': u'neutron', u'orchestrationapiversion': u'1',
'timing': False, 'password': '
', u'applicationcatalogapiversion':
u'1', u'key
managerapiversion': u'v1', u'meteringapiversion': u'2',
'deferredhelp': False, u'identityapiversion': '3',
u'volume
apiversion': u'2', 'cert': None, u'secgroupsource': u'neutron',
u'status': u'active', 'debug': True, u'interface': None,
u'disablevendoragent': {}}
command: project create -> openstackclient.identity.v3.pr
oject.CreateProject
Auth plugin password selected
authconfighook(): {'authtype': 'password', 'betacommand': False,
u'computeapiversion': u'2', 'key': None, u'databaseapiversion': u'1.0',
'cacert': None, 'authurl': 'http://controller:35357/v3',
u'network
apiversion': u'2', u'message': u'', u'imageformat': u'qcow2',
'networks': [], u'imageapiversion': u'2', 'verify': True,
u'dnsapiversion': u'2', u'objectstoreapiversion': u'1', 'username':
'gateway', u'container
infraapiversion': u'1', 'verboselevel': 3,
'region
name': '', 'apitimeout': None, u'baremetalapiversion': u'1',
'auth': {'user
domainname': 'Default', 'projectname': 'gateway',
'projectdomainname': 'Default'}, 'defaultdomain': 'default',
u'container
apiversion': u'1', u'imageapiusetasks': False,
u'floatingipsource': u'neutron', u'orchestrationapiversion': u'1',
'timing': False, 'password': '', u'applicationcatalogapiversion':
u'1', u'key
managerapiversion': u'v1', u'meteringapiversion': u'2',
'deferredhelp': False, u'identityapiversion': '3',
u'volume
apiversion': u'2', 'cert': None, u'secgroupsource': u'neutron',
u'status': u'active', 'debug': True, u'interface': None,
u'disablevendoragent': {}}
Using auth plugin: password
Using parameters {'username': 'gateway', 'projectname': 'gateway',
'user
domainname': 'Default', 'authurl': 'http://controller:35357/v3',
'password': '
', 'projectdomainname': '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
runsubcommand
self.prepare
toruncommand(cmd)
File "/usr/lib/python2.7/dist-packages/openstackclient/shell.py",
line 198, in preparetoruncommand
return super(OpenStackShell, self).prepare
toruncommand(cmd)
File "/usr/lib/python2.7/dist-packages/osclib/shell.py", line 457,
in prepare
toruncommand
self.clientmanager.authref
File "/usr/lib/python2.7/dist-packages/osclib/clientmanager.py",
line 215, in auth
ref
self.authref = self.auth.getauthref(self.session)
File "/usr/lib/python2.7/dist-packages/keystoneauth1/identity/generic/base.py",
line 198, in getauthref
return self.plugin.getauth_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@lists.openstack.org
Unsubscribe : http://lists.openstack.org/cgi
-bin/mailman/listinfo/openstack


Mailing list: http://lists.openstack.org/cgi
-bin/mailman/listinfo/openstack
Post to : openstack@lists.openstack.org
Unsubscribe : http://lists.openstack.org/cgi
-bin/mailman/listinfo/openstack


Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to : openstack@lists.openstack.org
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
responded Mar 13, 2017 by yewgang (980 points)   3
...