Ask Your Question
0

how to Change default ports of endpoints?

asked 2018-06-27 17:40:40 -0600

mkhan gravatar image

How can I change the default ports of each an every endpoint? I want to change port number of public, admin and internal endpoints. for example; glance endpoints ports are 9292 for admin, internal, and admin. I have created an endpoint alreatty with different port numbers, when I ran glance image-list it's notreturning anything and giving me an error; openstack image list Unable to establish connection to http://10.10.150.101:9999/v2/images: HTTPConnectionPool(host='10.10.150.101', port=9999): Max retries exceeded with url: /v2/images (Caused by NewConnectionError('<requests.packages.urllib3.connection.httpconnection 0x7fb840be4910="" at="" object="">: Failed to establish a new connection: [Errno 111] Connection refused',))</requests.packages.urllib3.connection.httpconnection>

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2018-07-02 13:20:37 -0600

mkhan gravatar image

I have installed image service on a separate node and the endpoints created on the controller node.-----------+---------------------------+ | interface | url | +-----------+---------------------------+ | internal | http://10.10.150.101:9292 | | public | http://10.10.150.102:9292 | | admin | http://10.10.150.101:9292 | curl is refusing from controler node but it curl command is working fine on a host where glance service is running. +-----------+---------------------------+ [root@pike-test-controller ~]# curl http://10.10.150.101:9292 curl: (7) Failed connect to 10.10.150.101:9292; Connection refused [root@pike-test-neutron ~]# curl http://10.10.150.102:9292 {"versions": [{"status": "CURRENT", "id": "v2.5", "links": [{"href": "http://10.10.150.102:9292/v2/", "rel": "self"}]}, {"status": "SUPPORTED", "id": "v2.4", "links": [{"href": "http://10.10.150.102:9292/v2/", "rel": "self"}]}, {"status": "SUPPORTED", "id": "v2.3", "links": [{"href": "http://10.10.150.102:9292/v2/", "rel": "self"}]}, {"status": "SUPPORTED"[root@pike-test-neutron ~]#

t-neutron ~] {"status": "DEPRECATED", "id": "v1.0", "links": [{"href": "http://10.10.150.102

edit flag offensive delete link more

Comments

I am trying to create a separate node for each of the service where public and admin endpoint will be different.

mkhan gravatar imagemkhan ( 2018-07-02 13:22:31 -0600 )edit

No process listens on port 9292 on server 10.10.150.101:

curl http://10.10.150.101:9292 
curl: (7) Failed connect to 10.10.150.101:9292; Connection refused

But Glance does run on 10.10.150.102.

Bernd Bausch gravatar imageBernd Bausch ( 2018-07-02 15:50:15 -0600 )edit
0

answered 2018-06-27 23:31:11 -0600

updated 2018-06-28 21:16:01 -0600

Connection refused means that no process is listening at port 9999. Have you configured Glance to use this port? Is it running at all?

EDIT

Let's use Glance as an example, and assume port 9999. Glance endpoints are configured, for example, in the install guide (step 4); use 9999 instead of 9292.

In the glance-api.conf, set bind_port to 9999.

You also need to configure the Glance endpoint for all the Services that use Glance, such as Nova and Cinder.

That's probably it, except if I forgot something :)

And of course, you will have to do similar things for all those services with non-default ports.

Depending on the tool or method you use to deploy the cloud, there may be shortcuts. Check the documentation if there are easier ways to configure all that.

end of EDIT

EDIT 2

I am not sure if it is possible to separate internal/public/admin endpoints. Keystone used to do that, but it's not recommended anymore AFAIK. Most services don't seem to allow this at all.

Further info in the Security Guide, which says:

Each project may present an inconsistent way of defining target API endpoints. Future releases of OpenStack seek to resolve these inconsistencies through consistent use of the Identity service catalog.

It seems that Nova is already doing this, see https://specs.openstack.org/openstack.... This means that in the future, all you have to do is setting the endpoints in Keystone's service catalog rather than configuration files.

End of EDIT 2

By the way, OpenStack is moving away from using ports, which will help with your problem. Most OpenStack services now support being front-ended by a web server, to which they connect via uwsgi (see spec https://governance.openstack.org/tc/g...). This means that instead of ports, symbolic URLs like http://10.10.150.101/glance are increasingly used.

edit flag offensive delete link more

Comments

Actually, I would like to change port number instead of using default ports. Where and how would changes make and which files?

mkhan gravatar imagemkhan ( 2018-06-28 04:22:46 -0600 )edit

I added information to the answer.

Bernd Bausch gravatar imageBernd Bausch ( 2018-06-28 05:29:09 -0600 )edit

Thank you Baush!!!! One more question how would we bind ports admin, internal, and public ports different than each other. I did bind public port 9999 but I l also have other ports for admin and internal. Public ports after bind working fine. I don't see any error when I call image list and port.

mkhan gravatar imagemkhan ( 2018-06-28 08:29:32 -0600 )edit

I have the suspicion that many services, including Glance, don't allow separation of public/admin/internal endpoints. See updated answer.

Bernd Bausch gravatar imageBernd Bausch ( 2018-06-28 21:12:05 -0600 )edit

About the separation of endpoints for Keystone: https://ask.openstack.org/en/question....

Bernd Bausch gravatar imageBernd Bausch ( 2018-06-29 07:18:06 -0600 )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

1 follower

Stats

Asked: 2018-06-27 17:40:40 -0600

Seen: 151 times

Last updated: Jul 02