JIRA drops LDAP configuration - java.naming.provider.url property does not contain a URL
Symptoms
Trying to log into JIRA results in either an "Operation Failed" or "Sorry, an Error Occurred" error.
The following appears in the atlassian-jira.log
:
2011-12-19 12:39:00,406 http-443-7 ERROR anonymous 759x490x1 wv7mlb 10.121.70.121 /rest/gadget/1.0/login [jira.security.login.JiraSeraphAuthenticator] Error occurred while trying to authenticate user 'testuser'.
com.atlassian.crowd.exception.runtime.OperationFailedException
at com.atlassian.crowd.embedded.core.CrowdServiceImpl.convertOperationFailedException(CrowdServiceImpl.java:869)
at com.atlassian.crowd.embedded.core.CrowdServiceImpl.authenticate(CrowdServiceImpl.java:79)
at com.atlassian.crowd.embedded.core.DelegatingCrowdService.authenticate(DelegatingCrowdService.java:35)
...
Caused by: org.springframework.ldap.ConfigurationException: java.naming.provider.url property does not contain a URL; nested exception is javax.naming.ConfigurationException: java.naming.provider.url property does not contain a URL
at org.springframework.ldap.support.LdapUtils.convertLdapException(LdapUtils.java:101)
at org.springframework.ldap.core.support.AbstractContextSource.createContext(AbstractContextSource.java:266)
at org.springframework.ldap.core.support.AbstractContextSource.getContext(AbstractContextSource.java:106)
or
2012-04-30 16:24:32,849 http-8080-2 ERROR [500ErrorPage.jsp] Exception caught in 500 page null
com.atlassian.crowd.exception.runtime.OperationFailedException
at com.atlassian.crowd.embedded.core.CrowdServiceImpl.convertOperationFailedException(CrowdServiceImpl.java:869)
at com.atlassian.crowd.embedded.core.CrowdServiceImpl.authenticate(CrowdServiceImpl.java:79)
...
Caused by: java.lang.IllegalArgumentException: org.apache.commons.httpclient.URIException: URI-Reference required
at com.atlassian.crowd.integration.rest.service.RestExecutor.<init>(RestExecutor.java:77)
at com.atlassian.crowd.integration.rest.service.RestCrowdClient.<init>(RestCrowdClient.java:78)
...
Caused by: org.apache.commons.httpclient.URIException: URI-Reference required
at org.apache.commons.httpclient.URI.parseUriReference(URI.java:1874)
at org.apache.commons.httpclient.URI.<init>(URI.java:165)
Diagnosis
JIRA is using LDAP or Crowd for user management. After restarting the application, the LDAP configuration is missing connection parameters. This can be verified by querying the database:
Identify the ID for the LDAP/Crowd directory:
select * from cwd_directory
- Take note of the ID for the LDAP/Crowd User Directory.
Using the ID from above:
select * from cwd_directory_attribute where directory_id = 'XXXXX';
If this returned only a few rows, then it's likely the configuration has somehow been lost.
Cause
The configuration for either LDAP or Crowd has been lost. The root cause is currently unknown.
Resolution
Method 1
- Log in as your JIRA's local admin and re-configure the same LDAP directory that lost the configuration. Creating a new directory with the same configuration will cause you to lose local group memberhips.
If you do not know or have a local admin, see here: Retrieving the JIRA Administrator.
Method 2
Only use this method if you are familiar/experienced with both your LDAP configuration and administering a database.
- Manually input the information into the database
- Use the above sample results to help input the data.
Please see our Troubleshooting LDAP User Management documentation for further assistance with diagnosing LDAP problems.
SSO will need to be disabled to log in as the local administrator. Instructions on disabling this function can be found in our article on Integrating Crowd with Atlassian JIRA