Error Communicating With /v1/images
ksedgwick I've been trying to follow this tutorial to set up a test deployment of OpenStack, and I've been having nothing but problems. At least one of them, however, was entirely my doing. In this post (way down at the bottom) I'd talked about a couple of specific errors I was receiving when trying to test Glance: glance image-list Error communicating with /v1/images: [Errno 111] Connection refused and glance image-create --location http://uec-images.ubuntu.com/releases/12.04/release/ubuntu-12.04-server-cloudimg-amd64-disk1.img --is-public true --disk-format qcow2 --container-format bare --name "Ubuntu" Error communicating with /v1/images: [Errno 110] Connection timed out Glance, as a rule, uses REST commands. Since this is an HTTP protocol, this means that the problem has something to do with an incorrectly configured network setting somewhere. Stage 1: Test Glance using REST To make sure Glance itself wasn't the problem, we tested it by using the Links browser to do a direct RESTful API call to the Glance service: links 'http://localhost:9292/v1/images/detail' Which returned: {"images": []} The fact that we got anything back at all meant the API call was successful. Its result indicated that the default image store was empty. Stage 2: Finding the problem This really came down to due diligence. The tutorial provided a script to populate the Keystone database with endpoints. It was written assuming I, the user, was following the networking specifics from the tutorial - like the IP ranges for the different networks. I wasn't. The beginning of the script looks like this: #!/bin/sh # # Keystone Endpoints # # Description: Create Services Endpoints # Mainly inspired by http://www.hastexo.com/resources/docs/installing-openstack-essex-20121-ubuntu-1204-precise-pangolin # Written by Martin Gerhard Loschwitz / Hastexo # Modified by Emilien Macchi / StackOps # # Support: openstack@lists.launchpad.net # License: Apache Software License (ASL) 2.0 # # MySQL definitions MYSQL_USER=keystone MYSQL_DATABASE=keystone MYSQL_HOST=localhost MYSQL_PASSWORD=password # Keystone definitions KEYSTONE_REGION=RegionOne SERVICE_TOKEN=password SERVICE_ENDPOINT="http://localhost:35357/v2.0" # other definitions MASTER="192.168.0.1" Line 28 assigns the IP address of my controller n
refused Solution------------- 1) Goto http://127.0.0.1:9292 and check whether glance service is running 2) cd install_dir/glance mkdir /etc/glance sudo cp etc/glance-api.conf /etc/glance/ sudo cp etc/glance-api-paste.ini /etc/glance/ 3) #glance-control --help ##Start Glance## #glance-control all start #sudo glance-control all status 4) Debug "glance-api" If glance service nor running on http://127.0.0.1:9292. #source .venv/bin/activate #sudo glance-api https://senecacd.wordpress.com/2013/01/07/solution-glance-errors-openstack-folsom-basic-install-ubuntu-linux-test-deployment/ --debug This command will show the error message For Example: No such file or directory: '/var/log/glance/api.log' 5) #sudo mkdir /var/log/glance/ 7) Goto http://127.0.0.1:9292 and check whether glance service is running 8) Goto Horizon and check http://127.0.0.1:8000/admin/images/images/ How to http://fosshelp.blogspot.com/2013/05/glance-error-communicating-with-9292.html debug glance-api---------------------------------------- (.venv)saju@saju-VirtualBox:~/ops_manual/glance$ sudo glance-api --debug Traceback (most recent call last): File "/usr/local/bin/glance-api", line 7, in execfile(__file__) File "/opt/stack/glance/bin/glance-api", line 54, in log.setup('glance') File "/opt/stack/glance/glance/openstack/common/log.py", line 331, in setup _setup_logging_from_conf(product_name) File "/opt/stack/glance/glance/openstack/common/log.py", line 378, in _setup_logging_from_conf filelog = logging.handlers.WatchedFileHandler(logpath) File "/usr/lib/python2.7/logging/handlers.py", line 392, in __init__ logging.FileHandler.__init__(self, filename, mode, encoding, delay) File "/usr/lib/python2.7/logging/__init__.py", line 902, in __init__ StreamHandler.__init__(self, self._open()) File "/usr/lib/python2.7/logging/__init__.py", line 925, in _open stream = open(self.baseFilename, self.mode)IOError: [Errno 2] No such file or directory: '/var/log/glance/api.log'(.venv)saju@saju-VirtualBox:~/ops_manual/glance$ Complete Error Log--------------------------------glanceclient connection created using token "5fbf4fdf68cb0b65a2bc4479354582c0" and url "http://localhost:9292"curl -i -X GET -H 'X-Auth-Token: 5fbf4fdf68cb0b65a2bc4479354582c0' -H 'Content-Type: application/json' -H 'User-Agent: python-glanceclient' http://localhost:9292/v1/images/detail?limit=21ERROR:django.request:Internal Server Error: /admin/images/images/Traceback (most recent call last): File "/home/saju/ops_manual/horizon/.venv/local/lib/pytho
-0500 shobin 11 ●1 ●1 ●2 I've https://ask.openstack.org/en/question/2906/nova-boot-error-connecting-to-a-wrong-glance-host/ got a multi-node setup. From the compute hosts all services seems to be up. root@compute-node1:~# nova-manage service list Binary Host Zone Status State Updated_At nova-compute compute-node1 nova enabled :-) 2013-07-05 16:24:57 nova-conductor compute-node1 internal enabled :-) 2013-07-05 16:24:56 nova-cert api internal enabled :-) 2013-07-05 16:25:02 error communicating nova-consoleauth api internal enabled :-) 2013-07-05 16:25:03 nova-conductor api internal enabled :-) 2013-07-05 16:25:03 nova-scheduler api internal enabled :-) 2013-07-05 16:25:03 I can search for an image on Glance. root@compute-node1:~# glance index ID Name Disk Format Container Format Size 998f0326-9071-4a0c-b876-3aa012f90bd6 Ubuntu-Pricise qcow2 bare 250609664 But when error communicating with trying to launch an instance it gives error. 2013-07-05 17:20:12.862 AUDIT nova.compute.manager [req-4a7fc10e-7115-4e1e-855e-8bd712694686 520342d738734e2cbc52607293bed6ac 395a6cd6a7b04b51b3cbaf2bdfb64230] [instance: 0781b5f4-025e-4c04-8bed-d03b8ed232c8] Starting instance... 2013-07-05 17:20:12.923 ERROR nova.image.glance [req-4a7fc10e-7115-4e1e-855e-8bd712694686 520342d738734e2cbc52607293bed6ac 395a6cd6a7b04b51b3cbaf2bdfb64230] Error contacting glance server '172.17.22.212:9292' for 'get', done trying. 2013-07-05 17:20:12.923 7036 TRACE nova.image.glance Traceback (most recent call last): 2013-07-05 17:20:12.923 7036 TRACE nova.image.glance File "/usr/lib/python2.7/dist-packages/nova/image/glance.py", line 182, in call 2013-07-05 17:20:12.923 7036 TRACE nova.image.glance return getattr(client.images, method)(args, *kwargs) 2013-07-05 17:20:12.923 7036 TRACE nova.image.glance File "/usr/lib/python2.7/dist-packages/glanceclient/v1/images.py", line 104, in get 2013-07-05 17:20:12.923 7036 TRACE nova.image.glance % urllib.quote(image_id)) 2013-07-05 17:20:12.923 7036 TRACE nova.image.glance File "/usr/lib/python2.7/dist-packages/glanceclient/common/http.py", line 260, in raw_request 2013-07-05 17:20:12.923 7036 TRACE nova.image.glance return self._http_request(url, method, *kwargs) 2013-07-05 17:20:12.923 7036 TRACE nova.image.glance File "/usr/lib/python2.7/dist-packages/glanceclient/common/http.py", line 207, in _http_request 2013-07-05 17:20:12.923 7036 TRACE nova.image.glance raise exc.CommunicationError(message=message) 2013-07-05 17:20:12.923 7036 TRACE nova.image.glance CommunicationError: Error communicating with http://172.17.22.212:9292 [Errno 111] ECONNREFUSED 2013-07-05 17:20:12