Glance Registry ECONNREFUSED

Asked by fred yang on 2011-10-18

/etc/glance/*.conf unchanged, used as star configuration
Glance-registry failed to connect though Glance-api can be connected through http - I did
fred@snipy:~$ sudo glance-control all start /etc/glance
Starting glance-api with /etc/glance
Starting glance-registry with /etc/glance
Starting glance-scrubber with /etc/glance
fred@snipy:~$ glance --version
glance 2011.3
fred@snipy:~$ sudo glance show all
Failed to show image. Got error:
Unable to connect to server. Got error: [Errno 111] ECONNREFUSED
From browser, I can connect to 0.0.0.0:9292 but no connection to 0.0.0.0:9191
/var/log/api.log -
2011-10-18 08:52:32 DEBUG [glance-api] verbose True
2011-10-18 08:52:32 DEBUG [glance-api] ********************************************************************************
2011-10-18 08:52:32 DEBUG [routes.middleware] Initialized with method overriding = True, and path info altering = True
2011-10-18 08:52:32 DEBUG [eventlet.wsgi.server] (2386) wsgi starting up on http://0.0.0.0:9292/

/var/log/registry.log shows
2011-10-18 08:53:40 DEBUG [sqlalchemy.engine.base.Engine.0x...7f10] Row (6, u'name', u'VARCHAR(255)', 1, None, 0)
2011-10-18 08:53:40 DEBUG [sqlalchemy.engine.base.Engine.0x...7f10] Row (7, u'value', u'TEXT', 0, None, 0)
2011-10-18 08:53:40 DEBUG [routes.middleware] Initialized with method overriding = True, and path info altering = True
2011-10-18 08:53:40 DEBUG [eventlet.wsgi.server] (2397) wsgi starting up on http://0.0.0.0:9191/

The reason gets CLI is when I do euca-describe-images, api.log shows
2011-10-18 08:15:50,849 ERROR nova.api [5c0a4180-76a2-4c58-9520-6e6a8671ffe5 fred ras] Unexpected error raised: Unable to connect to server. Got error: [Errno 111] ECONNREFUSED
(nova.api): TRACE: Traceback (most recent call last):
(nova.api): TRACE: File "/home/fred/1013/nova/nova/api/ec2/__init__.py", line 348, in __call__
(nova.api): TRACE: result = api_request.invoke(context)
(nova.api): TRACE: File "/home/fred/1013/nova/nova/api/ec2/apirequest.py", line 78, in invoke
(nova.api): TRACE: result = method(context, **args)
(nova.api): TRACE: File "/home/fred/1013/nova/nova/api/ec2/cloud.py", line 1617, in describe_images
(nova.api): TRACE: images = self.image_service.detail(context)
(nova.api): TRACE: File "/home/fred/1013/nova/nova/image/s3.py", line 77, in detail
(nova.api): TRACE: return self.service.detail(context)
(nova.api): TRACE: File "/home/fred/1013/nova/nova/image/glance.py", line 152, in detail
(nova.api): TRACE: for image_meta in image_metas:
(nova.api): TRACE: File "/home/fred/1013/nova/nova/image/glance.py", line 181, in _fetch_images
(nova.api): TRACE: images = fetch_func(**kwargs)
(nova.api): TRACE: File "/usr/local/lib/python2.7/dist-packages/glance-2011.3-py2.7.egg/glance/client.py", line 69, in get_images_detailed

(nova.api): TRACE: res = self.do_request("GET", "/images/detail", params=params)
(nova.api): TRACE: File "/usr/local/lib/python2.7/dist-packages/glance-2011.3-py2.7.egg/glance/common/client.py", line 140, in do_request
(nova.api): TRACE: method, action, body=body, headers=headers, params=params)
(nova.api): TRACE: File "/usr/local/lib/python2.7/dist-packages/glance-2011.3-py2.7.egg/glance/common/client.py", line 238, in _do_request
(nova.api): TRACE: "server. Got error: %s" % e)
(nova.api): TRACE: ClientConnectionError: Unable to connect to server. Got error: [Errno 111] ECONNREFUSED
(nova.api): TRACE:
2011-10-18 08:15:50,852 ERROR nova.api [5c0a4180-76a2-4c58-9520-6e6a8671ffe5 fred ras] Environment: {"HTTP_AUTHORIZATION": "AWS fred:ras:vM4BeD0c19VHV7ffnmX7JHjDCTw=", "CONTENT_TYPE": "text/plain", "SCRIPT_NAME": "/services/Cloud", "HTTP_DATE": "Tue, 18 Oct 2011 15:15:50 GMT", "REQUEST_METHOD": "GET", "HTTP_HOST": "192.168.0.17:8773", "PATH_INFO": "/", "SERVER_PROTOCOL": "HTTP/1.0", "QUERY_STRING": "AWSAccessKeyId=fred%3Aras&Action=DescribeImages&Owner.1=self&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2011-10-18T15%3A15%3A50&Version=2009-11-30&Signature=90udh7uJjvhFVDOc6QVe%2B2VnBcxOr8amzzmN9DhYl1c%3D", "CONTENT_LENGTH": "0", "HTTP_USER_AGENT": "Boto/1.9b (linux2)", "SERVER_NAME": "192.168.0.17", "REMOTE_ADDR": "192.168.0.17", "wsgi.url_scheme": "http", "SERVER_PORT": "8773", "GATEWAY_INTERFACE": "CGI/1.1", "HTTP_ACCEPT_ENCODING": "identity"}
2011-10-18 08:15:50,853 ERROR nova.api [5c0a4180-76a2-4c58-9520-6e6a8671ffe5 fred ras] UnknownError: An unknown error has occurred. Please try your request again.
2011-10-18 08:15:50,853 INFO nova.api [5c0a4180-76a2-4c58-9520-6e6a8671ffe5 fred ras] 0.6667s 192.168.0.17 GET /services/Cloud/ CloudController:DescribeImages 400 [Boto/1.9b (linux2)] text/plain text/xml

ThX

Question information

Language:
English Edit question
Status:
Solved
For:
Glance Edit question
Assignee:
No assignee Edit question
Solved by:
fred yang
Solved:
2011-10-18
Last query:
2011-10-18
Last reply:
2011-10-18
Jay Pipes (jaypipes) said : #1

Two questions: do you have authentication enabled? What does your application pipeline look like in glance-api.conf and glance-registry.conf?

If you do:

curl -v http://0.0.0.0:9191/v1/images

what is the output?

-jay

fred yang (fred-yang) said : #2

Glance is running fine after reboot now -

fred@snipy:~/1018/nova$ curl -v http://0.0.0.0:9191/v1/images
* About to connect() to 0.0.0.0 port 9191 (#0)
* Trying 0.0.0.0... connected
* Connected to 0.0.0.0 (0.0.0.0) port 9191 (#0)
> GET /v1/images HTTP/1.1
> User-Agent: curl/7.21.3 (x86_64-pc-linux-gnu) libcurl/7.21.3 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.18
> Host: 0.0.0.0:9191
> Accept: */*
>
< HTTP/1.1 404 Not Found
< Content-Length: 154
< Content-Type: text/html; charset=UTF-8
< Date: Tue, 18 Oct 2011 22:15:54 GMT
<
<html>

Somehow it is now EC2_URL="http://192.168.0.17:8773/services/Cloud" doesn't work ..

fred@snipy:~/1018/nova$ curl -v http://0.0.0.0:8773/services/Cloud
* About to connect() to 0.0.0.0 port 8773 (#0)
* Trying 0.0.0.0... Connection refused
* couldn't connect to host
* Closing connection #0
curl: (7) couldn't connect to host

fred yang (fred-yang) said : #3

Glance issue resolved
ThX

kingbase (821696029-t) said : #4

It is good mothed ,thanks for -jay