Project

General

Profile

Actions

Bug #5297

open

Locale fails on a SuSE system

Added by Oliver Eichler almost 7 years ago. Updated over 5 years ago.

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

0%

Estimated time:
Sorting:
Commit Number:
Affected Version:

Description

The used system is a minimal server with SuSE Leap 42.2 installed. I use RhodeCode-installer-linux-build20170418_2200 to install.

The VCSServer failes to start. See attached server log.

The root cause seems to be a failing "locale.setlocale(locale.LC_ALL, u'')".

On the server I get for locale:

LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

If I use the server's python environment I can do:

import locale
locale.setlocale(locale.LC_ALL, u'')

As a result I get "en_US.UTF-8"

If I use the python environment from RhodeCode by:

rccontrol ishell comunnity-1

The code snippet will fail with the same error message as in the log.

Probably the python environment shipped with RhodeCode is expecting a different locale setup than what's done in SuSE.


Files

vcsserver.log (505 KB) vcsserver.log Oliver Eichler, 28.04.2017 17:24
Actions #1

Updated by Nikolay Yankin about 6 years ago

Same problem for me.

Actions #2

Updated by Marcin Kuzminski [CTO] about 6 years ago

from the ticket https://issues.rhodecode.com/issues/5434#note-13

Setting LOCALE_ARCHIVE=/usr/lib64/locale/locale-archive in .rccontrol/supervisor/supervisord.ini fixes the problem

it's an enviroment= option

Actions #3

Updated by Marcin Kuzminski [CTO] almost 6 years ago

  • Target version changed from v4.7 to v4.13
Actions #4

Updated by Boris Basic over 5 years ago

Same problem after upgrading from Ubuntu 16.10 to 18.04 LTS. I tried setting LOCALE_ARCHIVE and LC_ALL in supervisord.ini but it did not fix the problem.

The only solution in my case was to comment out line 30 in /opt/rhodecode/store/hgp03jrdni84hg60af1pw36swfwq3rm4-python2.7-mercurial-4.4.2/lib/python2. 7/site-packages/mercurial/crecord.py.

Actions #5

Updated by Marcin Kuzminski [CTO] over 5 years ago

Did you restart whole supervisord?

We thought this is fully fixed now

Actions #6

Updated by Boris Basic over 5 years ago

Yes, I also restarted the whole system, same issue each time. The only solution was to disabled the failing command.

Actions #7

Updated by Marcin Kuzminski [CTO] over 5 years ago

Would it be possible to have a remote session with your system so someone from our team can look at this?

Actions #8

Updated by Boris Basic over 5 years ago

Of course, I'll give you access tomorrow if you are available.

Actions #9

Updated by Marcin Kuzminski [CTO] over 5 years ago

That's great we'll poke around, hopefully, we can find some better solution. You can write to support@rhodecode.com with credentials, as those are private tickets that we can only see.

Thanks again!

Actions #10

Updated by Boris Basic over 5 years ago

Thanks, I sent the credentials by mail, you can access the server to look art the issue.

Actions #11

Updated by Marcin Kuzminski [CTO] over 5 years ago

We've identified the problem for now. It looks like since glibc 2.27 the generated locale broke backward compatibility. We've yet not found a solution to this problem, the only thing right now is to potentially either re-generate the locale-archives using older glibc or downgrade glibc to pre 2.27

Actions #12

Updated by Marcin Kuzminski [CTO] over 5 years ago

Another way to fix this:

Fedora 23 / Ubuntu 18.04
------------------------

|RCC| has a know problem with locales, due to changes in glibc 2.27+ which affects
the local-archive format, which is now incompatible with our used glibc 2.26.


To work around this problem, you need set path to ``$LOCAL_ARCHIVE`` to the
locale package in older pre glibc 2.27 format, or set `LC_ALL=C` in your enviroment.

To use the pre 2.27 locale-archive fix follow these steps:

1. Download the pre 2.27 locale-archive package

.. code-block:: bash

    wget https://dls.rhodecode.com/assets/locale-archive


2. Point ``$LOCAL_ARCHIVE`` to the locale package.

.. code-block:: bash

    $ export LOCALE_ARCHIVE=/home/USER/locale-archive  # change to your path
Actions #13

Updated by Daniel D over 5 years ago

  • Status changed from New to In Progress
Actions #14

Updated by Daniel D over 5 years ago

  • Status changed from In Progress to Resolved
Actions

Also available in: Atom PDF