Bug 40907 - UMC unusable after login until all translation files are loaded
UMC unusable after login until all translation files are loaded
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC (Generic)
UCS 4.1
Other Linux
: P5 minor (vote)
: UCS 4.2
Assigned To: Florian Best
Richard Ulmer
: interim-1
Depends on: 40242 42228 43578
Blocks: 40564
  Show dependency treegraph
 
Reported: 2016-03-16 10:24 CET by Florian Best
Modified: 2017-04-04 18:28 CEST (History)
9 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): External feedback
Max CVSS v3 score:


Attachments
patch (1.16 KB, patch)
2016-03-16 10:24 CET, Florian Best
Details | Diff
Screenshot (130.99 KB, image/png)
2016-03-16 10:25 CET, Florian Best
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2016-03-16 10:24:10 CET
Created attachment 7537 [details]
patch

The change for Bug #40242 introduced a new proxy rule for empty translation files. This proxy rule causes that apache does an internal http request to the external address of the server. We had one customer system with a firewall which caused these request to timeout with  a 503 request after 5 minutes. This causes that UMC doesn't allow to open module for these 5 minutes (currently only in a english session as we don't serve english translation files).

A patch is attached which changes this to use localhost instead.
We should create another Bug entry because UMC is unusable in this case (but I currently cannot imagine a easy solution for this and it doesn't seem to happen often)

+++ This bug was initially created as a clone of Bug #40242 +++

When logging in to the UDM with the language set to English the Apache error.log is spammed with error messages about translation files not being found:

[Mon Dec 14 10:01:06 2015] [error] [client 10.199.92.2] File does not exist: /var/www/univention-management-console/js_$20150912131759$/umc/modules/i18n/en, referer: https://master.mbu-test.intranet/univention-management-console/?lang=en-US

There's one such line for each UDM module the user has access to.

This is, of course, not critical as they're not required for use but it makes debugging of real problems harder if you have to manually filter out harmless messages. Additionally deciding that they're actually harmless requires the administrator to have programming knowledge and to understand how popular translation systems like GNU gettext work.

These files should simply not be requested if the language is set to English ("en").

A similar albeit less annoying (as it only occurs once) message is the following when loading the "ucs-overview" site:

[Mon Dec 14 10:00:48 2015] [error] [client 10.199.92.2] File does not exist: /var/www/ucs-overview/js/ucs/en.json, referer: https://master.mbu-test.intranet/ucs-overview/
Comment 1 Florian Best univentionstaff 2016-03-16 10:25:18 CET
Created attachment 7538 [details]
Screenshot
Comment 2 Christina Scheinig univentionstaff 2016-03-16 12:06:50 CET
Occurred at Ticket#2016022521000229
Comment 3 Alexander Kläser univentionstaff 2016-04-15 16:18:52 CEST
As a solution, we could always ship empty English translation files.
Comment 4 Florian Best univentionstaff 2016-09-07 12:46:26 CEST
This occurred again on UCS company. I found a very easy solution. Currently we use mod_proxy for the request by the [P] flag in the redirection rule. But there is allso pass-through [PT] flag which treats the redirection as internal URI path.

--- /etc/univention/templates/files/etc/apache2/sites-available/univention-management-console.bak       2016-09-07 12:45:22.351069000 +0200
+++ /etc/univention/templates/files/etc/apache2/sites-available/univention-management-console   2016-09-07 12:45:31.727069000 +0200
@@ -52 +52 @@
-RewriteRule .* /univention-management-console/js/umc/modules/i18n/empty.json [P,L,T=application/json]
+RewriteRule .* /univention-management-console/js/umc/modules/i18n/empty.json [PT,L,T=application/json]
Comment 5 Florian Best univentionstaff 2016-09-07 12:50:12 CEST
I fixed this for UCS 4.2.

univention-management-console (9.0.8-1):
r72359 | Bug #40907: don't use mod_proxy for redirection to local files
Comment 6 Florian Best univentionstaff 2017-01-27 16:43:23 CET
This was temporarily broken beecause of r72717 Bug #42228 and should now work again with r76149.
Comment 7 Florian Best univentionstaff 2017-01-27 16:44:16 CET
FYI: I also added a test case:
r76148 | Bug #43348: Add basic apache/UMC tests
Comment 8 Richard Ulmer univentionstaff 2017-02-03 11:59:27 CET
The changes are reasonable and the umc still works as expected when requesting inexistent translation files.

-> Verified
Comment 9 Michel Smidt 2017-02-15 12:33:27 CET
Occured in a customer environment (UCS 4.1-4).
Comment 10 Stefan Gohmann univentionstaff 2017-04-04 18:28:17 CEST
UCS 4.2 has been released:
 https://docs.software-univention.de/release-notes-4.2-0-en.html
 https://docs.software-univention.de/release-notes-4.2-0-de.html

If this error occurs again, please use "Clone This Bug".