Ask Your Question
0

Horizon not connecting to correct keystone address to retrieve users

asked 2014-09-22 09:17:17 -0500

garcianavalon gravatar image

updated 2014-09-22 10:56:45 -0500

Hi, I have an openstack_dashboard running in local. Everything runs fine when I have also keystone running in local.

The problem comes when I run keystone in another machine. I've changed the setting OPENSTACK_HOST to the address of this machine. I CAN log in perfectly, it connects perfectly to the remote keystone. When I try to access the Users or Projects panels I get an error 'unable to retrieve list' and in the console this output(summed up):

Recoverable error: Unable to establish connection to http://localhost:35357/v2.0/users
Unable to retrieve project list.
Traceback (most recent call last):
  ...
AuthorizationFailure: Authorization Failed: Unable to establish connection to http://localhost:5000/v2.0/tokens
Unable to retrieve project list.

Debuging the panel, I can see that request has the attribute ' REMOTE_ADDR' set to '127.0.0.1' (localhost) when making the call to api.keystone.user_list.

I've checked the remote keystone and doesn't receive any connection when accesing the panel

I've tried this with a fresh install of horizon master and from stable/icehouse both with the same result.

Have I setup everything correctly? Do I have to change anything more? I can't find any more info in the documentation appart from the OPENSTACK_HOST. If everything is fine, why is horizon going to localhost for this call? Why is the request object not being set correctly? Any ideas of how can I fix this?

Thanks in advance for any help, let me know if more info is required.

EDIT:

OPENSTACK_KEYSTONE_URL = "http://%s:5000/v2.0" % OPENSTACK_HOST
OPENSTACK_KEYSTONE_DEFAULT_ROLE = "_member_"

UPDATE: I've tried using the v3 API and I get the same error, only difference is that the url it tries to reach is v3 instead of v2.0

edit retag flag offensive close merge delete

Comments

What is the setting of OPENSTACK_KEYSTONE_URL in your dashboard configuration?

larsks gravatar imagelarsks ( 2014-09-22 10:41:13 -0500 )edit

I edited the question to answer you, @larsks

garcianavalon gravatar imagegarcianavalon ( 2014-09-22 10:44:48 -0500 )edit

3 answers

Sort by ยป oldest newest most voted
0

answered 2014-09-22 11:11:00 -0500

larsks gravatar image

updated 2014-09-23 08:14:42 -0500

One silly question: did you restart your web server after updating the dashboard configuration? And one possibly more useful question: what is the value of the keystone endpoint in the service catalog (keystone service-list and keystone endpoint-list)?

I suspect that the endpoint is still pointing at localhost. The way most openstack services work is:

  1. Contact the specified keystone URL to retrieve a token and the service catalog.
  2. Look up the necessary service endpoints in the service catalog.
  3. Contact the services at the listed endpoint.

The behavior you're seeing is consistent with this process: Horizon is able to obtain the initial token and service catalog, and is then using the erroneous address from the catalog.

edit flag offensive delete link more

Comments

marked as accepted answer because of completeness and better explanation about the problem itself, for future people that find the same issue. Thanks again.

garcianavalon gravatar imagegarcianavalon ( 2014-09-23 08:38:33 -0500 )edit

So how to tell Horzon to look at the right endpoints?

iffyshot gravatar imageiffyshot ( 2016-02-04 09:31:39 -0500 )edit

create an endpoint in keystone pointing to itself and configure Horizon with the Keystone address and that should be fine ;)

garcianavalon gravatar imagegarcianavalon ( 2016-02-05 06:41:59 -0500 )edit
1

answered 2014-09-22 22:09:01 -0500

updated 2016-11-03 15:58:09 -0500

dasp gravatar image

Do keystone endpoint-list from the command line. Most probably you have used localhost as public/internal/admin url when configuring endpoints in the catalog for identity

edit flag offensive delete link more

Comments

its correct, keystone endpoints where configured with localhost. Thanks both @haneef and @larsks

garcianavalon gravatar imagegarcianavalon ( 2014-09-23 05:48:04 -0500 )edit

Wow, that is almost exactly what I said in my comment. I've gone ahead and converted my comment to an answer should you feel inclined to actually accept that one. Cheers...

larsks gravatar imagelarsks ( 2014-09-23 08:15:17 -0500 )edit

@haneef its common issue of using localhost when configuring end points. +1

Syed Awais Ali gravatar imageSyed Awais Ali ( 2014-09-23 09:00:29 -0500 )edit
0

answered 2014-09-23 05:54:14 -0500

garcianavalon gravatar image

updated 2014-10-20 05:35:21 -0500

I'm going to add a little more to Haneef's answer in case someone else ends with the same problem.

As stated, is a keystone problem and not a horizon problem. Then endpoint catalog can get initializated with the script "sample_data.sh" that contains the following lines at the beginning:

CONTROLLER_PUBLIC_ADDRESS=${CONTROLLER_PUBLIC_ADDRESS:-localhost}
CONTROLLER_ADMIN_ADDRESS=${CONTROLLER_ADMIN_ADDRESS:-localhost}
CONTROLLER_INTERNAL_ADDRESS=${CONTROLLER_INTERNAL_ADDRESS:-localhost}

If you blindly follow the Keystone quickstart at http://docs.openstack.org/developer/keystone/developing.html (http://docs.openstack.org/developer/k...) and you don't set this parameters you will end having the same problem :). Set those variables to your machine's address and problem solved!

edit flag offensive delete link more

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

1 follower

Stats

Asked: 2014-09-22 09:17:17 -0500

Seen: 4,361 times

Last updated: Nov 03 '16