springload / madewithwagtail

A showcase of sites and apps made with Wagtail CMS, the easy to use, open source Django content management system
http://madewithwagtail.org
MIT License
84 stars 21 forks source link

Search errors with a 502 #59

Closed thibaudcolas closed 6 years ago

thibaudcolas commented 7 years ago

See for example http://madewithwagtail.org/search/?q=kek.

loicteixeira commented 7 years ago

I've updated the index manually for now with ./manage.py update_index --settings=... but we will still need to investigate the issue.

FWIW, the error was:

Stack trace ``` Traceback (most recent call last): File "/path-to-venv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/path-to-venv/local/lib/python2.7/site-packages/wagtail/wagtailsearch/views/frontend.py", line 63, in search search_results = paginator.page(page) File "/path-to-venv/local/lib/python2.7/site-packages/django/core/paginator.py", line 50, in page number = self.validate_number(number) File "/path-to-venv/local/lib/python2.7/site-packages/django/core/paginator.py", line 39, in validate_number if number > self.num_pages: File "/path-to-venv/local/lib/python2.7/site-packages/django/core/paginator.py", line 86, in _get_num_pages if self.count == 0 and not self.allow_empty_first_page: File "/path-to-venv/local/lib/python2.7/site-packages/django/core/paginator.py", line 72, in _get_count self._count = self.object_list.count() File "/path-to-venv/local/lib/python2.7/site-packages/wagtail/wagtailsearch/backends/base.py", line 142, in count self._count_cache = self._do_count() File "/path-to-venv/local/lib/python2.7/site-packages/wagtail/wagtailsearch/backends/elasticsearch.py", line 404, in _do_count body=self._get_es_body(for_count=True), File "/path-to-venv/local/lib/python2.7/site-packages/elasticsearch/client/utils.py", line 68, in _wrapped return func(*args, params=params, **kwargs) File "/path-to-venv/local/lib/python2.7/site-packages/elasticsearch/client/__init__.py", line 622, in count params=params, body=body) File "/path-to-venv/local/lib/python2.7/site-packages/elasticsearch/transport.py", line 284, in perform_request status, headers, data = connection.perform_request(method, url, params, body, ignore=ignore, timeout=timeout) File "/path-to-venv/local/lib/python2.7/site-packages/elasticsearch/connection/http_urllib3.py", line 55, in perform_request self._raise_error(response.status, raw_data) File "/path-to-venv/local/lib/python2.7/site-packages/elasticsearch/connection/base.py", line 97, in _raise_error raise HTTP_EXCEPTIONS.get(status_code, TransportError)(status_code, error_message, additional_info) NotFoundError: TransportError(404, u'IndexMissingException[[madewithwagtail] missing]') ```
loicteixeira commented 7 years ago

This hasn't happened recently and the recent Wagtail upgrade updated the search backend configuration. Closing the issue. Please reopen if needed.

loicteixeira commented 6 years ago

This has happened again.