Ask Your Question
4

Keystone: Unable to establish connection

asked 2014-06-04 13:00:40 -0500

DivideByZero gravatar image

updated 2014-06-04 14:15:21 -0500

So I'm following the OpenStack installation guide for Ubuntu 14.04LTS, and I'm at the point where I should be adding an admin user to keystone. I know that I followed the installation guide to the letter, but this keeps happening:

root@controller:~# export OS_SERVICE_TOKEN=gfsa
root@controller:~# export OS_SERVICE_ENDPOINT=http://controller:35357/v2.0
root@controller:~# keystone user-create --name=admin --pass=gfsa --email=blahblah@blah.com
Unable to establish connection to http://controller:35357/v2.0/users

Now, I'm relatively new to Linux, so if you don't mind simplifying your answers as much as possible/providing full destinations that would be great.

edit retag flag offensive close merge delete

Comments

Unable to establish connection to http://controller:35357/v2.0/users
Has "controller" entry in /etc/hosts ?

dbaxps gravatar imagedbaxps ( 2014-06-04 14:07:15 -0500 )edit

Yeah, the host file is set up, all interfaces are up and running

DivideByZero gravatar imageDivideByZero ( 2014-06-04 14:15:11 -0500 )edit

Hi, i have almost the same problem when i try to login to Murano dashboard i always get this : Unable to establish connection to keystone endpoint.

Unable to establish connection to http://ip-address:5000/v3/tokens

can you help me to solve this ? Thanks in advance

Badis BA gravatar imageBadis BA ( 2016-04-29 03:22:42 -0500 )edit

7 answers

Sort by ยป oldest newest most voted
3

answered 2014-10-05 12:34:00 -0500

I had the same problem. In my case, I am using a script to install openstack and found that putting in a sleep command just after my script's call to sudo service keystone restart and just before creating the user resolved the issue for me. I am guessing that the previous command is non-blocking and will return even before keystone has fully started up.

edit flag offensive delete link more
1

answered 2016-05-13 10:34:14 -0500

nabmen gravatar image

Hi,

I had the same problem, and i found out that the fact that when configuring the keystone I was using persistence in my token driver setting(driver = keystone.token.persistence.backends.sql.Token) instead of (driver = keystone.token.backends.sql.Token) .

there how you can fixe it:

  • in your keystone configuration file : #nano /etc/keystone/keystone.conf

Look for the Token configuration : ctrl+W to have the hand on search engin and type " Token" then put this setting in the Token section :

[token]

.....

provider = keystone.token.providers.uuid.Provider driver = keystone.token.backends.sql.Token

then save the configuration and restart keystone : #service keystone restart

Hope that helps.

edit flag offensive delete link more

Comments

This was exactly the issue for me. I was suspicious when the docs had me change what was already in the config file. +1

trpt4him gravatar imagetrpt4him ( 2016-10-09 09:20:39 -0500 )edit
0

answered 2014-06-04 14:41:18 -0500

dbaxps gravatar image

Try another syntax

keystone user-create --name admin --pass=gfsa --email=blahblah@blah.com
edit flag offensive delete link more

Comments

No, unfortunately that didn't work either. This is all running on the same server, and even http://localhost:35357/v2.0 didn't work

DivideByZero gravatar imageDivideByZero ( 2014-06-05 08:52:13 -0500 )edit
0

answered 2014-07-29 11:45:10 -0500

Robert gravatar image

I have the same problem. I am trying to install Icehouse 2 node installation in I am folowing the manual: http://docs.openstack.org/icehouse/in...

I have the same problem, I cant figure it out, I wouldnt like to reinstall OpenStack I would like to find error. My host name is controler and not controller (with double l).

I have set up in keystone.conf:

admin_token=43beada85170163c97e1
admin_port=35357
rabbit_password=rabbitpass
connection = mysql://keystone:keystonemysqlpass@controler/keystone

In my directory /var/log/keystone is empty. If I run command:

keystone --debug user-create --name=admin --pass=adminpass --email=admin@gmail.com

I get following debug:

DEBUG:keystoneclient.session.REQ: curl -i -X POST http://controler:3557/v2.0/users -H "User-Agent: python-keystoneclient" -H "Content-Type: application/json" -H "X-Auth-Token:43beada85170163c97e1" - d '**"user":** "email":"admin@gmail.com","password":"adminpass", "enabled": true, "name":"admin", "tenandtId:null}}'
INFO: urllib3.connectionpool:Starting new HTTP connection (1): controler
Unable to establish connection to http://controler:35357/v2.0/users
edit flag offensive delete link more

Comments

1

I have found error. Password of mysql is: mysqlpass and not keystonemysqlpass as in my precius connection. After that change password of keystone for access to mysql:

$ mysql -u root -p $mysql> USE DATABASE keystone; $mysql> GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' \ IDENTIFIED BY 'mysqlpass'; $mysql> GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' \ IDENTIFIED BY 'mysqlpass'; $mysql> exit

$keystone-manage db_sync $service keystone restart $export OS_SERVICE_TOKEN=43beada85170163c97e1 $ export OS_SERVICE_ENDPOINT=http://controller:35357/v2.0

$keystone --debug user-create --name=admin --pass=adminpass --email=admin@gmail.com

Robert gravatar imageRobert ( 2014-07-29 12:32:27 -0500 )edit

Before all that I have changed connection in /etc/keystone/keystone.conf to: connection = mysql://keystone:mysqlpass@controler/keystone

Robert gravatar imageRobert ( 2014-07-29 12:34:09 -0500 )edit
0

answered 2015-07-30 21:45:26 -0500

Mohit gravatar image

In My case , i was installing openstack Juno and while creating tenants , i had the same issue -:

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

DEBUG:keystoneclient.session:REQ: curl -i -X POST http://controller:35357/v2.0/tenants -H "User-Agent: python-keystoneclient" -H "Content-Type: application/json" -H "X-Auth-Token: TOKEN_REDACTED" -d '{"tenant": {"enabled": true, "name": "admin", "description": "Admin Tenant"}}' INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): controller Unable to establish connection to http://controller:35357/v2.0/tenants

systemctl restart openstack-keystone.service Job for openstack-keystone.service failed. See "systemctl status openstack-keystone.service" and "journalctl -xe" for details.

systemctl start openstack-keystone.service Job for openstack-keystone.service failed. See "systemctl status openstack-keystone.service" and "journalctl -xe" for details.

journalctl -xe Jul 31 13:36:16 localhost.localdomain keystone-all[7351]: filelog = logging.handlers.WatchedFileHandler(logpath)

Jul 31 13:36:16 localhost.localdomain systemd[1]: openstack-keystone.service: main process exited, code=exited, status=1/FAILURE Jul 31 13:36:16 localhost.localdomain systemd[1]: Failed to start OpenStack Identity Service (code-named Keystone). -- Subject: Unit openstack-keystone.service has failed . . . -- The result is failed. Jul 31 13:36:16 localhost.localdomain systemd[1]: Unit openstack-keystone.service entered failed state. Jul 31 13:36:16 localhost.localdomain systemd[1]: openstack-keystone.service failed. Jul 31 13:36:16 localhost.localdomain keystone-all[7351]: stream = open(self.baseFilename, self.mode) Jul 31 13:36:16 localhost.localdomain keystone-all[7351]: IOError: [Errno 13] ***Permission denied: '/var/log/keystone/keystone.log'* Jul 31 13:36:16 localhost.localdomain python[7361]: detected unhandled Python exception in '/usr/bin/keystone-all'

Keystone.log owner was root , changed it to keystone

[root@localhost keystone]# ls -l total 8 -rw-r--r-- 1 root root 3356 Jul 30 20:04 keystone.log -rw-r--r-- 1 keystone keystone 1139 Jul 31 13:00 keystone-tokenflush.log [root@localhost keystone]# chown keystone.keystone keystone.log [root@localhost keystone]# ls -l total 8 -rw-r--r-- 1 keystone keystone 3356 Jul 30 20:04 keystone.log -rw-r--r-- 1 keystone keystone 1139 Jul 31 13:00 keystone-tokenflush.log [root@localhost keystone]# systemctl start openstack-keystone.service [root@localhost keystone]# keystone --debug tenant-create --name admin --description "Admin Tenant" DEBUG:keystoneclient.session:REQ: curl -i -X POST http://controller:35357/v2.0/tenants -H "User-Agent: python-keystoneclient" -H "Content-Type: application/json" -H "X-Auth-Token: TOKEN_REDACTED" -d '{"tenant": {"enabled": true, "name": "admin", "description": "Admin Tenant"}}' INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): controller DEBUG:requests.packages.urllib3.connectionpool:"POST /v2.0/tenants HTTP/1.1" 200 119 DEBUG:keystoneclient.session:RESP: [200] {'date': 'Fri, 31 Jul 2015 08:07:52 GMT', 'content-type': 'application/json', 'content-length': '119', 'vary': 'X-Auth-Token', 'connection': 'keep-alive'} RESP BODY: {"tenant": {"description": "Admin Tenant", "enabled": true, "id": "9bc91c62f3634c69ba107a0e427d05dc", "name": "admin"}}

+-------------+----------------------------------+ | Property | Value | +-------------+----------------------------------+ | description | Admin Tenant | | enabled | True | | id | 9bc91c62f3634c69ba107a0e427d05dc | | name | admin | +-------------+----------------------------------+

edit flag offensive delete link more
0

answered 2015-04-17 01:36:36 -0500

swati-shukla1 gravatar image

I have followed what you have said Robert, but still getting this error.

edit flag offensive delete link more
0

answered 2014-06-06 07:46:13 -0500

DivideByZero gravatar image

Well, no idea what was wrong, so I just redid the entire VM and now everything works fine... Musta been a config issue I couldn't find. Thanks everyone for the help though :)

edit flag offensive delete link more

Comments

can you plz tell how you resolved the issue i'm stuck help me out of this??

prashanth gravatar imageprashanth ( 2015-02-26 05:04:29 -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

Stats

Asked: 2014-06-04 13:00:40 -0500

Seen: 29,702 times

Last updated: Jul 30 '15