Jira server fails to connect to Crowd with Crowd User Management REST service error

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

This article only applies to the Atlassian server platform. Learn more about the differences between cloud and server.

問題

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:

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)

診断

If the above exceptions are present in the logs, this KB applies.

原因

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.

ソリューション

  1. Verify the correct Base URL is configured in JIRA and Crowd.
  2. 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).
  3. 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.
  4. 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.
  5. Additionally accessing Administration > System > Troubleshooting and Support > Logging and Profiling and setting crowd.atlassian.com to DEBUG 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.

説明 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.
製品Jira
プラットフォームサーバー
最終更新日 2019 年 9 月 25 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.