internal server error (UnicodeDecodeError) during rhodecode-index request
When attempting to request a rhodecode-index an Internal server error is reported. There is no exception logged in the Exceptions Tracker but in the community-1.log
2019-02-20 05:45:37.976  ERROR [rhodecode.api] Unhandled exception occurred on api call: <function get_repos at 0x7fef6f506c08> Traceback (most recent call last): File "/opt/rhodecode/store/vn3vc3y4l7a19yriazpwpmnas8iijqcw-python2.7-rhodecode-enterprise-ce-4.15.1/lib/python2.7/site-packages/rhodecode/api/__init__.py", line 290, in request_view return jsonrpc_response(request, ret_value) File "/opt/rhodecode/store/vn3vc3y4l7a19yriazpwpmnas8iijqcw-python2.7-rhodecode-enterprise-ce-4.15.1/lib/python2.7/site-packages/rhodecode/api/__init__.py", line 114, in jsonrpc_response raw_body = render(DEFAULT_RENDERER, ret_value, request=request) ... File "/opt/rhodecode/store/9xq7fihpsz8cgkwyx6savnarbhsjhqz5-python2.7-simplejson-3.11.1/lib/python2.7/site-packages/simplejson/encoder.py", line 602, in _iterencode_dict yield _encoder(value) UnicodeDecodeError: 'utf8' codec can't decode byte 0xef in position 0: invalid continuation byte
adding a "* = 1" to the EXCLUDE section of the search_mapping.ini and only including one repo in the INCLUDE section but the same behavior.
#3 Updated by lee loucks 11 months ago
using a shell script iterating through rhodecode-api get_repo repoid:xyz calls I identified a repo that seems to have an issue. Browsing to it via the web interface results in the attached exception being tracked captured in the Exceptions Tracker
#5 Updated by lee loucks 11 months ago
Something was wrong with the data in the RC db. I moved the offending repo out of the repository directory and requested a rescan with destroy old data selected. RC reported that it removed said repo as expected. I moved the formerly offending repo back into the repository directory, rescanned and get_repos and rhodecode-index runs successfully now.
#7 Updated by Marcin Kuzminski [staff] 11 months ago
Based on the exception this error was caused by encryption problem. The clone_url are encrypted using a key stored in rhodecode.ini if that key changes sometimes decrypted data cannot be read properly. This could be caused by migration from old instance for example.
The encryption key used defaults to
rhodecode.encrypted_values.secret = is not set.