Login to Cloudera Manager with Lowercase User Name Fails with "Duplicate entry for key unique_user_name" After Initial Login with Uppercase Version of the Name (Doc ID 2119811.1)

Last updated on MARCH 24, 2016

Applies to:

Big Data Appliance Integrated Software - Version 4.3.0 and later
Linux x86-64

Symptoms

Logging into Cloudera Manager with a lowercase user name fails with "Duplicate entry for key unique_user_name" after initial login with an uppercase version of the name.  This is seen when Active Directory is configured.   Logging into Cloudera Manager(CM) for the first time as any user with upper case characters as in a name like: ABC123 saves that name in upper case. If a subsequent login is attempted with the name in lower case like: abc123, CM tries to save the name again and raises an error.

The error is reported in the /var/log/cloudera-scm-server/cloudera-scm-server.log is:

Duplicate entry 'abc123' for key 'unique_user_name'

  

Details:
1. For the first login with like: ABC123 cloudera-scm-server.log shows:

2016-03-02 10:08:19,677 INFO *@scm-web-*:org.springframework.ldap.core.LdapTemplate: The returnObjFlag of supplied SearchControls is not set but a ContextMapper is used - setting flag to true
2016-03-02 10:08:19,692 INFO *@scm-web-*:com.cloudera.server.web.cmf.AuthenticationSuccessEventListener: Authentication success for user: 'ABC123' with org.springframework.security.web.authentication.WebAuthenticationDetails@*: RemoteIpAddress: *.*.*.*; SessionId: *

2. For a subsequent login with the name in lower case like: abc123 cloudera-scm-server.log shows:

2016-03-02 10:01:44,070 INFO *@scm-web-*:org.springframework.ldap.core.LdapTemplate: The returnObjFlag of supplied SearchControls is not set but a ContextMapper is used - setting flag to true
2016-03-02 10:01:44,080 WARN *@scm-web-*:org.hibernate.engine.jdbc.spi.SqlExceptionHelper: SQL Error: 1062, SQLState: 23000
2016-03-02 10:01:44,080 ERROR *@scm-web-*:org.hibernate.engine.jdbc.spi.SqlExceptionHelper: Duplicate entry 'abc123' for key 'unique_user_name'
2016-03-02 10:01:44,080 ERROR *@scm-web-*:org.hibernate.engine.jdbc.batch.internal.BatchingBatch: *: Exception executing batch [could not perform addBatch]
2016-03-02 10:01:44,083 INFO *@scm-web-*:com.cloudera.server.web.cmf.CmfLdapAuthenticationProvider: LDAP/AD authentication failure for abc123
2016-03-02 10:01:44,083 INFO *@scm-web-*:com.cloudera.server.web.cmf.AuthenticationFailureEventListener: Authentication failure for user: 'abc123' with org.springframework.security.web.authentication.WebAuthenticationDetails@*: RemoteIpAddress: *.*.*.* SessionId: *

3. Login with the upper case name is successful:

2016-03-02 10:02:52,545 INFO *@scm-web-*:org.springframework.ldap.core.LdapTemplate: The returnObjFlag of supplied SearchControls is not set but a ContextMapper is used - setting flag to true
2016-03-02 10:02:52,551 INFO *@scm-web-*:com.cloudera.server.web.cmf.AuthenticationSuccessEventListener: Authentication success for user: 'ABC123' with org.springframework.security.web.authentication.WebAuthenticationDetails@*: RemoteIpAddress: *.*.*.* SessionId: *

4. From mysql, see the upper case name:

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms