Bug 40931 - Self service reset password throws error after latest update
Self service reset password throws error after latest update
Status: RESOLVED MOVED
Product: UCS
Classification: Unclassified
Component: Self Service
UCS 4.1
amd64 Linux
: P5 normal (vote)
: ---
Assigned To: UMC maintainers
UMC maintainers
:
Depends on: 44499
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-22 20:22 CET by jmfrappier
Modified: 2018-04-13 12:27 CEST (History)
3 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 1: Cosmetic issue or missing function but workaround exists
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 4: A User would return the product
User Pain: 0.046
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Error handling, External feedback
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jmfrappier 2016-03-22 20:22:14 CET
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.
Comment 1 Florian Best univentionstaff 2016-03-22 22:13:07 CET
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?
Comment 2 Florian Best univentionstaff 2016-03-23 06:48:18 CET
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.
Comment 3 jmfrappier 2016-03-23 12:53:45 CET
(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
Comment 4 jmfrappier 2016-03-23 21:00:23 CET
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.
Comment 5 jmfrappier 2016-03-23 21:01:26 CET
Sorry wrong command
dpkg-reconfigure locales did it.
Comment 6 Stefan Gohmann univentionstaff 2016-05-17 09:45:59 CEST
(In reply to jmfrappier from comment #5)
> Sorry wrong command
> dpkg-reconfigure locales did it.

Thanks for the update.
Comment 7 Daniel Tröder univentionstaff 2017-04-28 11:23:33 CEST
Thank you for reporting and fix it in your system. A separate bug was created to prevent this from happening to others: Bug #44499.