PostgreSQL registry backend unable to connect error

Bug #814733 reported by Jay Pipes
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Invalid
Low
Unassigned

Bug Description

Hi,

I've got glance v2011.3-dev installed using swift as baskend, everything works fine if I use the default sqlite database. If I try change to postgres then I get the following error:

root@ares:~# glance details
Failed to show details. Got error:
Internal Server error: Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/eventlet/wsgi.py", line 336, in handle_one_response
    result = self.application(self.environ, start_response)
  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 147, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 208, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/pymodules/python2.6/glance/common/wsgi.py", line 113, in __call__
    response = req.get_response(self.application)
  File "/usr/lib/pymodules/python2.6/webob/request.py", line 1053, in get_response
    application, catch_exc_info=False)
  File "/usr/lib/pymodules/python2.6/webob/request.py", line 1022, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 159, in __call__
    return resp(environ, start_response)
  File "/usr/lib/pymodules/python2.6/routes/middleware.py", line 131, in __call__
    response = self.app(environ, start_response)
  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 159, in __call__
    return resp(environ, start_response)
  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 147, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 208, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/pymodules/python2.6/glance/common/wsgi.py", line 311, in __call__
    request, **action_args)
  File "/usr/lib/pymodules/python2.6/glance/common/wsgi.py", line 328, in dispatch
    return method(*args, **kwargs)
  File "/usr/lib/pymodules/python2.6/glance/api/v1/images.py", line 136, in detail
    images = registry.get_images_detail(self.options, **params)
  File "/usr/lib/pymodules/python2.6/glance/registry/__init__.py", line 42, in get_images_detail
    return c.get_images_detailed(**kwargs)
  File "/usr/lib/pymodules/python2.6/glance/registry/client.py", line 83, in get_images_detailed
    res = self.do_request("GET", "/images/detail", params=params)
  File "/usr/lib/pymodules/python2.6/glance/client.py", line 174, in do_request
    "server. Got error: %s" % e)
ClientConnectionError: Unable to connect to server. Got error: [Errno 111] ECONNREFUSED

Here is a postgres bit in my glance config:

#sql_connection = sqlite:////var/lib/glance/glance.sqlite
sql_connection = postgresql://glance:password@172.16.16.10/glance

Postgres is listening on 172.16.16.10, I'm able to connect via command line to this db from the glance host (it's the same host as the db). And nova uses the same postgres db without any issue.

Any ideas about this one?

Regards,
Marc

Tags: postgresql
Revision history for this message
Justin Shepherd (jshepher) wrote :

Marc,

1. Was a glance db created in postgres
2. Are there any tables in the glance db

If there are not any tables, you might have to run "glance-manage db_sync"

--justin

Jay Pipes (jaypipes)
Changed in glance:
status: New → Incomplete
importance: Undecided → Low
Revision history for this message
Brian Waldon (bcwaldon) wrote :

I didn't have a problem installing postgresql and getting glance-registry to start up, so I would mark this invalid unless the reporter can offer any information. I did find the following bugs while doing this:

https://bugs.launchpad.net/bugs/881757
https://bugs.launchpad.net/bugs/881763

Brian Waldon (bcwaldon)
tags: added: postgres
tags: added: postgresql
removed: postgres
Revision history for this message
Brian Waldon (bcwaldon) wrote :

Closing as we haven't heard back from the reporter in 9 months.

Changed in glance:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.