Project

General

Profile

Actions

Bug #5457

open

Internal server error on full-text search settings page with Elasticsearch

Added by Joseph Sible almost 6 years ago. Updated almost 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
05.04.2018
Due date:
% Done:

0%

Estimated time:
Sorting:
Commit Number:
Affected Version:

Description

I'm running RhodeCode 4.11.6. In my rhodecode.ini, I have "search.module = rc_elasticsearch". When I go to Admin -> Settings -> Full Text Search, I get an internal server error, and this gets logged to enterprise.log:

2018-04-05 11:24:23.317 ERROR [rhodecode.config.middleware] error occurred handling this request for path: /_admin/settings/search
Traceback (most recent call last):
  File "/opt/rhodecode/store/044m67rkz9sqqc4w8v45i97lxls99qgm-python2.7-pyramid-1.9.1/lib/python2.7/site-packages/pyramid/tweens.py", line 39, in excview_tween
    response = handler(request)
  File "/opt/rhodecode/store/044m67rkz9sqqc4w8v45i97lxls99qgm-python2.7-pyramid-1.9.1/lib/python2.7/site-packages/pyramid/router.py", line 156, in handle_request
    view_name
  File "/opt/rhodecode/store/044m67rkz9sqqc4w8v45i97lxls99qgm-python2.7-pyramid-1.9.1/lib/python2.7/site-packages/pyramid/view.py", line 642, in _call_view
    response = view_callable(context, request)
  File "/opt/rhodecode/store/044m67rkz9sqqc4w8v45i97lxls99qgm-python2.7-pyramid-1.9.1/lib/python2.7/site-packages/pyramid/viewderivers.py", line 390, in attr_view
    return view(context, request)
  File "/opt/rhodecode/store/044m67rkz9sqqc4w8v45i97lxls99qgm-python2.7-pyramid-1.9.1/lib/python2.7/site-packages/pyramid/viewderivers.py", line 368, in predicate_wrapper
    return view(context, request)
  File "/opt/rhodecode/store/044m67rkz9sqqc4w8v45i97lxls99qgm-python2.7-pyramid-1.9.1/lib/python2.7/site-packages/pyramid/viewderivers.py", line 439, in rendered_view
    result = view(context, request)
  File "/opt/rhodecode/store/044m67rkz9sqqc4w8v45i97lxls99qgm-python2.7-pyramid-1.9.1/lib/python2.7/site-packages/pyramid/viewderivers.py", line 138, in _class_view
    response = getattr(inst, attr)()
  File "/opt/rhodecode/store/1j3c2nfq6qhrhqd9nj8scbl01ds0vzmb-python2.7-rhodecode-enterprise-ce-4.11.6/lib/python2.7/site-packages/rhodecode/lib/auth.py", line 2186, in local_wrapper
    return wrapper(func, *args, **kwds)
  File "/opt/rhodecode/store/1j3c2nfq6qhrhqd9nj8scbl01ds0vzmb-python2.7-rhodecode-enterprise-ce-4.11.6/lib/python2.7/site-packages/rhodecode/lib/auth.py", line 1492, in __wrapper
    return func(*fargs, **fkwargs)
  File "/opt/rhodecode/store/1j3c2nfq6qhrhqd9nj8scbl01ds0vzmb-python2.7-rhodecode-enterprise-ce-4.11.6/lib/python2.7/site-packages/rhodecode/lib/auth.py", line 2186, in local_wrapper
    return wrapper(func, *args, **kwds)
  File "/opt/rhodecode/store/1j3c2nfq6qhrhqd9nj8scbl01ds0vzmb-python2.7-rhodecode-enterprise-ce-4.11.6/lib/python2.7/site-packages/rhodecode/lib/auth.py", line 1567, in __wrapper
    return func(*fargs, **fkwargs)
  File "/opt/rhodecode/store/1j3c2nfq6qhrhqd9nj8scbl01ds0vzmb-python2.7-rhodecode-enterprise-ce-4.11.6/lib/python2.7/site-packages/rhodecode/apps/admin/views/settings.py", line 665, in settings_search
    c.statistics = searcher.statistics(self.request.translate)
TypeError: statistics() takes exactly one argument (2 given)

I found what appears to be a workaround: editing settings.py and changing "searcher.statistics(self.request.translate)" to "searcher.statistics()" lets the page load normally. However, I assume that this isn't the real fix, and that the real fix will have to be done in the rc_elasticsearch module, of which I don't have access to the source.

Actions #1

Updated by Marcin Kuzminski [CTO] almost 6 years ago

Hi Joseph,

Thanks for your report. This is infact a bug in the elastic search module, the translator isn't supported there. Your fix is good for now for your instance. We'll fix this on next release as it's a trivial fix.

Actions #2

Updated by Redmine Integration almost 6 years ago

  • Status changed from New to Resolved
Actions

Also available in: Atom PDF