LDAP - Users are intermittently unable to login
症状
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.
原因
LDAP cache is disabled.
ソリューション
- Shut down the Bamboo instance
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" /> -->
情報
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
- Start the Bamboo instance
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-15360Getting issue details... STATUS and the resolution would be to upgrade Bamboo to v5.8+