Bitbucket Server Dashboard displays a 500 error and won't load after upgrade

お困りですか?

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

コミュニティに質問


プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

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.

*Fisheye および Crucible は除く

要約

Some users receive a 500 error when loading the dashboard post-upgrade.

環境

Bitbucket Server or Data Center versions 7.4.0 through 7.12.0.

診断

From atlassian-bitbucket-access.log: Failed dashboard request shows 500: 

192.168.1.1 | https | i*1RHVCDBx703x109306x2 | - | 2021-04-26 11:43:03,515 | "GET /dashboard HTTP/1.1" | "https://bitbucket.example.com/dashboard" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.128 Safari/537.36" | - | - | - | - | - | 1qnf5js | 
 
192.168.1.1 | https | o*1RHVCDBx703x109306x2 | username | 2021-04-26 11:43:03,644 | "GET /dashboard HTTP/1.1" | "https://bitbucket.example.com/dashboard" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.128 Safari/537.36" | 500 | 0 | 13221 | - | 129 | 1qnf5js | 
 

From atlassian-bitbucket.log: Build status failure in thread stack when loading the dashboard resulting in a null pointer:

2021-04-26 15:25:28,737 ERROR [http-nio-7990-exec-53] username *1RK6XVCx925x340356x1 1x1xcj7 192.168.1.1 "GET /dashboard HTTP/1.1" c.a.s.i.w.HandlerExceptionResolverImpl null
java.lang.NullPointerException: null
	at com.atlassian.bitbucket.internal.build.status.migration.MigrationBuildStatusDao.lambda$countByState$1(MigrationBuildStatusDao.java:103)
	at java.util.HashMap.forEach(HashMap.java:1289)
	at com.atlassian.bitbucket.internal.build.status.migration.MigrationBuildStatusDao.countByState(MigrationBuildStatusDao.java:101)
	at com.atlassian.bitbucket.internal.build.status.DefaultBuildStatusService.getSummaries(DefaultBuildStatusService.java:178)
	at com.atlassian.stash.internal.web.dashboard.DashboardController.lambda$renderDashboard$4(DashboardController.java:202)
	at java.util.stream.Collectors.lambda$toMap$58(Collectors.java:1321)
	at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
	at java.util.HashMap$EntrySpliterator.forEachRemaining(HashMap.java:1699)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566)
	at com.atlassian.stash.internal.web.dashboard.DashboardController.renderDashboard(DashboardController.java:202)
	at com.atlassian.stash.internal.web.dashboard.DashboardController.dashboard(DashboardController.java:109)
	at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)
	at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)
	at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)
	at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)
	at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)
	at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42)
	at com.atlassian.bitbucket.internal.ratelimit.servlet.filter.RateLimitFilter.doFilter(RateLimitFilter.java:75)
	at com.atlassian.plugins.slack.analytics.SlackAnalyticsFilter.doFilter(SlackAnalyticsFilter.java:35)
	at com.atlassian.troubleshooting.thready.filter.AbstractThreadNamingFilter.doFilter(AbstractThreadNamingFilter.java:46)
	at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42)
	at com.atlassian.stash.internal.web.auth.AuthorizationFailureInterceptor.doFilterInternal(AuthorizationFailureInterceptor.java:39)
	at com.atlassian.stash.internal.spring.security.StashAuthenticationFilter.doFilter(StashAuthenticationFilter.java:85)
	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.plugins.authentication.impl.basicauth.filter.DisableBasicAuthFilter.doFilter(DisableBasicAuthFilter.java:70)
	at com.atlassian.troubleshooting.thready.filter.AbstractThreadNamingFilter.doFilter(AbstractThreadNamingFilter.java:46)
	at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42)
	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.plugins.authentication.impl.basicauth.filter.DisableBasicAuthFilter.doFilter(DisableBasicAuthFilter.java:70)
	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:33)
	at com.atlassian.troubleshooting.thready.filter.AbstractThreadNamingFilter.doFilter(AbstractThreadNamingFilter.java:46)
	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)
	... 326 frames trimmed


Check the bb_build_status table to see if it contains data by running the following query:

# Pulls count for the new database table
SELECT Count(*) from "bb_build_status"; 

The query returns no rows, proceed to Cause #3 below.


原因

#1 - Build status migration is not complete yet

This migration, depending on the size of your instance, can take as little as 10 minutes to complete or much longer on your first start post upgrade.

#2 - Bug in build status counting

If you are running a version of Bitbucket Server or Data Center between 7.4.0 and 7.12.0 (inclusive), you are encountering a bug in which a NullPointerException is thrown as Bitbucket attempts to count the build statuses while the build status migration executes. The bug is tracked as  BSERV-12836 - Getting issue details... STATUS .

#3 - Build status migration incomplete or never started

The build status migration could still be in progress or has never started. If the bb_build_status table is empty, then the process has never started and needs continued investigation. See Solution #3 below.

ソリューション

#1 - Build status migration is not complete

Let the process complete. It can generally take 10-30 minutes on an average size instance. If the issue persists, please continue to the next resolutions.

#2 - Bug in build status counting

This should eventually clear when the migration completes. This bug has been fixed in versions 7.6.7 and 7.13.0 of Bitbucket Server, so upgrading to one of those (or any later version) will resolve the problem.

#3 - Build status migration incomplete or never started

In rare circumstances, it is possible that the build status migration never executed. Please reach out to Atlassian Support to investigate this issue.


最終更新日 2021 年 6 月 15 日

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

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