[OpenStack Glance]: Failed to contact the endpoint at https://localhost:9292 for discovery.

Updated on November 22, 2022

After the successful installation of OpenStack Glance, connecting to the Glance API (on port 9292) fails with an error message “failed to contact the endpoint at https://controller.tg.com:9292 for discovery. Fallback to using that endpoint as the base url“. Below is the complete error message:

Failed to contact the endpoint at https://controller.tg.com:9292 for discovery. Fallback to using that endpoint as the base url. 
Failed to contact the endpoint at https://controller.tg.com:9292 for discovery. Fallback to using that endpoint as the base url. 
The image service for : exists but does not have any supported versions.
# net-state -ntlp
tcp        0      0 0.0.0.0:9292          0.0.0.0:*               LISTEN      292411/python3

Solution: The problem is that glance is configured to listen on all interfaces and is not only bound to the loopback interface.

Make the glance-api service listen on the loopback interface (127.0.0.1). Expressly, bind_host must be appropriately set.

Step 1: Open the file /etc/glance/glance-api.conf

# vim /etc/glance/glance-api.conf

Step 2: Search for the below line

bind_host = 0.0.0.0

Step 3: Replace with

bind_host = 127.0.0.1

Step 4: Restart the glance service

# systemctl restart openstack-glance-api

Step 5: Now the service should listen on the loopback IP as below:

# net-state -ntlp
tcp        0      0 127.0.0.1:9292          0.0.0.0:*               LISTEN      292411/python3

Was this article helpful?

Related Articles

Leave a Comment