Univention Bugzilla – Bug 40931
Self service reset password throws error after latest update
Last modified: 2018-04-13 12:27:00 CEST
After entering username and clicking next, the following error is displayed. Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/univention/management/console/protocol/modserver.py", line 271, in handle self.__handler.init() File "/usr/lib/pymodules/python2.7/univention/management/console/modules/passwordreset/__init__.py", line 190, in init self.db = TokenDB(MODULE) File "/usr/lib/pymodules/python2.7/univention/management/console/modules/passwordreset/tokendb.py", line 53, in __init__ self.conn = self.open_db() File "/usr/lib/pymodules/python2.7/univention/management/console/modules/passwordreset/tokendb.py", line 120, in open_db db_name=DB_NAME, db_user=DB_USER, db_pw=password)) File "/usr/lib/python2.7/dist-packages/psycopg2/__init__.py", line 179, in connect connection_factory=connection_factory, async=async) OperationalError: FATAL: database locale is incompatible with operating system DETAIL: The database was initialized with LC_COLLATE "en_US.UTF-8", which is not recognized by setlocale(). HINT: Recreate the database with another locale or install the missing locale. started happening after latest update.
Introduced by Bug #40799 (http://errata.software-univention.de/ucs/4.1/134.html)? I see no obvious reason for this. @jmfrappier Thank you for reportng this! What is the output of the command "ucr get locale locale/default" on the UCS master server?
Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/univention/management/console/protocol/modserver.py", line 271, in handle self.__handler.init() File "/usr/lib/pymodules/python2.7/univention/management/console/modules/passwordreset/__init__.py", line 190, in init self.db = TokenDB(MODULE) File "/usr/lib/pymodules/python2.7/univention/management/console/modules/passwordreset/tokendb.py", line 53, in __init__ self.conn = self.open_db() File "/usr/lib/pymodules/python2.7/univention/management/console/modules/passwordreset/tokendb.py", line 120, in open_db db_name=DB_NAME, db_user=DB_USER, db_pw=password)) File "/usr/lib/python2.7/dist-packages/psycopg2/__init__.py", line 179, in connect connection_factory=connection_factory, async=async) OperationalError: FATAL: database locale is incompatible with operating system DETAIL: The database was initialized with LC_COLLATE "en_US.UTF-8", which is not recognized by setlocale(). HINT: Recreate the database with another locale or install the missing locale.
(In reply to Florian Best from comment #2) > Traceback (most recent call last): > File > "/usr/lib/pymodules/python2.7/univention/management/console/protocol/ > modserver.py", line 271, in handle self.__handler.init() > File > "/usr/lib/pymodules/python2.7/univention/management/console/modules/ > passwordreset/__init__.py", line 190, in init self.db = TokenDB(MODULE) > File > "/usr/lib/pymodules/python2.7/univention/management/console/modules/ > passwordreset/tokendb.py", line 53, in __init__ self.conn = self.open_db() > File > "/usr/lib/pymodules/python2.7/univention/management/console/modules/ > passwordreset/tokendb.py", line 120, in open_db db_name=DB_NAME, > db_user=DB_USER, db_pw=password)) > File "/usr/lib/python2.7/dist-packages/psycopg2/__init__.py", line 179, in > connect connection_factory=connection_factory, async=async) > OperationalError: FATAL: database locale is incompatible with operating > system DETAIL: The database was initialized with LC_COLLATE "en_US.UTF-8", > which is not recognized by setlocale(). HINT: Recreate the database with > another locale or install the missing locale. Output is en_CA.UTF-8:UTF-8 fr_CA.UTF-8:UTF-8
I was able to reconfigure the missing locale with locale-gen Added en_US Problem resolved, but it's still a bug as this started happening after latest update.
Sorry wrong command dpkg-reconfigure locales did it.
(In reply to jmfrappier from comment #5) > Sorry wrong command > dpkg-reconfigure locales did it. Thanks for the update.
Thank you for reporting and fix it in your system. A separate bug was created to prevent this from happening to others: Bug #44499.