After moving bitbucket and jira to a new server - user's from jira's directort can't login to bitbuc
Asked by Dani Kaplan:

I've tried to remove and reinstall application link - but it didn't help.

user get this error:

The remote authentication server is not available. Please try again later.

Error in the log:

<br />

2020-09-14 09:55:36,566 ERROR \[http-nio-7990-exec-9\] @15U3HYUx595x7374x0 1hdbs7j 77.139.225.140 "POST /j_atl_security_check HTTP/1.1" c.a.c.m.a.ApplicationServiceGeneric Directory 'JIRA User Directory (229377)' is not functional during authentication of 'username'. Skipped.  
2020-09-14 09:55:36,568 WARN \[http-nio-7990-exec-9\] @15U3HYUx595x7374x0 1hdbs7j 77.139.225.140 "POST /j_atl_security_check HTTP/1.1" c.a.s.i.s.s.PluginAuthenticationProvider Could not authenticate username  
com.atlassian.bitbucket.auth.AuthenticationSystemException: The remote authentication server is not available. Please try again later.  
at com.atlassian.stash.internal.crowd.RiotPolice.doAuthenticate(RiotPolice.java:726)  
at com.atlassian.stash.internal.crowd.RiotPolice.lambda$authenticate$1(RiotPolice.java:135)  
at java.util.concurrent.FutureTask.run(FutureTask.java:266)  
at io.atlassian.util.concurrent.ConcurrentOperationMapImpl$CallerRunsFuture.get(ConcurrentOperationMapImpl.java:67)  
at io.atlassian.util.concurrent.ConcurrentOperationMapImpl.runOperation(ConcurrentOperationMapImpl.java:55)  
at com.atlassian.stash.internal.crowd.RiotPolice.authenticate(RiotPolice.java:132)  
at com.atlassian.stash.internal.plugin.OsgiSafeProxyProvider$1.invoke(OsgiSafeProxyProvider.java:95)  
at com.atlassian.stash.internal.auth.EmbeddedCrowdHttpAuthenticationHandler.performAuthentication(EmbeddedCrowdHttpAuthenticationHandler.java:52)  
at com.atlassian.stash.internal.auth.DefaultAuthenticationService.lambda$authenticateInternal$2(DefaultAuthenticationService.java:158)  
at com.atlassian.stash.internal.auth.DefaultCaptchaService.authenticateWithCaptcha(DefaultCaptchaService.java:72)  
at com.atlassian.stash.internal.auth.DefaultAuthenticationService.authenticateInternal(DefaultAuthenticationService.java:166)  
at com.atlassian.stash.internal.auth.DefaultAuthenticationService.authenticate(DefaultAuthenticationService.java:75)  
at com.atlassian.stash.internal.spring.security.PluginAuthenticationProvider.authenticate(PluginAuthenticationProvider.java:49)  
at com.atlassian.stash.internal.spring.security.StashAuthenticationFilter.doFilter(StashAuthenticationFilter.java:99)  
at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doInsideSpringSecurityChain(BeforeLoginPluginAuthenticationFilter.java:112)  
at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:75)  
at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:94)  
at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:67)  
at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42)  
at com.atlassian.plugin.connect.plugin.auth.oauth2.DefaultSalAuthenticationFilter.doFilter(DefaultSalAuthenticationFilter.java:69)  
at com.atlassian.plugin.connect.plugin.auth.user.ThreeLeggedAuthFilter.doFilter(ThreeLeggedAuthFilter.java:109)  
at com.atlassian.jwt.internal.servlet.JwtAuthFilter.doFilter(JwtAuthFilter.java:37)  
at com.atlassian.analytics.client.filter.DefaultAnalyticsFilter.doFilter(DefaultAnalyticsFilter.java:26)  
at com.atlassian.analytics.client.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:48)  
at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42)  
at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doBeforeBeforeLoginFilters(BeforeLoginPluginAuthenticationFilter.java:90)  
at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:73)  
at com.atlassian.stash.internal.request.DefaultRequestManager.doAsRequest(DefaultRequestManager.java:84)  
at com.atlassian.stash.internal.hazelcast.ConfigurableWebFilter.doFilter(ConfigurableWebFilter.java:38)  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)  
at java.lang.Thread.run(Thread.java:748)  
... 189 frames trimmed  
Caused by: com.atlassian.crowd.exception.runtime.OperationFailedException: null  
at com.atlassian.crowd.embedded.core.CrowdServiceImpl.convertOperationFailedException(CrowdServiceImpl.java:676)  
at com.atlassian.crowd.embedded.core.CrowdServiceImpl.authenticate(CrowdServiceImpl.java:76)  
at com.atlassian.stash.internal.crowd.RiotPolice.doAuthenticate(RiotPolice.java:711)  
... 31 common frames omitted  
Caused by: com.atlassian.crowd.exception.ApplicationPermissionException: Forbidden (403) Encountered a "403 - Forbidden" error while loading this page. client.forbidden.exception Go to Jira home  
at com.atlassian.crowd.integration.rest.service.RestExecutor$MethodExecutor.throwError(RestExecutor.java:539)  
at com.atlassian.crowd.integration.rest.service.RestExecutor$MethodExecutor.andReceive(RestExecutor.java:373)  
at com.atlassian.crowd.integration.rest.service.RestCrowdClient.authenticateUser(RestCrowdClient.java:141)  
at com.atlassian.crowd.directory.RemoteCrowdDirectory.authenticate(RemoteCrowdDirectory.java:173)  
at com.atlassian.crowd.directory.DbCachingRemoteDirectory.authenticateAndUpdateInternalUser(DbCachingRemoteDirectory.java:255)  
at com.atlassian.crowd.directory.DbCachingRemoteDirectory.authenticate(DbCachingRemoteDirectory.java:173)  
at com.atlassian.crowd.manager.directory.DirectoryManagerGeneric.authenticateUser(DirectoryManagerGeneric.java:304)  
at com.atlassian.stash.internal.crowd.CustomizedDirectoryManager.authenticateUser(CustomizedDirectoryManager.java:55)  
at com.atlassian.crowd.manager.application.ApplicationServiceGeneric.authenticateUser(ApplicationServiceGeneric.java:177)  
at com.atlassian.stash.internal.crowd.CustomizedApplicationService.authenticateUser(CustomizedApplicationService.java:52)  
at com.atlassian.crowd.embedded.core.CrowdServiceImpl.authenticate(CrowdServiceImpl.java:70)  
... 32 common frames omitted  


Answers:
author: Dani Kaplan
body: I've just figured it out after a long process.

Jira Server User - forgot all about it - it had the old ip.


author: Rudy Holtkamp
body: [@Dani Kaplan](/t5/user/viewprofilepage/user-id/78776) ,

It seems that you are using Jira as the User Directory for Bitbucket.

So you need to go to user directory settings of Bitbucket and update the information there (URL to Jira or ip address).

In Bitbucket go to: Settings \> User Directories \> Jira User Directory \> Edit \> Change Server URL

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/110231iE82F5B4CCC13EB10/image-dimensions/556x528?v=v2 "image.png")


Tags: bitbucket-server

server