LDAP Error "Unbalanced parenthesis"
Platform Notice: Server, Data Center, and Cloud By Request - This article was written for the Atlassian server and data center platforms but may also be useful for Atlassian Cloud customers. If completing instructions in this article would help you, please contact Atlassian Support and mention it.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Problem
When logging in using an LDAP user account, the following error occurs:
Test retrieve user: Failed
org.springframework.ldap.InvalidSearchFilterException: Unbalanced parenthesis; nested exception is
javax.naming.directory.InvalidSearchFilterException: Unbalanced
parenthesis; remaining name
The following appears in the atlassian-fisheye-YYYY-MM-DD.log
:
2016-03-25 17:14:03,161 ERROR [qtp1342346098-355 ] fisheye
DefaultUserManager-loginWithSanitizedUserName - Could not authenticate
user "UserName"
com.cenqua.fisheye.user.AuthenticationException: com.atlassian.crowd.exception.runtime.OperationFailedException
...
Caused
by: org.springframework.ldap.InvalidSearchFilterException: Unbalanced
parenthesis; nested exception is
javax.naming.directory.InvalidSearchFilterException: Unbalanced
parenthesis; remaining name...
Cause
User Object Filter requires that the value be enclosed in parentheses. By default this is not an issue as the default values already include parentheses.
- Versions of Fisheye prior to 4.0 allowed the User Object Filter to be specified without parentheses.
Resolution
Add parentheses to the value of User Object Filter.
Example: