<class 'pysolr.SolrError'>
Python 2.7.12: /usr/bin/python
Thu Jul 29 10:30:18 2021

A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

 /usr/local/lib/python2.7/dist-packages/flup/server/fcgi_base.py in run(self=<flup.server.fcgi_base.Request object>)
    556         """Runs the handler, flushes the streams, and ends the request."""
    557         try:
=>  558             protocolStatus, appStatus = self.server.handler(self)
    559         except:
    560             traceback.print_exc(file=self.stderr)
protocolStatus undefined, appStatus undefined, self = <flup.server.fcgi_base.Request object>, self.server = <flup.server.fcgi.WSGIServer object>, self.server.handler = <bound method WSGIServer.handler of <flup.server.fcgi.WSGIServer object>>
 /usr/local/lib/python2.7/dist-packages/flup/server/fcgi_base.py in handler(self=<flup.server.fcgi.WSGIServer object>, req=<flup.server.fcgi_base.Request object>)
   1116         try:
   1117             try:
=> 1118                 result = self.application(environ, start_response)
   1119                 try:
   1120                     for data in result:
result = None, self = <flup.server.fcgi.WSGIServer object>, self.application = <__main__.ScriptNameStripper object>, environ = {'CONTENT_LENGTH': '0', 'CONTEXT_DOCUMENT_ROOT': '/var/www/gei/webui/app/gei/index.fcgi', 'CONTEXT_PREFIX': '/search', 'DOCUMENT_ROOT': '/var/www/gei/wp', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTPS': 'on', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'br,gzip', 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.5', 'HTTP_CONNECTION': 'close', ...}, start_response = <function start_response>
 /var/www/gei/webui/app/gei/index.fcgi in __call__(self=<__main__.ScriptNameStripper object>, environ={'CONTENT_LENGTH': '0', 'CONTEXT_DOCUMENT_ROOT': '/var/www/gei/webui/app/gei/index.fcgi', 'CONTEXT_PREFIX': '/search', 'DOCUMENT_ROOT': '/var/www/gei/wp', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTPS': 'on', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'br,gzip', 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.5', 'HTTP_CONNECTION': 'close', ...}, start_response=<function start_response>)
     18    def __call__(self, environ, start_response):
     19       environ['SCRIPT_NAME'] = '/search'
=>   20       return self.app(environ, start_response)
     21 
     22 app = ScriptNameStripper(gei)
self = <__main__.ScriptNameStripper object>, self.app = <Flask 'app'>, environ = {'CONTENT_LENGTH': '0', 'CONTEXT_DOCUMENT_ROOT': '/var/www/gei/webui/app/gei/index.fcgi', 'CONTEXT_PREFIX': '/search', 'DOCUMENT_ROOT': '/var/www/gei/wp', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTPS': 'on', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'br,gzip', 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.5', 'HTTP_CONNECTION': 'close', ...}, start_response = <function start_response>
 /usr/lib/python2.7/dist-packages/flask/app.py in __call__(self=<Flask 'app'>, environ={'CONTENT_LENGTH': '0', 'CONTEXT_DOCUMENT_ROOT': '/var/www/gei/webui/app/gei/index.fcgi', 'CONTEXT_PREFIX': '/search', 'DOCUMENT_ROOT': '/var/www/gei/wp', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTPS': 'on', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'br,gzip', 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.5', 'HTTP_CONNECTION': 'close', ...}, start_response=<function start_response>)
   1834     def __call__(self, environ, start_response):
   1835         """Shortcut for :attr:`wsgi_app`."""
=> 1836         return self.wsgi_app(environ, start_response)
   1837 
   1838     def __repr__(self):
self = <Flask 'app'>, self.wsgi_app = <bound method Flask.wsgi_app of <Flask 'app'>>, environ = {'CONTENT_LENGTH': '0', 'CONTEXT_DOCUMENT_ROOT': '/var/www/gei/webui/app/gei/index.fcgi', 'CONTEXT_PREFIX': '/search', 'DOCUMENT_ROOT': '/var/www/gei/wp', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTPS': 'on', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'br,gzip', 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.5', 'HTTP_CONNECTION': 'close', ...}, start_response = <function start_response>
 /usr/lib/python2.7/dist-packages/flask/app.py in wsgi_app(self=<Flask 'app'>, environ={'CONTENT_LENGTH': '0', 'CONTEXT_DOCUMENT_ROOT': '/var/www/gei/webui/app/gei/index.fcgi', 'CONTEXT_PREFIX': '/search', 'DOCUMENT_ROOT': '/var/www/gei/wp', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTPS': 'on', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'br,gzip', 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.5', 'HTTP_CONNECTION': 'close', ...}, start_response=<function start_response>)
   1818             except Exception as e:
   1819                 error = e
=> 1820                 response = self.make_response(self.handle_exception(e))
   1821             return response(environ, start_response)
   1822         finally:
response undefined, self = <Flask 'app'>, self.make_response = <bound method Flask.make_response of <Flask 'app'>>, self.handle_exception = <bound method Flask.handle_exception of <Flask 'app'>>, e = SolrError(u"Failed to connect to server at 'http...connection: [Errno 111] Connection refused',))",)
 /usr/lib/python2.7/dist-packages/flask/app.py in handle_exception(self=<Flask 'app'>, e=SolrError(u"Failed to connect to server at 'http...connection: [Errno 111] Connection refused',))",))
   1401             # otherwise, we just raise the error again
   1402             if exc_value is e:
=> 1403                 reraise(exc_type, exc_value, tb)
   1404             else:
   1405                 raise e
global reraise = <function reraise>, exc_type = <class 'pysolr.SolrError'>, exc_value = SolrError(u"Failed to connect to server at 'http...connection: [Errno 111] Connection refused',))",), tb = <traceback object>
 /usr/lib/python2.7/dist-packages/flask/app.py in wsgi_app(self=<Flask 'app'>, environ={'CONTENT_LENGTH': '0', 'CONTEXT_DOCUMENT_ROOT': '/var/www/gei/webui/app/gei/index.fcgi', 'CONTEXT_PREFIX': '/search', 'DOCUMENT_ROOT': '/var/www/gei/wp', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTPS': 'on', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'br,gzip', 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.5', 'HTTP_CONNECTION': 'close', ...}, start_response=<function start_response>)
   1815         try:
   1816             try:
=> 1817                 response = self.full_dispatch_request()
   1818             except Exception as e:
   1819                 error = e
response undefined, self = <Flask 'app'>, self.full_dispatch_request = <bound method Flask.full_dispatch_request of <Flask 'app'>>
 /usr/lib/python2.7/dist-packages/flask/app.py in full_dispatch_request(self=<Flask 'app'>)
   1475                 rv = self.dispatch_request()
   1476         except Exception as e:
=> 1477             rv = self.handle_user_exception(e)
   1478         response = self.make_response(rv)
   1479         response = self.process_response(response)
rv = None, self = <Flask 'app'>, self.handle_user_exception = <bound method Flask.handle_user_exception of <Flask 'app'>>, e = SolrError(u"Failed to connect to server at 'http...connection: [Errno 111] Connection refused',))",)
 /usr/lib/python2.7/dist-packages/flask/app.py in handle_user_exception(self=<Flask 'app'>, e=SolrError(u"Failed to connect to server at 'http...connection: [Errno 111] Connection refused',))",))
   1379                 return handler(e)
   1380 
=> 1381         reraise(exc_type, exc_value, tb)
   1382 
   1383     def handle_exception(self, e):
global reraise = <function reraise>, exc_type = <class 'pysolr.SolrError'>, exc_value = SolrError(u"Failed to connect to server at 'http...connection: [Errno 111] Connection refused',))",), tb = <traceback object>
 /usr/lib/python2.7/dist-packages/flask/app.py in full_dispatch_request(self=<Flask 'app'>)
   1473             rv = self.preprocess_request()
   1474             if rv is None:
=> 1475                 rv = self.dispatch_request()
   1476         except Exception as e:
   1477             rv = self.handle_user_exception(e)
rv = None, self = <Flask 'app'>, self.dispatch_request = <bound method Flask.dispatch_request of <Flask 'app'>>
 /usr/lib/python2.7/dist-packages/flask/app.py in dispatch_request(self=<Flask 'app'>)
   1459             return self.make_default_options_response()
   1460         # otherwise dispatch to the handler for that endpoint
=> 1461         return self.view_functions[rule.endpoint](**req.view_args)
   1462 
   1463     def full_dispatch_request(self):
self = <Flask 'app'>, self.view_functions = {'document': <function document>, 'index': <function index>, 'indexItems': <function indexItems>, 'inscriptions': <function inscriptions>, 'static': <bound method Flask.send_static_file of <Flask 'app'>>, 'terms': <function terms>}, rule = <Rule '/document/<docid>' (HEAD, POST, OPTIONS, GET) -> document>, rule.endpoint = 'document', req = <Request 'https://gei.sns.it/search/document/GEI019' [GET]>, req.view_args = {'docid': u'GEI019'}
 /var/www/gei/webui/app/gei/app.py in document(docid=u'GEI019')
    290     # check if document exists
    291     solr = Solr()
=>  292     if solr.search("id:%s" % docid, **{'rows': '0'}).hits == 0:
    293         abort(404)
    294     
solr = <solr_interface.Solr object>, solr.search = <bound method Solr.search of <solr_interface.Solr object>>, docid = u'GEI019', ).hits undefined
 /usr/local/lib/python2.7/dist-packages/pysolr.py in search(self=<solr_interface.Solr object>, q=u'id:GEI019', search_handler=None, **kwargs={'rows': '0'})
    708         params = {'q': q}
    709         params.update(kwargs)
=>  710         response = self._select(params, handler=search_handler)
    711         decoded = self.decoder.decode(response)
    712 
response undefined, self = <solr_interface.Solr object>, self._select = <bound method Solr._select of <solr_interface.Solr object>>, params = {u'q': u'id:GEI019', 'rows': '0', u'wt': u'json'}, handler undefined, search_handler = None
 /usr/local/lib/python2.7/dist-packages/pysolr.py in _select(self=<solr_interface.Solr object>, params={u'q': u'id:GEI019', 'rows': '0', u'wt': u'json'}, handler='/select')
    409             # Typical case.
    410             path = '%s/?%s' % (handler, params_encoded)
=>  411             return self._send_request('get', path)
    412         else:
    413             # Handles very long queries by submitting as a POST.
self = <solr_interface.Solr object>, self._send_request = <bound method Solr._send_request of <solr_interface.Solr object>>, path = u'/select/?q=id%3AGEI019&rows=0&wt=json'
 /usr/local/lib/python2.7/dist-packages/pysolr.py in _send_request(self=<solr_interface.Solr object>, method=u'get', path=u'/select/?q=id%3AGEI019&rows=0&wt=json', body=None, headers={}, files=None)
    368             params = (url, err)
    369             self.log.error(error_message, *params, exc_info=True)
=>  370             raise SolrError(error_message % params)
    371         except HTTPException as err:
    372             error_message = "Unhandled error: %s %s: %s"
global SolrError = <class 'pysolr.SolrError'>, error_message = u"Failed to connect to server at '%s', are you sur... correct? Checking it in a browser might help: %s", params = (u'http://localhost:8080/solr/gei/select/?q=id%3AGEI019&rows=0&wt=json', ConnectionError(MaxRetryError("HTTPConnectionPoo...nnection: [Errno 111] Connection refused',))",),))

<class 'pysolr.SolrError'>: Failed to connect to server at 'http://localhost:8080/solr/gei/select/?q=id%3AGEI019&rows=0&wt=json', are you sure that URL is correct? Checking it in a browser might help: HTTPConnectionPool(host='localhost', port=8080): Max retries exceeded with url: /solr/gei/select/?q=id%3AGEI019&rows=0&wt=json (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7fe02b8b8fd0>: Failed to establish a new connection: [Errno 111] Connection refused',))
      args = (u"Failed to connect to server at 'http://localhost...ew connection: [Errno 111] Connection refused',))",)
      message = u"Failed to connect to server at 'http://localhost...ew connection: [Errno 111] Connection refused',))"