Ask Your Question
1

Unable to create tentant in keystone

asked 2015-07-27 12:25:24 -0500

Vranke gravatar image

updated 2015-07-29 03:05:54 -0500

I am following this instruction http://docs.openstack.org/juno/instal...

and I have made it untill this point where I set the token and endpoint

export OS_SERVICE_TOKEN= <my previously randomly genereted token set in the keystone.conf>
export OS_SERVICE_ENDPOINT=http://controller:35357/v2.0

And when I enter the command:

keystone tenant-create --name admin --description "Admin Tenant"

I get this error:

--description "Admin Tenant" /usr/local/lib/python2.7/dist-packages/keystoneclient/shell.py:64: DeprecationWarning: The keystone CLI is deprecated in favor of python-openstackclient. For a Python library, continue using python-keystoneclient.   'python-keystoneclient.', DeprecationWarning) Unable to establish connection to http://controller:35357/v2.0/tenants

I suspect that this is because I dont have keystone running and listening to port 35357. But when I check service keystone status it says stop/waiting. When I run keystone with start it's status switches its (I am guessing) PID every second untill it stops.

I am a serous linux noob but I am willing to learn and understand what I am doing wrong here.

Edit1 output aftter -debug:

root@devf12-VirtualBox:/home/devf12# service keystone statuskeystone stop/waiting
root@devf12-VirtualBox:/home/devf12# service keystone startkeystone start/running, process 2671
root@devf12-VirtualBox:/home/devf12# keystone --debug tenant-create --name admin --description "Admin Tenant"
/usr/local/lib/python2.7/dist-packages/keystoneclient/shell.py:64: DeprecationWarning: The keystone CLI is deprecated in favor of python-openstackclient. For a Python library, continue using python-keystoneclient.
  'python-keystoneclient.', DeprecationWarning)
Expecting an auth URL via either --os-auth-url or env[OS_AUTH_URL]

Edit2 I am at a total loss here:

root@devf12-VirtualBox:/home/devf12# export OS_AUTH_URL=http://controller:35357/v2.0
root@devf12-VirtualBox:/home/devf12# keystone --debug tenant-create --name admin --description "Admin Tenant"
/usr/local/lib/python2.7/dist-packages/keystoneclient/shell.py:64: DeprecationWarning: The keystone CLI is deprecated in favor of python-openstackclient. For a Python library, continue using python-keystoneclient.
  'python-keystoneclient.', DeprecationWarning)
Expecting authentication method via
  either a service token, --os-token or env[OS_SERVICE_TOKEN], 
  credentials, --os-username or env[OS_USERNAME]

I put the same token in the export and the config file Here is the text version of the keystone.config file: https://www.dropbox.com/s/r7nz96zwgzu...

Edit3 here are the last lines of the log file:

2015-07-28 13:32:08.187 3052 CRITICAL keystone [-] ImportError: No module named persistence.backends.sql
2015-07-28 13:32:08.187 3052 TRACE keystone Traceback (most recent call last):
2015-07-28 13:32:08.187 3052 TRACE keystone   File "/usr/bin/keystone-all", line 137, in <module>
2015-07-28 13:32:08.187 3052 TRACE keystone     service.load_backends()
2015-07-28 13:32:08.187 3052 TRACE keystone   File "/usr/lib/python2.7/dist-packages/keystone/service.py", line 58, in load_backends
2015-07-28 13:32:08.187 3052 TRACE keystone     token_api=token.Manager(),
2015-07-28 13:32:08.187 3052 TRACE keystone   File "/usr/lib/python2.7/dist-packages/keystone/common/dependency.py", line 166, in wrapper
2015-07-28 13:32:08.187 3052 TRACE keystone     self.__wrapped_init__(*args, **kwargs)
2015-07-28 13:32:08.187 3052 TRACE keystone   File "/usr/lib/python2.7/dist-packages/keystone/common/dependency.py ...
(more)
edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
1

answered 2015-07-28 10:16:18 -0500

smaffulli gravatar image

As Eduardo pointed out in the comment, it seems like the package you're using is broken. A quick google search revealed a bug in Ubuntu package, which apparently was fixed and a report from a user, who fixed the issue by updating the packages with a simple apt-get update. Make sure that the packages you're installing are the newest ones.

edit flag offensive delete link more

Comments

Thank you for your input, could you please tell me at which point of this tutorial http://docs.openstack.org/juno/install-guide/install/apt/content/keystone-users.html (http://docs.openstack.org/juno/instal...) should I have done the apt-get update? I am asking this because I have already done it before I started configuring keystone.

Vranke gravatar imageVranke ( 2015-07-28 11:24:07 -0500 )edit

I did the apt-get update, commented out the "driver = keystone.token.persistence.backends.sql.Token",now this is my output: WARNING: Bypassing authentication using a token & endpoint (authentication credentials are being ignored). Unable to establish connection to http://controller:35357/v2.0/tenant

Vranke gravatar imageVranke ( 2015-07-28 11:39:16 -0500 )edit

I have the impression there is something wrong in your Ubuntu packages or the configuration file is from a different keystone version. Did you apt-get upgradetoo? You should not comment out the driver. Also https://ask.openstack.org/en/question...

smaffulli gravatar imagesmaffulli ( 2015-07-28 12:42:02 -0500 )edit

I updated my post, please check edit 4.

Vranke gravatar imageVranke ( 2015-07-29 03:06:38 -0500 )edit
0

answered 2015-07-28 04:25:57 -0500

updated 2015-07-28 05:23:05 -0500

Keystone service can be running under apache, but should be listening on port 35357, try adding --debug on the request and look for any informational error.

keystone --debug tenant-create --name admin --description "Admin Tenant"

Also, check if you can connect to that port with telnet.

Export OS_AUTH_URL instead of OS_SERVICE_ENDPOINT

edit flag offensive delete link more

Comments

I updated the output when I added the --debug parameter. I am using netstat instead of telnet and it doesnt show the port. I keep starting service keystone but it just shuts down after half a minut

Vranke gravatar imageVranke ( 2015-07-28 05:19:11 -0500 )edit

Maybe is a misconfiguration in the config files, check the log /var/log/keystone/keystone.log

Eduardo Gonzalez gravatar imageEduardo Gonzalez ( 2015-07-28 05:27:06 -0500 )edit

Im just not getting this, I am following the steps like explained but there is always something, look at my new edit please.

Vranke gravatar imageVranke ( 2015-07-28 05:45:06 -0500 )edit

Restart keystone service and check logs at /var/log/keystone/keystone.log.

Eduardo Gonzalez gravatar imageEduardo Gonzalez ( 2015-07-28 06:14:37 -0500 )edit

Seems to be a problem with keystone db modules, are you using kilo or juno packages? The guide is for juno but seems that that package or driver option is not recognized by keystone?

Eduardo Gonzalez gravatar imageEduardo Gonzalez ( 2015-07-28 07:29:28 -0500 )edit
0

answered 2015-07-29 06:52:52 -0500

RAHUL1603 gravatar image

Hi Concerned,

First of all in Juno keystone does not run on Apache as per my knowledge. And instead of generating a random number for Admin_token you can also use a remember able key like password. Just to make the troubleshooting easier.

Second thing is check if your service is able to run properly -- Do service keystone restart and then put service keystone status and check that the PID should not change. That means at the backend it should not be like the process is restarting over and over again.

Now if it is running good. Now sometimes if you are running the keystone on localhost and hitting request to it on http://controller, requests are denied. To solve this best is to use your management IP and bind all the API's to this IP instead of localhost or 127.0.0.1.

Two of the errors show auth problem which the solution below should fix, and 2 show package and CLI problem which a purged reinstall should fix.

And mate dont hesitate to do apt-get remove --purge keystone and python-keystoneclient and reinstall it afresh. And then proceed with the troubleshooting.

Regards Rahul1603

edit flag offensive delete link more

Comments

But the PID does change, after I install keystone and configure the the file, the status is constantly on the same PID, but then the guide tells me to restart and as soon as I do that the keystone starts changing the PID untill eventually stopping.

Vranke gravatar imageVranke ( 2015-07-29 09:45:41 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

2 followers

Stats

Asked: 2015-07-27 12:25:24 -0500

Seen: 3,727 times

Last updated: Jul 29 '15