[Openstack] Enabling logging in keystone.

Dolph Mathews dolph.mathews at gmail.com
Tue Oct 2 00:50:09 UTC 2012


The X-Auth-Token is what you get back from the authentication call you're
trying to make -- try removing the header completely. If you're still
getting a 401 error back, either your username or password is wrong, your
tenant name is wrong, or you haven't granted "adminUser" any role(s) on
"adminTenant".

-Dolph


On Mon, Oct 1, 2012 at 7:30 PM, Ahmed Al-Mehdi <ahmed at coraid.com> wrote:

> Hi Joe,
>
> Actually, the curl command with the "X_Auth_Token" is my weak attempt to
> try to find a solution.  I am actually issuing the following command (per
> recommendation from the OpenStack document - "Install and Deploy Manual –
> Red Hat Ubuntu"):
>
> root at bodega:~# curl -d '{"auth": {"tenantName": "adminTenant",
> "passwordCredentials": {"username": "adminUser", "password":
> "secretword"}}}' -H "Content-type: application/json" -H "X_Auth_Token:
> ahmedadmintoken" http://10.176.20.158:35357/v2.0/tokens | python
> -mjson.tool
>   % Total    % Received % Xferd  Average Speed   Time    Time     Time
>  Current
>                                  Dload  Upload   Total   Spent    Left
>  Speed
> 100   231    0   116  100   115  12927  12816 --:--:-- --:--:-- --:--:--
> 14500
> {
>     "error": {
>         "code": 401,
>         "message": "The request you have made requires authentication.",
>         "title": "Not Authorized"
>     }
> }
>
> Regards,
> Ahmed.
>
>
> From: heckj <heckj at mac.com>
> Date: Monday, October 1, 2012 5:23 PM
> To: Ahmed Al-Mehdi <ahmed at coraid.com>
> Cc: "openstack at lists.launchpad.net" <openstack at lists.launchpad.net>
> Subject: Re: [Openstack] Enabling logging in keystone.
>
> Ahmed -
>
> The header that's supposed to have the token within it is labelled
> "X-Auth-Token', not "X_Auth_Token".  Unless you're really comfortable with
> the protocol, I'd recommend using the keystone CLI from the
> python-keystoneclient to do your verifying, using it's debugging (which is
> to show you the curl output that you did below).
>
> -joe
>
> On Oct 1, 2012, at 5:12 PM, Ahmed Al-Mehdi <ahmed at coraid.com> wrote:
>
> Hello,
>
> I am trying to verify the installation of keystone.  When I try to run
> some "curl" commands, I get the following error message:
>
> root at bodega:~/ahmed/keystone-init# curl -d '{"auth": {"tenantName":
> "adminTenant", "passwordCredentials": {"username": "adminUser", "password":
> "secretword"}}}' -H "Content-type: application/json" -H "X_Auth_Token:
> ahmedadmintoken" http://10.176.20.158:35357/v2.0/tokens | python
> -mjson.tool
>   % Total    % Received % Xferd  Average Speed   Time    Time     Time
>  Current
>                                  Dload  Upload   Total   Spent    Left
>  Speed
> 100   231    0   116  100   115  15205  15074 --:--:-- --:--:-- --:--:--
> 16571
> {
>     "error": {
>         "code": 401,
>         "message": "The request you have made requires authentication.",
>         "title": "Not Authorized"
>     }
> }
>
>
> I don't see any message in the /var/log/keystone/logging.conf file.   I
> can pass "-debug" option to keystone to enable debugging, but I am not sure
> how to do that from curl.  Following is content of
> /etc/keystone/logging.conf file:
>
> root at bodega:~# cat /etc/keystone/logging.conf
> [loggers]
> keys=root
>
> [formatters]
> keys=normal,normal_with_name,debug
>
> [handlers]
> keys=production,file,devel
>
> [logger_root]
> level=WARNING
> handlers=file
>
> [handler_production]
> class=handlers.SysLogHandler
> level=ERROR
> formatter=normal_with_name
> args=(('localhost', handlers.SYSLOG_UDP_PORT),
> handlers.SysLogHandler.LOG_USER)
>
> [handler_file]
> class=FileHandler
> level=DEBUG
> formatter=normal_with_name
> args=('/var/log/keystone/keystone.log', 'a')
>
> [handler_devel]
> class=StreamHandler
> level=NOTSET
> formatter=debug
> args=(sys.stdout,)
>
> [formatter_normal]
> format=%(asctime)s %(levelname)s %(message)s
>
> [formatter_normal_with_name]
> format=(%(name)s): %(asctime)s %(levelname)s %(message)s
>
> [formatter_debug]
> format=(%(name)s): %(asctime)s %(levelname)s %(module)s %(funcName)s
> %(message)s
> root at bodega:~#
>
> Any help would be greatly appreciated.
>
> Regards,
> Ahmed.
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to     : openstack at lists.launchpad.net
> Unsubscribe : https://launchpad.net/~openstack
> More help   : https://help.launchpad.net/ListHelp
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to     : openstack at lists.launchpad.net
> Unsubscribe : https://launchpad.net/~openstack
> More help   : https://help.launchpad.net/ListHelp
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20121001/ec5908c6/attachment.html>


More information about the Openstack mailing list