Hi Jordan, When you moved to the new server, did you copy over the old site directory, or create a new one from scratch? If the latter, then you'll need to make sure the new one's conf/settings_local.py has the same SECRET_KEY value as the old one. This is generally the cause of this problem. What's happening is that the repository credentials are encrypted based off the SECRET_KEY, and if that has changed, you can get some weirdness with the results.
How was the old database exported/imported? The other possible cause is that a marker we put in the password field to indicate it's encrypted may have been stripped or altered somehow. Christian On Thu, Jun 21, 2018 at 3:39 PM Jordan Castillo <[email protected]> wrote: > Hello, > > I am hoping someone may be able to assist with an issue I am having. We > have been running a very old version of Reviewboard (RB 2.5.6.1, Cent 6.5, > Py 2.6, MySQL) and I have begun moving that old instance to a new server > (Cent 7, Py 2.7, RB 3.0.7, MySQL) > > I have managed to install RB 2.5.6.1 on the Cent 7 server, import the old > database, upgrade the server to 3.0.7 and everything seems to be working > except for one thing (and its a pretty big exception...) I can't view > review requests on the server now. Every time that I attempt to, I get a > 500 error. It seems to be related to a unicode decryption failure, but I > can't figure out what is not being stored as UTF-8. I even ran an alter > table convert to character set utf8 on all of the reviewboard tables but > that did not seem to affect anything. > > I am attempting to go from > http://reviewboard.site.com/r/?sort=-time_added,submitter to > http://reviewboard.site.com/r/20617/ > > Here is the debug message from the page when the error occurs: > > UnicodeDecodeError at /r/20607/ > 'utf8' codec can't decode byte 0x88 in position 0: invalid start byte > Request Method: GET > Request URL: http://reviewboard.site.com/r/20617/ > Django Version: 1.6.11 > Exception Type: UnicodeDecodeError > Exception Value: > 'utf8' codec can't decode byte 0x88 in position 0: invalid start byte > Exception Location: /usr/lib64/python2.7/encodings/utf_8.py in decode, > line 16 > Python Executable: /usr/bin/python > Python Version: 2.7.5 > Python Path: > ['/var/www/reviewboard.site.com/conf', > '/usr/lib64/python27.zip', > '/usr/lib64/python2.7', > '/usr/lib64/python2.7/plat-linux2', > '/usr/lib64/python2.7/lib-tk', > '/usr/lib64/python2.7/lib-old', > '/usr/lib64/python2.7/lib-dynload', > '/usr/lib64/python2.7/site-packages', > '/usr/lib/python2.7/site-packages', > '/usr/lib/python2.7/site-packages/Whoosh-2.7.4-py2.7.egg', > '/usr/lib/python2.7/site-packages/recaptcha_client-1.0.6-py2.7.egg', > '/usr/lib/python2.7/site-packages/pytz-2018.4-py2.7.egg', > '/usr/lib/python2.7/site-packages/python_memcached-1.59-py2.7.egg', > '/usr/lib/python2.7/site-packages/python_dateutil-1.5-py2.7.egg', > '/usr/lib/python2.7/site-packages/Pygments-2.2.0-py2.7.egg', > '/usr/lib/python2.7/site-packages/pycrypto-2.6.1-py2.7-linux-x86_64.egg', > '/usr/lib/python2.7/site-packages/paramiko-2.4.1-py2.7.egg', > '/usr/lib/python2.7/site-packages/mimeparse-0.1.3-py2.7.egg', > '/usr/lib/python2.7/site-packages/docutils-0.14-py2.7.egg', > > '/usr/lib/python2.7/site-packages/django_multiselectfield-0.1.8-py2.7.egg', > '/usr/lib/python2.7/site-packages/django_haystack-2.4.1-py2.7.egg', > '/usr/lib/python2.7/site-packages/django_evolution-0.7.8-py2.7.egg', > '/usr/lib/python2.7/site-packages/Django-1.6.11-py2.7.egg', > '/usr/lib/python2.7/site-packages/pyasn1-0.4.3-py2.7.egg', > '/usr/lib/python2.7/site-packages/PyNaCl-1.2.1-py2.7-linux-x86_64.egg', > > '/usr/lib/python2.7/site-packages/cryptography-2.2.2-py2.7-linux-x86_64.egg', > '/usr/lib/python2.7/site-packages/bcrypt-3.1.4-py2.7-linux-x86_64.egg', > '/usr/lib/python2.7/site-packages/publicsuffix-1.1.0-py2.7.egg', > '/usr/lib/python2.7/site-packages/feedparser-5.2.1-py2.7.egg', > '/usr/lib/python2.7/site-packages/pillowfight-0.3-py2.7.egg', > '/usr/lib/python2.7/site-packages/cffi-1.11.5-py2.7-linux-x86_64.egg', > '/usr/lib/python2.7/site-packages/idna-2.7-py2.7.egg', > '/usr/lib/python2.7/site-packages/enum34-1.1.6-py2.7.egg', > '/usr/lib/python2.7/site-packages/asn1crypto-0.24.0-py2.7.egg', > '/usr/lib/python2.7/site-packages/futures-3.2.0-py2.7.egg', > '/usr/lib/python2.7/site-packages/Pillow-5.1.0-py2.7-linux-x86_64.egg', > '/usr/lib/python2.7/site-packages/pycparser-2.18-py2.7.egg', > '/usr/lib/python2.7/site-packages/ReviewBoard-3.0.7-py2.7.egg', > '/usr/lib/python2.7/site-packages/rbintegrations-1.0-py2.7.egg', > '/usr/lib/python2.7/site-packages/pymdown_extensions-3.5-py2.7.egg', > '/usr/lib/python2.7/site-packages/Markdown-2.6.11-py2.7.egg', > '/usr/lib/python2.7/site-packages/django_oauth_toolkit-0.9.0-py2.7.egg', > '/usr/lib/python2.7/site-packages/django_cors_headers-1.1.0-py2.7.egg', > '/usr/lib/python2.7/site-packages/Djblets-1.0.6-py2.7.egg', > '/usr/lib/python2.7/site-packages/asana-0.7.1-py2.7.egg', > '/usr/lib/python2.7/site-packages/PyYAML-3.12-py2.7-linux-x86_64.egg', > '/usr/lib/python2.7/site-packages/oauthlib-1.0.1-py2.7.egg', > '/usr/lib/python2.7/site-packages/django_braces-1.13.0-py2.7.egg', > '/usr/lib/python2.7/site-packages/django_pipeline-1.6.14-py2.7.egg'] > Server time: Thu, 21 Jun 2018 22:25:01 +0000 > Unicode error hint > The string that could not be encoded/decoded was: ���xZ� > > > Here is the traceback: > > *[Review Board] ERROR (EXTERNAL IP): Internal Server Error: /r/20617/* > Traceback (most recent call last): > > File "/usr/lib/python2.7/site-packages/Django-1.6.11-py2.7. > egg/django/core/handlers/base.py", line 112, in get_response > response = wrapped_callback(request, *callback_args, **callback_kwargs) > > File "/usr/lib/python2.7/site-packages/Django-1.6.11-py2.7. > egg/django/views/generic/base.py", line 69, in view > return self.dispatch(request, *args, **kwargs) > > File "/usr/lib/python2.7/site-packages/Djblets-1.0.6-py2.7. > egg/djblets/views/generic/base.py", line 46, in dispatch > request, *args, **kwargs) > > File "/usr/lib/python2.7/site-packages/Django-1.6.11-py2.7. > egg/django/utils/decorators.py", line 29, in _wrapper > return bound_func(*args, **kwargs) > > File "/usr/lib/python2.7/site-packages/ReviewBoard-3.0.7- > py2.7.egg/reviewboard/accounts/decorators.py", line 29, in _check > return login_required(view_func)(*args, **kwargs) > > File "/usr/lib/python2.7/site-packages/Django-1.6.11-py2.7. > egg/django/contrib/auth/decorators.py", line 22, in _wrapped_view > return view_func(request, *args, **kwargs) > > File "/usr/lib/python2.7/site-packages/Django-1.6.11-py2.7. > egg/django/utils/decorators.py", line 25, in bound_func > return func(self, *args2, **kwargs2) > > File "/usr/lib/python2.7/site-packages/ReviewBoard-3.0.7- > py2.7.egg/reviewboard/accounts/mixins.py", line 45, in dispatch > *args, **kwargs) > > File "/usr/lib/python2.7/site-packages/Django-1.6.11-py2.7. > egg/django/utils/decorators.py", line 29, in _wrapper > return bound_func(*args, **kwargs) > > File "/usr/lib/python2.7/site-packages/ReviewBoard-3.0.7- > py2.7.egg/reviewboard/site/decorators.py", line 36, in _check > return view_func(request, local_site=local_site, *args, **kwargs) > > File "/usr/lib/python2.7/site-packages/Django-1.6.11-py2.7. > egg/django/utils/decorators.py", line 25, in bound_func > return func(self, *args2, **kwargs2) > > File "/usr/lib/python2.7/site-packages/ReviewBoard-3.0.7- > py2.7.egg/reviewboard/site/mixins.py", line 53, in dispatch > request, *args, **kwargs) > > File "/usr/lib/python2.7/site-packages/Djblets-1.0.6-py2.7. > egg/djblets/views/generic/base.py", line 91, in dispatch > super(PrePostDispatchViewMixin, self).dispatch(*args, **kwargs) > > File "/usr/lib/python2.7/site-packages/Django-1.6.11-py2.7. > egg/django/utils/decorators.py", line 29, in _wrapper > return bound_func(*args, **kwargs) > > File "/usr/lib/python2.7/site-packages/ReviewBoard-3.0.7- > py2.7.egg/reviewboard/accounts/decorators.py", line 82, in decorated > return view_func(request, *args, **kwargs) > > File "/usr/lib/python2.7/site-packages/Django-1.6.11-py2.7. > egg/django/utils/decorators.py", line 25, in bound_func > return func(self, *args2, **kwargs2) > > File "/usr/lib/python2.7/site-packages/ReviewBoard-3.0.7- > py2.7.egg/reviewboard/accounts/mixins.py", line 102, in dispatch > *args, **kwargs) > > File "/usr/lib/python2.7/site-packages/Djblets-1.0.6-py2.7. > egg/djblets/views/generic/etag.py", line 50, in dispatch > **kwargs) > > File "/usr/lib/python2.7/site-packages/Django-1.6.11-py2.7. > egg/django/views/generic/base.py", line 87, in dispatch > return handler(request, *args, **kwargs) > > File "/usr/lib/python2.7/site-packages/Django-1.6.11-py2.7. > egg/django/views/generic/base.py", line 154, in get > context = self.get_context_data(**kwargs) > > File "/usr/lib/python2.7/site-packages/ReviewBoard-3.0.7- > py2.7.egg/reviewboard/reviews/views.py", line 758, in get_context_data > context.update(make_review_request_context(request, review_request)) > > File "/usr/lib/python2.7/site-packages/ReviewBoard-3.0.7- > py2.7.egg/reviewboard/reviews/context.py", line 105, in > make_review_request_context > upload_diff_form = UploadDiffForm(review_request, request=request) > > File "/usr/lib/python2.7/site-packages/ReviewBoard-3.0.7- > py2.7.egg/reviewboard/reviews/forms.py", line 129, in __init__ > data, *args, **kwargs) > > File "/usr/lib/python2.7/site-packages/ReviewBoard-3.0.7- > py2.7.egg/reviewboard/diffviewer/forms.py", line 41, in __init__ > if self.repository.get_scmtool().diffs_use_absolute_paths: > > File "/usr/lib/python2.7/site-packages/ReviewBoard-3.0.7- > py2.7.egg/reviewboard/scmtools/models.py", line 244, in get_scmtool > return self.scmtool_class(self) > > File "/usr/lib/python2.7/site-packages/ReviewBoard-3.0.7- > py2.7.egg/reviewboard/scmtools/svn/__init__.py", line 69, in __init__ > credentials = repository.get_credentials() > > File "/usr/lib/python2.7/site-packages/ReviewBoard-3.0.7- > py2.7.egg/reviewboard/scmtools/models.py", line 326, in get_credentials > password = self.password > > File "/usr/lib/python2.7/site-packages/ReviewBoard-3.0.7- > py2.7.egg/reviewboard/scmtools/models.py", line 220, in _get_password > password = decrypt_password(password).decode('utf-8') > > File "/usr/lib64/python2.7/encodings/utf_8.py", line 16, in decode > return codecs.utf_8_decode(input, errors, True) > > UnicodeDecodeError: 'utf8' codec can't decode byte 0x88 in position 0: > invalid start byte > > So I can gather that its trying to decrypt the password and its not being > read as a utf8 string, but I'm not sure where repository.get_credentials() > is being sourced from. > > Does anyone have any idea of what I can look into or things I should be > checking to ensure that everything is encoded properly? My /etc/my.cnf > contains > > [client] > default-character-set=utf8 > > [mysqld] > character-set-server=utf8 > > and my /etc/httpd/conf/httpd.conf contains > AddDefaultCharset UTF-8 > > Does anyone know what I can look for to try and see what is encoded > incorrectly? > > Thanks > Jordan > > -- > Supercharge your Review Board with Power Pack: > https://www.reviewboard.org/powerpack/ > Want us to host Review Board for you? Check out RBCommons: > https://rbcommons.com/ > Happy user? Let us know! https://www.reviewboard.org/users/ > --- > You received this message because you are subscribed to the Google Groups > "Review Board Community" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- Christian Hammond President/CEO of Beanbag <https://www.beanbaginc.com/> Makers of Review Board <https://www.reviewboard.org/> -- Supercharge your Review Board with Power Pack: https://www.reviewboard.org/powerpack/ Want us to host Review Board for you? Check out RBCommons: https://rbcommons.com/ Happy user? Let us know! https://www.reviewboard.org/users/ --- You received this message because you are subscribed to the Google Groups "Review Board Community" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
