Datastore fails on first query

See http://lists.okfn.org/pipermail/ckan-dev/2013-May/004936.html

```
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1] Error - <class 'sqlalchemy.exc.ProgrammingError'>: (ProgrammingError) permission denied for schema public
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]  'CREATE TYPE "nested" AS (json text, extra text)' {}
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1] URL: http://ckan.projects.cavi.dk/api/3/action/datastore_search?resource_id=_table_metadata
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1] File '/usr/lib/ckan/default/lib/python2.7/site-packages/weberror/errormiddleware.py', line 162 in __call__
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   app_iter = self.application(environ, sr_checker)
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1] File '/usr/lib/ckan/default/lib/python2.7/site-packages/webob/dec.py', line 147 in __call__
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   resp = self.call_func(req, *args, **self.kwargs)
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1] File '/usr/lib/ckan/default/lib/python2.7/site-packages/webob/dec.py', line 208 in call_func
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   return self.func(req, *args, **kwargs)
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1] File '/usr/lib/ckan/default/lib/python2.7/site-packages/fanstatic/publisher.py', line 234 in __call__
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   return request.get_response(self.app)
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1] File '/usr/lib/ckan/default/lib/python2.7/site-packages/webob/request.py', line 1053 in get_response
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   application, catch_exc_info=False)
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1] File '/usr/lib/ckan/default/lib/python2.7/site-packages/webob/request.py', line 1022 in call_application
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   app_iter = application(self.environ, start_response)
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1] File '/usr/lib/ckan/default/lib/python2.7/site-packages/webob/dec.py', line 147 in __call__
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   resp = self.call_func(req, *args, **self.kwargs)
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1] File '/usr/lib/ckan/default/lib/python2.7/site-packages/webob/dec.py', line 208 in call_func
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   return self.func(req, *args, **kwargs)
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1] File '/usr/lib/ckan/default/lib/python2.7/site-packages/fanstatic/injector.py', line 54 in __call__
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   response = request.get_response(self.app)
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1] File '/usr/lib/ckan/default/lib/python2.7/site-packages/webob/request.py', line 1053 in get_response
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   application, catch_exc_info=False)
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1] File '/usr/lib/ckan/default/lib/python2.7/site-packages/webob/request.py', line 1022 in call_application
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   app_iter = application(self.environ, start_response)
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1] File '/usr/lib/ckan/default/lib/python2.7/site-packages/beaker/middleware.py', line 73 in __call__
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   return self.app(environ, start_response)
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1] File '/usr/lib/ckan/default/lib/python2.7/site-packages/beaker/middleware.py', line 155 in __call__
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   return self.wrap_app(environ, session_start_response)
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1] File '/usr/lib/ckan/default/lib/python2.7/site-packages/routes/middleware.py', line 131 in __call__
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   response = self.app(environ, start_response)
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1] File '/usr/lib/ckan/default/lib/python2.7/site-packages/pylons/wsgiapp.py', line 125 in __call__
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   response = self.dispatch(controller, environ, start_response)
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1] File '/usr/lib/ckan/default/lib/python2.7/site-packages/pylons/wsgiapp.py', line 324 in dispatch
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   return controller(environ, start_response)
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1] File '/usr/lib/ckan/default/src/ckan/ckan/controllers/api.py', line 70 in __call__
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   return base.BaseController.__call__(self, environ, start_response)
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1] File '/usr/lib/ckan/default/src/ckan/ckan/lib/base.py', line 289 in __call__
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   res = WSGIController.__call__(self, environ, start_response)
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1] File '/usr/lib/ckan/default/lib/python2.7/site-packages/pylons/controllers/core.py', line 221 in __call__
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   response = self._dispatch_call()
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1] File '/usr/lib/ckan/default/lib/python2.7/site-packages/pylons/controllers/core.py', line 172 in _dispatch_call
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   response = self._inspect_call(func)
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1] File '/usr/lib/ckan/default/lib/python2.7/site-packages/pylons/controllers/core.py', line 107 in _inspect_call
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   result = self._perform_call(func, args)
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1] File '/usr/lib/ckan/default/lib/python2.7/site-packages/pylons/controllers/core.py', line 60 in _perform_call
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   return func(**args)
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1] File '/usr/lib/ckan/default/src/ckan/ckan/controllers/api.py', line 184 in action
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   result = function(context, request_data)
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1] File '/usr/lib/ckan/default/src/ckan/ckan/logic/__init__.py', line 324 in wrapped
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   return _action(context, data_dict, **kw)
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1] File '/usr/lib/ckan/default/src/ckan/ckan/logic/__init__.py', line 380 in wrapper
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   return action(context, data_dict)
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1] File '/usr/lib/ckan/default/src/ckan/ckanext/datastore/logic/action.py', line 241 in datastore_search
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   result = db.search(context, data_dict)
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1] File '/usr/lib/ckan/default/src/ckan/ckanext/datastore/db.py', line 1074 in search
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   _cache_types(context)
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1] File '/usr/lib/ckan/default/src/ckan/ckanext/datastore/db.py', line 140 in _cache_types
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   .format('json' if native_json else 'text'))
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1] File '/usr/lib/ckan/default/lib/python2.7/site-packages/sqlalchemy/engine/base.py', line 1449 in execute
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   params)
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1] File '/usr/lib/ckan/default/lib/python2.7/site-packages/sqlalchemy/engine/base.py', line 1628 in _execute_text
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   statement, parameters
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1] File '/usr/lib/ckan/default/lib/python2.7/site-packages/sqlalchemy/engine/base.py', line 1698 in _execute_context
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   context)
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1] File '/usr/lib/ckan/default/lib/python2.7/site-packages/sqlalchemy/engine/base.py', line 1691 in _execute_context
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   context)
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1] File '/usr/lib/ckan/default/lib/python2.7/site-packages/sqlalchemy/engine/default.py', line 331 in do_execute
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   cursor.execute(statement, parameters)
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1] ProgrammingError: (ProgrammingError) permission denied for schema public
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]  'CREATE TYPE "nested" AS (json text, extra text)' {}
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1] CGI Variables
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1] -------------
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   AUTH_TYPE: 'cookie'
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   CKAN_CURRENT_URL: '/api/3/action/datastore_search?resource_id=_table_metadata'
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   CKAN_LANG: 'en'
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   CKAN_LANG_IS_DEFAULT: True
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   CONTENT_TYPE: '; charset=utf-8'
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   DOCUMENT_ROOT: '/etc/apache2/htdocs'
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   GATEWAY_INTERFACE: 'CGI/1.1'
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   HTTP_ACCEPT: 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   HTTP_ACCEPT_CHARSET: 'ISO-8859-1,utf-8;q=0.7,*;q=0.3'
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   HTTP_ACCEPT_ENCODING: 'gzip,deflate,sdch'
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   HTTP_ACCEPT_LANGUAGE: 'en,da;q=0.8,en-US;q=0.6'
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   HTTP_CONNECTION: 'close'
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   HTTP_COOKIE: '__utma=190510265.51330831.1368452543.1368452543.1368452543.1; __utmz=190510265.1368452543.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); auth_tkt="70e0470fa83d9cb7f761d1e0cb60ec5d51938888henrik!userid_type:unicode"; auth_tkt="70e0470fa83d9cb7f761d1e0cb60ec5d51938888henrik!userid_type:unicode"'
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   HTTP_HOST: 'ckan.projects.cavi.dk'
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   HTTP_USER_AGENT: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.65 Safari/537.31'
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   HTTP_X_FORWARDED_FOR: '10.11.100.18'
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   HTTP_X_FORWARDED_HOST: 'ckan.projects.cavi.dk'
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   HTTP_X_FORWARDED_SERVER: 'ckan.projects.cavi.dk'
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   PATH_INFO: '/api/3/action/datastore_search'
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   PATH_TRANSLATED: '/etc/ckan/default/apache.wsgi/api/3/action/datastore_search'
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   QUERY_STRING: 'resource_id=_table_metadata'
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   REMOTE_ADDR: '127.0.0.1'
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   REMOTE_PORT: '55720'
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   REMOTE_USER: u'henrik'
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   REMOTE_USER_DATA: 'userid_type:unicode'
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   REMOTE_USER_TOKENS: ['']
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   REQUEST_METHOD: 'GET'
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   REQUEST_URI: '/api/3/action/datastore_search?resource_id=_table_metadata'
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   SCRIPT_FILENAME: '/etc/ckan/default/apache.wsgi'
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   SERVER_ADDR: '127.0.0.1'
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   SERVER_ADMIN: '[no address given]'
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   SERVER_NAME: 'ckan.projects.cavi.dk'
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   SERVER_PORT: '80'
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   SERVER_PROTOCOL: 'HTTP/1.0'
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   SERVER_SIGNATURE: '<address>Apache/2.2.22 (Ubuntu) Server at ckan.projects.cavi.dk Port 80</address>\\n'
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   SERVER_SOFTWARE: 'Apache/2.2.22 (Ubuntu)'
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1] WSGI Variables
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1] --------------
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   application: <fanstatic.publisher.Delegator object at 0x7fa3f31ce290>
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   beaker.cache: <beaker.cache.CacheManager object at 0x7fa3f31cadd0>
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   beaker.get_session: <bound method SessionMiddleware._get_session of <beaker.middleware.SessionMiddleware object at 0x7fa3f31cafd0>>
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   beaker.session: {'_accessed_time': 1368778044.441008, '_creation_time': 1368778044.441008}
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   fanstatic.needed: <fanstatic.core.NeededResources object at 0x7fa3dc20fa50>
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   mod_wsgi.application_group: 'ckan.projects.cavi.dk|'
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   mod_wsgi.callable_object: 'application'
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   mod_wsgi.handler_script: ''
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   mod_wsgi.input_chunked: '0'
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   mod_wsgi.listener_host: ''
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   mod_wsgi.listener_port: '8080'
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   mod_wsgi.process_group: 'ckan_default'
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   mod_wsgi.request_handler: 'wsgi-script'
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   mod_wsgi.script_reloading: '1'
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   mod_wsgi.version: (3, 3)
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   paste.cookies: (<SimpleCookie: __utma='190510265.51330831.1368452543.1368452543.1368452543.1' __utmz='190510265.1368452543.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)' auth_tkt='70e0470fa83d9cb7f761d1e0cb60ec5d51938888henrik!userid_type:unicode'>, '__utma=190510265.51330831.1368452543.1368452543.1368452543.1; __utmz=190510265.1368452543.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); auth_tkt="70e0470fa83d9cb7f761d1e0cb60ec5d51938888henrik!userid_type:unicode"; auth_tkt="70e0470fa83d9cb7f761d1e0cb60ec5d51938888henrik!userid_type:unicode"')
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   paste.parsed_dict_querystring: (MultiDict([('resource_id', '_table_metadata')]), 'resource_id=_table_metadata')
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   paste.parsed_querystring: ([('resource_id', '_table_metadata')], 'resource_id=_table_metadata')
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   paste.registry: <paste.registry.Registry object at 0x7fa3dc20ff50>
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   paste.throw_errors: True
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   pylons.action_method: <bound method ApiController.action of <ckan.controllers.api.ApiController object at 0x7fa3e476a2d0>>
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   pylons.controller: <ckan.controllers.api.ApiController object at 0x7fa3e476a2d0>
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   pylons.environ_config: {'session': 'beaker.session', 'cache': 'beaker.cache'}
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   pylons.pylons: <pylons.util.PylonsContext object at 0x7fa3e476a210>
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   pylons.routes_dict: {'action': u'action', 'controller': u'api', 'ver': 3, 'logic_function': u'datastore_search'}
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   pylons.status_code_redirect: True
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   repoze.who.identity: <repoze.who identity (hidden, dict-like) at 140341816344400>
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   repoze.who.logger: <logging.Logger object at 0x7fa3f31c4850>
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   repoze.who.plugins: {'openid': <OpenIdIdentificationPlugin 140342135114832>, 'friendlyform': <FriendlyFormPlugin 140342135136912>, 'ckan.lib.authenticator:UsernamePasswordAuthenticator': <ckan.lib.authenticator.UsernamePasswordAuthenticator object at 0x7fa3f3116790>, 'auth_tkt': <AuthTktCookiePlugin 140342135137424>, 'ckan.lib.authenticator:OpenIDAuthenticator': <ckan.lib.authenticator.OpenIDAuthenticator object at 0x7fa3f3116710>}
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   routes.route: <routes.route.Route object at 0x7fa3f2ac8ed0>
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   routes.url: <routes.util.URLGenerator object at 0x7fa3e476a1d0>
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   webob._parsed_query_vars: (GET([('resource_id', '_table_metadata')]), 'resource_id=_table_metadata')
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   webob.adhoc_attrs: {'response': <Response at 0x7fa3e476a090 200 OK>, 'language': 'en-us'}
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   wsgi process: 'Multi process AND threads (?)'
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   wsgi.file_wrapper: <built-in method file_wrapper of mod_wsgi.Adapter object at 0x7fa3dc4fd210>
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   wsgi.version: (1, 1)
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   wsgiorg.routing_args: (<routes.util.URLGenerator object at 0x7fa3e476a1d0>, {'action': u'action', 'controller': u'api', 'ver': 3, 'logic_function': u'datastore_search'})
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1] ------------------------------------------------------------
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]             <p>Additionally an error occurred while sending the &lt;weberror.reporter.EmailReporter object at 0x7fa3e00cb5d0&gt; report:
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]             <pre>Traceback (most recent call last):
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   File "/usr/lib/ckan/default/lib/python2.7/site-packages/weberror/errormiddleware.py", line 450, in send_report
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]     rep.report(exc_data)
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   File "/usr/lib/ckan/default/lib/python2.7/site-packages/weberror/reporter.py", line 45, in report
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]     server = smtplib.SMTP(self.smtp_server)
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   File "/usr/lib/python2.7/smtplib.py", line 249, in __init__
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]     (code, msg) = self.connect(host, port)
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   File "/usr/lib/python2.7/smtplib.py", line 309, in connect
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]     self.sock = self._get_socket(host, port, self.timeout)
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   File "/usr/lib/python2.7/smtplib.py", line 284, in _get_socket
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]     return socket.create_connection((port, host), timeout)
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]   File "/usr/lib/python2.7/socket.py", line 571, in create_connection
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]     raise err
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1] error: [Errno 111] Connection refused
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1] </pre>
[Fri May 17 10:07:24 2013] [error] [client 127.0.0.1]             </p>
[Fri May 17 10:07:28 2013] [error] 2013-05-17 10:07:28,569 INFO  [ckan.lib.base]  /api/3/action/datastore_search render time 0.057 seconds
```