LDAP - Users are intermittently unable to login

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

This message is displayed in the web interface when thry try to login with their credentials:

Unable to find the user. The username <em>user_name_here</em> may be incorrect.

After restarting Bamboo, the above user "user_name_here" may be able to login, but now other user(s) may not.

Cause

LDAP cache is disabled.

Resolution

  1. Shut down the Bamboo instance
  2. Edit <Bamboo_Install_dir>/atlassian-users/WEB-INF/classes/ehcache.xml and uncomment this section:

    <!--
      <cache name="com.atlassian.user.impl.ldap.LDAPUserManagerReadOnly.myLdapRepository.users"
             maxElementsInMemory="500"
             eternal="false"
             timeToIdleSeconds="300"
             timeToLiveSeconds="300"
          />
      <cache name="com.atlassian.user.impl.ldap.LDAPUserManagerReadOnly.myLdapRepository.users_ro"
             maxElementsInMemory="500"
             eternal="false"
             timeToIdleSeconds="300"
             timeToLiveSeconds="300"
          />
      <cache name="com.atlassian.user.impl.ldap.LDAPUserManagerReadOnly.myLdapRepository.repository"
             maxElementsInMemory="500"
             eternal="false"
             timeToIdleSeconds="300"
             timeToLiveSeconds="300"
          />
      <cache name="com.atlassian.user.impl.ldap.LDAPGroupManagerReadOnly.myLdapRepository.groups"
             maxElementsInMemory="500"
             eternal="false"
             timeToIdleSeconds="300"
             timeToLiveSeconds="300"
          />
      <cache name="com.atlassian.user.impl.ldap.LDAPGroupManagerReadOnly.myLdapRepository.groups_hasMembership"
             maxElementsInMemory="500"
             eternal="false"
             timeToIdleSeconds="300"
             timeToLiveSeconds="300"
          />
      <cache name="com.atlassian.user.impl.ldap.LDAPGroupManagerReadOnly.myLdapRepository.groups_getGroupsForUser"
             maxElementsInMemory="500"
             eternal="false"
             timeToIdleSeconds="300"
             timeToLiveSeconds="300"
          />
      <cache name="com.atlassian.user.impl.ldap.LDAPGroupManagerReadOnly.myLdapRepository.repositories" maxElementsInMemory="500" eternal="false" timeToIdleSeconds="300" timeToLiveSeconds="300" />
      -->
    

    Info

    Please replace the keyword myLdapRepository with the actual ldap key. The key can be obtained from the atlassian-user.xml file located in the <bamboo-home>/xml_data/configuration/* directory

     


  3. Start the Bamboo instance

 

(info)  Prior Bamboo v5.8, the LDAP cache mechanism used was "com.atlassian.cache.memory.MemoryCacheManager" and now replaced by "com.atlassian.cache.ehcache.EhCacheManager".

In case you are experiencing the issue, please refer to the following  BAM-15360 - Getting issue details... STATUS  and the resolution would be to upgrade Bamboo to v5.8+

Last modified on Dec 8, 2017

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.