Project

General

Profile

Actions

Bug #5538

open

internal server error (UnicodeDecodeError) during rhodecode-index request

Added by lee loucks about 5 years ago. Updated about 5 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
14.02.2019
Due date:
% Done:

0%

Estimated time:
Sorting:
Commit Number:
Affected Version:

Description

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 [10647] 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.


Files

Actions #1

Updated by lee loucks about 5 years ago

Seems simliar to #4195

Actions #2

Updated by lee loucks about 5 years ago

Same error during a

rhodecode-api --instance-name=community-1 get_repos

call

Actions #3

Updated by lee loucks about 5 years 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

Actions #4

Updated by Marcin Kuzminski [CTO] about 5 years ago

the attachment has 0 bytes, can you post it again?

Also similarly to #4195 can you identify non-ascii characters stored in this repository ?

Actions #5

Updated by lee loucks about 5 years 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.

Actions #7

Updated by Marcin Kuzminski [CTO] about 5 years 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 beaker.session.secret if
rhodecode.encrypted_values.secret = is not set.

Actions #8

Updated by lee loucks about 5 years ago

Thanks Marcin, you can close this ticket.

Actions

Also available in: Atom PDF