[docker] Always get - Specified locale is not available

Use docker slave. When I open web interface I always get error:

Webfrontend error: The specified UMCP command arguments of the request are invalid.

Server error message:

Specified locale is not available

And web interface all time loading and loading … page is empty.
I changed my locale setting as

root@slave1-ucs:/etc# ucr get locale                        
en_US.UTF-8
root@slave1-ucs:/etc# ucr get locale/default
en_US.UTF-8
root@slave1-ucs:/etc# locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=
LANGUAGE=en_IE.UTF-8
LC_CTYPE="en_IE.UTF-8"
LC_NUMERIC="en_IE.UTF-8"
LC_TIME="en_IE.UTF-8"
LC_COLLATE="en_IE.UTF-8"
LC_MONETARY="en_IE.UTF-8"
LC_MESSAGES="en_IE.UTF-8"
LC_PAPER="en_IE.UTF-8"
LC_NAME="en_IE.UTF-8"
LC_ADDRESS="en_IE.UTF-8"
LC_TELEPHONE="en_IE.UTF-8"
LC_MEASUREMENT="en_IE.UTF-8"
LC_IDENTIFICATION="en_IE.UTF-8"
LC_ALL=en_IE.UTF-8

In my logs is messages:

==> /var/log/univention/management-console-server.log <==
25.01.19 11:58:26.040  MAIN        ( PROCESS ) : Connection timed out.
25.01.19 11:58:29.495  MAIN        ( PROCESS ) : Connection timed out.

==> /var/log/univention/management-console-module-setup.log <==
25.01.19 11:58:40.793  MAIN        ( WARN    ) : Locale 'en_US.UTF-8' is not available: unsupported locale setting
25.01.19 11:58:40.794  MAIN        ( WARN    ) : Could not set language. Resetting locale.
25.01.19 11:58:40.794  MODULE      ( PROCESS ) : Specified locale is not available

==> /var/log/univention/management-console-server.log <==
25.01.19 11:58:40.790  LOCALE      ( WARN    ) : Could not find translation file: 'umc-core.mo'
25.01.19 11:58:40.790  LOCALE      ( WARN    ) : Could not find translation file: 'umc-core.mo'
25.01.19 11:58:40.793  LOCALE      ( WARN    ) : Could not find translation file: 'umc-core.mo'
25.01.19 11:58:40.794  LOCALE      ( WARN    ) : Could not find translation file: 'umc-core.mo'

==> /var/log/univention/management-console-web-server.log <==
25.01.19 11:58:40.840  MAIN        ( PROCESS ) : CPCommand (172.17.0.1:49174) response status code: 406
25.01.19 11:58:40.840  MAIN        ( PROCESS ) : CPCommand (172.17.0.1:49174) response message: Specified locale is not available
25.01.19 11:58:40.840  MAIN        ( PROCESS ) : CPCommand (172.17.0.1:49174) response result: None
25.01.19 11:58:40.841  MAIN        ( PROCESS ) : CPCommand (172.17.0.1:49174) response error: {'traceback': None, 'command': 'load'}
25.01.19 11:58:52.372  MAIN        ( ERROR   ) : Could not get groups for u'root': Traceback (most recent call last):
  File "/usr/sbin/univention-management-console-web-server", line 380, in get_user_groups
    user_dn = lo.searchDn(ldap.filter.filter_format('(&(uid=%s)(objectClass=person))', (self.username,)))[0]
IndexError: list index out of range

Hey,

you can tell UCS to generate locales for en_IE.UTF-8, too, by setting the UCR variable locale (or via the management console’s “system settings” module):

ucr set "locale=$(ucr get locale) en_IE.UTF-8:UTF-8"

BTW: locale=en_US.UTF-8 looks wrong; it must be a space-separated list of locale:characterset pairs, e.g. en_US.UTF-8:UTF-8 or with your additional Irish one, en_US.UTF-8:UTF-8 en_IE.UTF-8:UTF-8.

m.

Hi! I’m sorry for my long response.
I set UCS locale:

root@slave1:/# ucr get locale 
de_DE.UTF-8:UTF-8 en_US.UTF-8:UTF-8 en_US.UTF-8:UTF-8

but it doesn’t help me. I got the same error and I can’t load web interface ucs.

Hey,

alright. Please run the command locale-gen and post its output.

m.

container doesn’t have

local-gen

root@slave1:/etc/univention/templates/files/etc/default# local-gen
bash: local-gen: command not found

It’s called locale-gen, with an e.

Hi! I’m sorry for my inattention. But command is absent.

bash: locale-gen: command not found
root@slave1:/# local
local      locale     localectl  localedef
root@slave1:/# locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=
LANGUAGE=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=en_US.UTF-8

the problem is actual

Maybe anybody can help me?

To be honest, you seem to be having quite a lot of problems running your DC Slave inside a Docker container. Running regular UCS machines inside Docker is not something that’s widely used outside of apps in the App Center. I’m therefore not surprised at all that you’re running into all kinds of trouble.

Of course we could try to get to the bottom of this, install a couple of packages that might be missing, but the fact that you don’t have locale-gen installed is bizarre. It belongs to a package a hell lot of other packages depend on; it really should be installed.

My advice is to reinstall your DC Slave inside a proper virtual or physical machine, using the official UCS installation ISO. That’s what everyone else does, that’s what’s tested the best, that’s what we can support.

If you really insist on continuing with your current setup, try running /usr/sbin/locale-gen in your Docker container. Maybe /usr/sbin is just not part of your PATH environment variable there. Also make sure the locales package is installed (see dpkg -l locales) and install it if it isn’t.

Hi!
apt install locales
was helped me.

Mastodon