Users Cannot Log in when Using ConfluenceGroupJoiningAuthenticator or ConfluenceLDAPGroupJoiningAuthenticator
症状
Failure when login to Confluence 3.5 when configured with ConfluenceGroupJoiningAuthenticator or ConfluenceLDAPGroupJoiningAuthenticator.
The following error is shown in the logs:
java.lang.NullPointerException
at com.atlassian.crowd.embedded.core.CrowdServiceImpl.isUserMemberOfGroup(CrowdServiceImpl.java:265)
at com.atlassian.confluence.user.ConfluenceGroupJoiningAuthenticator.addUserToGroup(ConfluenceGroupJoiningAuthenticator.java:59)
at com.atlassian.confluence.user.ConfluenceGroupJoiningAuthenticator$1.doInTransactionWithoutResult(ConfluenceGroupJoiningAuthenticator.java:48)
at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:127)
原因
This is caused by a null pointer exception in com.atlassian.confluence.user.ConfluenceGroupJoiningAuthenticator and com.atlassian.confluence.user.ConfluenceLDAPGroupJoiningAuthenticator, which are unable find local confluence-administrator group.
回避策
Find the
authenticator
element in your<Confluence-Installation-Directory>/confluence/web-inf/classes/seraph-config.xml
file and replace this element with the default Confluence Authenticator:<authenticator class="com.atlassian.confluence.user.ConfluenceAuthenticator"/>
This authenticator will not add any users to
confluence-users
automatically- Restart Confluence is required for the default authenticator to be activated.
ソリューション
Login as a confluence administrator:
- Go to the 'Administration Console' and click 'User Directories' in the left-hand panel.
- A user list of user directories will be shown Click 'Edit' next to the directory you want to have users automatically added to a group.
- Under the 'LDAP Permissions' section, ensure the 'Read Only with Local Groups' option is selected.
- Then type in the group name in the 'Default Group memberships' field (eg 'confluence-users').
- Click the 'Test Settings' then the 'Save' button at the bottom of the screen.