Jira server fails to connect to Crowd with Crowd User Management REST service error
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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
Summary
Problem
When attempting to connect Crowd to JIRA, it fails with an exception and the error "The following URL does not specify a valid Crowd User Management REST service" is displayed.
This occurs when:
LDAP synchronization occurs.
Attempting to log in a user.
Using the test functionality in the User Directory configuration.
The following appears in the atlassian-jira.log
:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
2015-09-17 10:44:30,147 http-bio-8030-exec-11 ERROR upgrade 644x532x3 captain.planet 127.0.0.1 /plugins/servlet/embedded-crowd/configure/crowd/ [crowd.embedded.admin.ConfigurationController] Configuration test failed for user directory: [ Remote Crowd Directory], type: [ CROWD ]
com.atlassian.crowd.exception.runtime.OperationFailedException: The following URL does not specify a valid Crowd User Management REST service: http://ldap.example.com:8080/crowd/rest/usermanagement/1/search?entity-type=user&start-index=0&max-results=1&expand=user
at com.atlassian.crowd.embedded.core.CrowdDirectoryServiceImpl.testConnection(CrowdDirectoryServiceImpl.java:78)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:134)
at com.sun.proxy.$Proxy340.testConnection(Unknown Source) <+3> (NativeMethodAccessorImpl.java:62) (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58)
at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:56)
at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:39)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at com.sun.proxy.$Proxy1162.testConnection(Unknown Source)
at com.atlassian.crowd.embedded.admin.ConfigurationController.onSubmit(ConfigurationController.java:95)
...
Caused by: com.atlassian.crowd.exception.InvalidCrowdServiceException: The following URL does not specify a valid Crowd User Management REST service: http://ldap.example.com:8080/crowd/rest/usermanagement/1/search?entity-type=user&start-index=0&max-results=1&expand=user
at com.atlassian.crowd.integration.rest.service.RestExecutor$MethodExecutor.executeCrowdServiceMethod(RestExecutor.java:604)
at com.atlassian.crowd.integration.rest.service.RestExecutor$MethodExecutor.andReceive(RestExecutor.java:481)
at com.atlassian.crowd.integration.rest.service.RestCrowdClient.searchUsers(RestCrowdClient.java:557)
at com.atlassian.crowd.integration.rest.service.RestCrowdClient.testConnection(RestCrowdClient.java:545)
at com.atlassian.crowd.directory.RemoteCrowdDirectory.testConnection(RemoteCrowdDirectory.java:828)
Diagnosis
If the above exceptions are present in the logs, this KB applies.
Cause
When JIRA is attempting to connect to the URL (in this example http://ldap.example.com:8080/crowd/rest/usermanagement/1/search?entity-type=user&start-index=0&max-results=1&expand=user) the results are not in an expected format. This can be caused by an incorrect URL, an interim / reverse-proxy or other network interference.
Solution
Resolution
Verify the correct Base URL is configured in JIRA and Crowd.
Check if there is any reverse-proxy in front of Crowd. If so, attempt to bypass it (connect directly to an unproxied HTTP connector on Crowd).
Confirm if there's any outbound proxy being used in JIRA (this will be set in the JVM arguments using
-Dhttp.proxyHost
and-Dhttp.proxyPort
. If so, try disabling these arguments and connecting again.You can also try directly accessing the link in the logs - use the Crowd application login / password (not the admin login / password) to access this panel, and confirm it's returning appropriate results.
Additionally accessing Administration > System > Troubleshooting and Support > Logging and Profiling and setting
com.atlassian.crowd
toDEBUG
then trying again will output additional information that can be used to troubleshoot - for example it may show you the route that is being taken to establish the connection.
Was this helpful?