Encounter 500 Internal Server Error after push mercurial repo

Xinyan's Avatar

Xinyan

11 Oct, 2016 12:40 PM

Hi everyone, I'm new to the rhodecode and I've encountered a problem when using CE version. I've installed rhodecode CE version successfully. But when I created a hg repository and pushed my existing code into it, the page showed 500. I've checked the log and see the following:

2016-10-11 19:03:09.270 ERROR [rhodecode.config.middleware] No module named mercurial.encoding
Traceback (most recent call last):
  File "/opt/rhodecode/store/zdz5m20x9vhlp3ibbq14l95mcshhja3l-python2.7-rhodecode-enterprise-ce-4.4.1/lib/python2.7/site-packages/rhodecode/config/middleware.py", line 215, in pylons_app_with_error_handler
    response = pylons_app_as_view(context, request)
  File "/opt/rhodecode/store/incd2pyifnx1i11anwh308gxp16rp957-python2.7-pyramid-1.6.1/lib/python2.7/site-packages/pyramid/wsgi.py", line 37, in decorator
    return request.get_response(wrapped)
  File "/opt/rhodecode/store/vyahzf6lkfz6zgblc2p0cinrlhj9gjmy-python2.7-WebOb-1.3.1/lib/python2.7/site-packages/webob/request.py", line 1320, in send
    application, catch_exc_info=False)
  File "/opt/rhodecode/store/vyahzf6lkfz6zgblc2p0cinrlhj9gjmy-python2.7-WebOb-1.3.1/lib/python2.7/site-packages/webob/request.py", line 1284, in call_application
    app_iter = application(self.environ, start_response)
  File "/opt/rhodecode/store/zdz5m20x9vhlp3ibbq14l95mcshhja3l-python2.7-rhodecode-enterprise-ce-4.4.1/lib/python2.7/site-packages/rhodecode/lib/middleware/vcs.py", line 198, in __call__
    return self.application(environ, start_response)
  File "/opt/rhodecode/store/miwpp0jyk99zbccj6vzwv4axjayp41cs-python2.7-Paste-2.0.2/lib/python2.7/site-packages/paste/registry.py", line 379, in __call__
    app_iter = self.application(environ, start_response)
  File "/opt/rhodecode/store/gygy7yqk2209wm9syz8zkxv66p1h19n7-python2.7-Pylons-1.0.1-patch1/lib/python2.7/site-packages/pylons/wsgiapp.py", line 103, in __call__
    response = self.dispatch(controller, environ, start_response)
  File "/opt/rhodecode/store/gygy7yqk2209wm9syz8zkxv66p1h19n7-python2.7-Pylons-1.0.1-patch1/lib/python2.7/site-packages/pylons/wsgiapp.py", line 313, in dispatch
    return controller(environ, start_response)
  File "/opt/rhodecode/store/zdz5m20x9vhlp3ibbq14l95mcshhja3l-python2.7-rhodecode-enterprise-ce-4.4.1/lib/python2.7/site-packages/rhodecode/lib/base.py", line 500, in __call__
    return WSGIController.__call__(self, environ, start_response)
  File "/opt/rhodecode/store/gygy7yqk2209wm9syz8zkxv66p1h19n7-python2.7-Pylons-1.0.1-patch1/lib/python2.7/site-packages/pylons/controllers/core.py", line 210, in __call__
    response = self._inspect_call(self.__before__)
  File "/opt/rhodecode/store/gygy7yqk2209wm9syz8zkxv66p1h19n7-python2.7-Pylons-1.0.1-patch1/lib/python2.7/site-packages/pylons/controllers/core.py", line 107, in _inspect_call
    result = self._perform_call(func, args)
  File "/opt/rhodecode/store/gygy7yqk2209wm9syz8zkxv66p1h19n7-python2.7-Pylons-1.0.1-patch1/lib/python2.7/site-packages/pylons/controllers/core.py", line 57, in _perform_call
    return func(**args)
  File "/opt/rhodecode/store/zdz5m20x9vhlp3ibbq14l95mcshhja3l-python2.7-rhodecode-enterprise-ce-4.4.1/lib/python2.7/site-packages/rhodecode/controllers/summary.py", line 56, in __before__
    super(SummaryController, self).__before__()
  File "/opt/rhodecode/store/zdz5m20x9vhlp3ibbq14l95mcshhja3l-python2.7-rhodecode-enterprise-ce-4.4.1/lib/python2.7/site-packages/rhodecode/lib/base.py", line 559, in __before__
    pre_load=["author", "date", "message", "parents"])
  File "/opt/rhodecode/store/zdz5m20x9vhlp3ibbq14l95mcshhja3l-python2.7-rhodecode-enterprise-ce-4.4.1/lib/python2.7/site-packages/rhodecode/model/db.py", line 1817, in get_commit
    self.scm_instance(), commit_id, commit_idx, pre_load=pre_load)
  File "/opt/rhodecode/store/zdz5m20x9vhlp3ibbq14l95mcshhja3l-python2.7-rhodecode-enterprise-ce-4.4.1/lib/python2.7/site-packages/rhodecode/lib/utils2.py", line 607, in get_commit_safe
    commit_id=commit_id, commit_idx=commit_idx, pre_load=pre_load)
  File "/opt/rhodecode/store/zdz5m20x9vhlp3ibbq14l95mcshhja3l-python2.7-rhodecode-enterprise-ce-4.4.1/lib/python2.7/site-packages/rhodecode/lib/vcs/backends/hg/repository.py", line 449, in get_commit
    return MercurialCommit(self, raw_id, idx, pre_load=pre_load)
  File "/opt/rhodecode/store/zdz5m20x9vhlp3ibbq14l95mcshhja3l-python2.7-rhodecode-enterprise-ce-4.4.1/lib/python2.7/site-packages/rhodecode/lib/vcs/backends/hg/commit.py", line 61, in __init__
    self._set_bulk_properties(pre_load)
  File "/opt/rhodecode/store/zdz5m20x9vhlp3ibbq14l95mcshhja3l-python2.7-rhodecode-enterprise-ce-4.4.1/lib/python2.7/site-packages/rhodecode/lib/vcs/backends/hg/commit.py", line 74, in _set_bulk_properties
    result = self._remote.bulk_request(self.idx, pre_load)
  File "/opt/rhodecode/store/zdz5m20x9vhlp3ibbq14l95mcshhja3l-python2.7-rhodecode-enterprise-ce-4.4.1/lib/python2.7/site-packages/rhodecode/lib/vcs/exceptions.py", line 175, in wrapper
    return func(*args, **kwargs)
  File "/opt/rhodecode/store/zdz5m20x9vhlp3ibbq14l95mcshhja3l-python2.7-rhodecode-enterprise-ce-4.4.1/lib/python2.7/site-packages/rhodecode/lib/vcs/client.py", line 319, in caller
    return func(*all_args, **kwargs)
  File "/opt/rhodecode/store/ss0apdfdw13jgjplhgxqqxv7pmwxfz5d-python2.7-Pyro4-4.35/lib/python2.7/site-packages/Pyro4/core.py", line 168, in __call__
    return self.__send(self.__name, args, kwargs)
  File "/opt/rhodecode/store/ss0apdfdw13jgjplhgxqqxv7pmwxfz5d-python2.7-Pyro4-4.35/lib/python2.7/site-packages/Pyro4/core.py", line 391, in _pyroInvoke
    data = serializer.deserializeData(msg.data, compressed=msg.flags & message.FLAGS_COMPRESSED)
  File "/opt/rhodecode/store/ss0apdfdw13jgjplhgxqqxv7pmwxfz5d-python2.7-Pyro4-4.35/lib/python2.7/site-packages/Pyro4/util.py", line 162, in deserializeData
    return self.loads(data)
  File "/opt/rhodecode/store/ss0apdfdw13jgjplhgxqqxv7pmwxfz5d-python2.7-Pyro4-4.35/lib/python2.7/site-packages/Pyro4/util.py", line 412, in loads
    return pickle.loads(data)
ImportError: No module named mercurial.encoding

And I've tried the git repository which works great.

Can anyone give me an answer? Thank you very much!

  1. Support Staff 1 Posted by Marcin Kuzminsk... on 11 Oct, 2016 01:01 PM

    Marcin Kuzminski's Avatar

    Hi Xinyan,

    Do you use special encoding, or other special options inside your global .hgrc or per-repository .hg/hgrc ?

    Cheers

  2. 2 Posted by Xinyan on 11 Oct, 2016 01:20 PM

    Xinyan's Avatar

    Hi Marcin,

    Thank you very much for responding.
    I didn't create the global .hgrc and the per-repository .hg/hgrc only contains [paths]. And I've pushed this repository to bitbucket and it seems there is no encoding problem.
    Do I need to create a global .hgrc and declare the encoding?

    Thanks

  3. Support Staff 3 Posted by Marcin Kuzminsk... on 11 Oct, 2016 01:52 PM

    Marcin Kuzminski's Avatar

    Hi did a quick check in our team, and we suspect some really edge case bug. I think switching to http backend could help detect it better. Could you try to do it as here: https://community.rhodecode.com/t/new-high-performance-http-backend/71

    Cheers

  4. 4 Posted by Xinyan on 11 Oct, 2016 02:29 PM

    Xinyan's Avatar

    Hi Marcin,

    I've done the steps as you said and I'm afraid the problem still exists.
    But I've tried to install rhodecode on my another ubuntu server and it works great. Maybe it's an edge case bug as you say. So I'll use that server to work.
    Thank you so much for your help!

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

15 Oct, 2018 12:10 PM
15 Oct, 2018 05:20 AM
10 Oct, 2018 08:11 AM
03 Oct, 2018 01:16 PM
01 Oct, 2018 08:41 AM

 

28 Sep, 2018 10:12 AM
26 Sep, 2018 04:34 AM
21 Sep, 2018 04:40 PM
20 Sep, 2018 07:42 PM
18 Sep, 2018 03:30 PM
11 Sep, 2018 09:12 AM