Bug 47602 - UMC Error: Specified locale is not available
UMC Error: Specified locale is not available
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC (Generic)
UCS 4.3
Other Linux
: P5 normal (vote)
: UCS 4.4-0-errata
Assigned To: Florian Best
Johannes Keiser
:
: 48039 48304 48716 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-08-17 11:43 CEST by Jürn Brodersen
Modified: 2019-05-15 14:52 CEST (History)
6 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 6: Setup Problem: Issue for the setup process
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 5: Blocking further progress on the daily work
User Pain: 0.171
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2018101921000892, 2018101321000241, 2019030521000527
Bug group (optional):
Max CVSS v3 score:
best: Patch_Available+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jürn Brodersen univentionstaff 2018-08-17 11:43:58 CEST
In case the language that is chosen for the umc is not installed in /etc/locale.gen the umc server throws this error:
Specified locale is not available

The error is also thrown if the "Accepted Language" Header is set "weird" in my case it was set to just "de" without a region.

I think no error should be raised in that case. The server already has a fallback to the "C" locale. Maybe a diagnose module?

See:
univention-management-console/src/univention/management/console/base.py
Comment 1 Philipp Hahn univentionstaff 2018-08-17 13:02:03 CEST
I experienced the or a similar problem in my last
UCS Technical Training Task #10201

After explicitly switching the language to German in UMC the problem was gone; I used chromium from my notebook to access UMC on a remote server.
Comment 2 Philipp Hahn univentionstaff 2018-11-21 17:25:38 CET
*** Bug 48039 has been marked as a duplicate of this bug. ***
Comment 3 Philipp Hahn univentionstaff 2018-11-21 17:26:17 CET
Again: UCS Technical Training 2018-11-22
Comment 4 Philipp Hahn univentionstaff 2018-11-21 17:29:44 CET
(In reply to Philipp Hahn from comment #3)
> Again: UCS Technical Training 2018-11-22

My browser (Firefox) is configured to use only English ("en-us"), by the UCS system only has "de_DE.UTF.8"

# ucr search --brief locale
locale/default: de_DE.UTF-8:UTF-8
locale: de_DE.UTF-8:UTF-8
Comment 5 Erik Damrose univentionstaff 2018-11-21 17:37:54 CET
univention-system-setup defined default locales that should be applied in any case in umc/python/setup/util.py:
forcedLocales = ['en_US.UTF-8:UTF-8', 'de_DE.UTF-8:UTF-8']

But that is in function auto_complete_values_for_join() which is only called when system-setup is operated via UMC.

In the case of comment1 + 3 a PXE installation was done
Comment 6 Philipp Hahn univentionstaff 2018-11-21 17:52:28 CET
Even worse: If I configure Firefox for only "fr" and surf to the portal, I get an empty page.
After adding "de" or "en" in Firefox I again get the portal page.
According to Jürn there already is a bug for this issue...
Comment 7 Florian Best univentionstaff 2019-02-20 14:30:49 CET
*** Bug 48716 has been marked as a duplicate of this bug. ***
Comment 8 Florian Best univentionstaff 2019-03-10 01:10:20 CET
Patch available in fbest/47602-missing-en-us-locale.
It sets locale to "C" if en-US is wanted but doesn't exists on the system and keeps this for the whole session. And doesn't produce further log messages for the session.

FYI: the Accept-Language header is set by the frontend to the language you select. So if your browser is espanol (which is not available) it picks english.

We could be even more graceful and remove the error completely, so that any request with any locale is allowed. (?!)
Comment 9 Florian Best univentionstaff 2019-03-30 08:46:02 CET
*** Bug 48304 has been marked as a duplicate of this bug. ***
Comment 10 Florian Best univentionstaff 2019-03-30 08:48:31 CET
It prevents also the installation of UCS@school if UCS was set up with US Ireland keyboard (attachment 9772 [details]).
Comment 11 Florian Best univentionstaff 2019-05-09 16:17:38 CEST
univention-management-console.yaml
7cdf6786401c | YAML Bug #47602

univention-management-console (11.0.4-15)
e4f394151a31 | Bug #47602: be graceful about missing english locale
Comment 12 Johannes Keiser univentionstaff 2019-05-09 16:45:10 CEST
OK: no error if default en locale is not installed
OK: yaml (224a33f789 Bug #47602: yaml typo)
-> verified
Comment 13 Arvid Requate univentionstaff 2019-05-15 14:52:14 CEST
<http://errata.software-univention.de/ucs/4.4/104.html>