Bug 35066

Summary: UMC-Server: Invalid mo file, magic number is incorrect !
Product: UCS Reporter: Philipp Hahn <hahn>
Component: UMC (Generic)Assignee: Florian Best <best>
Status: CLOSED DUPLICATE QA Contact: Alexander Kramer <kramer>
Severity: normal    
Priority: P5 CC: best, gohmann, klaeser, kramer
Version: UCS 3.2   
Target Milestone: UCS 3.x   
Hardware: Other   
OS: Linux   
See Also: https://forge.univention.org/bugzilla/show_bug.cgi?id=36658
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?: ISV affected?:
Waiting Support: Flags outvoted (downgraded) after PO Review:
Ticket number: Bug group (optional): Error handling
Max CVSS v3 score:

Description Philipp Hahn univentionstaff 2014-06-05 12:11:34 CEST
UMC Server fails to start, if (by accident) a non-GNU-message-catalog is found:

# tail /var/log/univention/management-console-server.log
05.06.14 12:09:36.509  MAIN        ( ERROR   ) : Traceback (most recent call last):
  File "/usr/sbin/univention-management-console-server", line 209, in <module>
    umc_daemon.do_action()
  File "/usr/lib/pymodules/python2.6/daemon/runner.py", line 186, in do_action
    func(self)
  File "/usr/lib/pymodules/python2.6/daemon/runner.py", line 131, in _start
    self.app.run()
  File "/usr/sbin/univention-management-console-server", line 192, in run
    notifier.loop()
  File "/usr/lib/pymodules/python2.6/notifier/nf_generic.py", line 284, in loop
    step()
  File "/usr/lib/pymodules/python2.6/notifier/nf_generic.py", line 271, in step
    not __sockets[ cond ][ fd ]( sock_obj ):
  File "/usr/lib/pymodules/python2.6/univention/management/console/protocol/server.py", line 165, in _receive
    self._handle( state, msg )
  File "/usr/lib/pymodules/python2.6/univention/management/console/protocol/server.py", line 282, in _handle
    state.processor.request( msg )
  File "/usr/lib/pymodules/python2.6/univention/management/console/protocol/session.py", line 267, in request
    self.handle_request_get( msg )
  File "/usr/lib/pymodules/python2.6/univention/management/console/protocol/session.py", line 393, in handle_request_get
    'name' : self.i18n._( flavor.name, translationId ),
  File "/usr/lib/pymodules/python2.6/univention/management/console/locales.py", line 175, in _
    self[ domain ] = I18N( self.locale, domain )
  File "/usr/lib/pymodules/python2.6/univention/management/console/locales.py", line 76, in __init__
    self.load( locale, domain )
  File "/usr/lib/pymodules/python2.6/univention/management/console/locales.py", line 106, in load
    self.mofile = polib.mofile( filename )
  File "/usr/lib/pymodules/python2.6/polib.py", line 170, in mofile
    instance = parser.parse()
  File "/usr/lib/pymodules/python2.6/polib.py", line 1593, in parse
    raise IOError('Invalid mo file, magic number is incorrect !')
IOError: Invalid mo file, magic number is incorrect !
Comment 1 Alexander Kläser univentionstaff 2014-06-05 12:13:13 CEST
How can this error be reproduced?
Comment 2 Philipp Hahn univentionstaff 2014-06-05 12:31:42 CEST
Put a .po file in /usr/share/univention-management-console/i18n/de/ as .mo
Comment 3 Florian Best univentionstaff 2015-02-02 10:56:21 CET
fixed there.

*** This bug has been marked as a duplicate of bug 36658 ***
Comment 4 Florian Best univentionstaff 2015-02-06 09:19:14 CET
http://errata.univention.de/ucs/4.0/73.html