Re: [openstack-dev] 回复: [ceilometer] [gnocchi] keystone verification failed.

2018-03-20 Thread Julien Danjou
On Tue, Mar 20 2018, __ mango. wrote:

> I have configured the following
> export OS_PROJECT_DOMAIN_NAME=Default
> export OS_USER_DOMAIN_NAME=Default
> export OS_PROJECT_NAME=admin
> export OS_USERNAME=admin
> exp​ort OS_PASSWORD=admin
> export OS_AUTH_URL=http://controller:35357/v3
> export OS_IDENTITY_API_VERSION=3
> export OS_IMAGE_API_VERSION=2
>
> /etc/gnocchi/gnocchi.conf
> [DEFAULT]
> [api]
> auth_mode = keystone

You said in your mail that you were using basic as auth_mode and your
request here:

>>  # gnocchi status --debug
>> REQ: curl -g -i -X GET http://localhost:8041/v1/status?details=False -H
>> "Authorization: {SHA1}d4daf1cf567f14f32dbc762154b3a281b4ea4c62" -H "Accept:
>> application/json, */*" -H "User-Agent: gnocchi keystoneauth1/3.1.0
>> python-requests/2.18.1 CPython/2.7.12"
>> Starting new HTTP connection (1): localhost
>> http://localhost:8041 "GET /v1/status?details=False HTTP/1.1" 401 114
>> RESP: [401] Content-Type: application/json Content-Length: 114 
>> WWW-Authenticate: Keystone uri='http://controller:5000/v3' Connection: 
>> Keep-Alive 
>> RESP BODY: {"error": {"message": "The request you have made requires 
>> authentication.", "code": 401, "title": "Unauthorized"}}
>> The request you have made requires authentication. (HTTP 401)

Indicates that the client is using basic auth mode. As Gordon already
replied:

  
https://gnocchi.xyz/gnocchiclient/shell.html#openstack-keystone-authentication 
  you're missing OS_AUTH_TYPE

Sigh.

-- 
Julien Danjou
/* Free Software hacker
   https://julien.danjou.info */


signature.asc
Description: PGP signature
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


[openstack-dev] 回复: [ceilometer] [gnocchi] keystone verification failed.

2018-03-20 Thread __ mango.
hi,
I have configured the following
export OS_PROJECT_DOMAIN_NAME=Default
export OS_USER_DOMAIN_NAME=Default
export OS_PROJECT_NAME=admin
export OS_USERNAME=admin
exp​ort OS_PASSWORD=admin
export OS_AUTH_URL=http://controller:35357/v3
export OS_IDENTITY_API_VERSION=3
export OS_IMAGE_API_VERSION=2

/etc/gnocchi/gnocchi.conf
[DEFAULT]
[api]
auth_mode = keystone
[archive_policy]
[cors]
[healthcheck]
[incoming]
[indexer]
url = mysql+pymysql://gnocchi:gnocchi@controller/gnocchi
[keystone_authtoken]
auth_type = password
auth_url = http://controller:5000/v3
project_domain_name = default
user_domain_name = default
project_name = service
username = gnocchi
password = gnocchi
interface = internalURL
region_name = RegionOne
[metricd]
[oslo_middleware]
[oslo_policy]
[statsd]
[storage]
coordination_url = redis://controller:6379
file_basepath = /var/lib/gnocchi
driver = file

PS:
This  standard documents cannot install gnocchi  
(https://docs.openstack.org/ceilometer/pike/install/install-base-ubuntu.html#install-gnocchi),
  what should I do?
I have used the "admin" authentication, and the other components are normal 
except for gnocchi.




-- 原始邮件 --
发件人: "Julien Danjou";
发送时间: 2018年3月20日(星期二) 下午4:54
收件人: "__ mango."<935540...@qq.com>;
抄送: "openstack-dev"; 
主题: Re: [openstack-dev] [ceilometer] [gnocchi] keystone verification failed.



On Tue, Mar 20 2018, __ mango. wrote:

> hi,
>  I have a question about the validation of gnocchi keystone.
>  I run the following command, but it is not successful.(api.auth_mode :basic, 
> basic mode can be 
>  # gnocchi status --debug
> REQ: curl -g -i -X GET http://localhost:8041/v1/status?details=False -H
> "Authorization: {SHA1}d4daf1cf567f14f32dbc762154b3a281b4ea4c62" -H "Accept:
> application/json, */*" -H "User-Agent: gnocchi keystoneauth1/3.1.0
> python-requests/2.18.1 CPython/2.7.12"
> Starting new HTTP connection (1): localhost
> http://localhost:8041 "GET /v1/status?details=False HTTP/1.1" 401 114
> RESP: [401] Content-Type: application/json Content-Length: 114 
> WWW-Authenticate: Keystone uri='http://controller:5000/v3' Connection: 
> Keep-Alive 
> RESP BODY: {"error": {"message": "The request you have made requires 
> authentication.", "code": 401, "title": "Unauthorized"}}
> The request you have made requires authentication. (HTTP 401)

You need to be authed as "admin" to get the status.

-- 
Julien Danjou
/* Free Software hacker
   https://julien.danjou.info */__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev