Ask Your Question

how to Change default ports of endpoints?

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

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 HTTPConnectionPool(host='', 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

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

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

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


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


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 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 This means that instead of ports, symbolic URLs like are increasingly used.

edit flag offensive delete link more


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 -0500 )edit

I added information to the answer.

Bernd Bausch gravatar imageBernd Bausch ( 2018-06-28 05:29:09 -0500 )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 -0500 )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 -0500 )edit

About the separation of endpoints for Keystone:

Bernd Bausch gravatar imageBernd Bausch ( 2018-06-29 07:18:06 -0500 )edit

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

mkhan gravatar image

I have installed image service on a separate node and the endpoints created on the controller node.-----------+---------------------------+ | interface | url | +-----------+---------------------------+ | internal | | | public | | | admin | | 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 curl: (7) Failed connect to; Connection refused [root@pike-test-neutron ~]# curl {"versions": [{"status": "CURRENT", "id": "v2.5", "links": [{"href": "", "rel": "self"}]}, {"status": "SUPPORTED", "id": "v2.4", "links": [{"href": "", "rel": "self"}]}, {"status": "SUPPORTED", "id": "v2.3", "links": [{"href": "", "rel": "self"}]}, {"status": "SUPPORTED"[root@pike-test-neutron ~]#

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

edit flag offensive delete link more


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 -0500 )edit

No process listens on port 9292 on server

curl: (7) Failed connect to; Connection refused

But Glance does run on

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

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


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

Seen: 1,038 times

Last updated: Jul 02 '18