MalformedInputException when comparing branches

お困りですか?

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

コミュニティに質問

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

問題

If you try to diff two branches you get an error in the UI "Something went wrong while trying to serve your request."

atlassian-bitbucket-yyyy-mm-dd.log: に次のログが記録されます。

2017-05-23 11:11:39,589 ERROR [http-nio-7990-exec-4] Andrei.Lipovchenko @97OJNBx671x35x1 oemzlu 172.20.64.76,172.30.62.34 "GET /projects/UFM/repos/ufm_admin_tools/commits HTTP/1.1" c.a.s.i.w.HandlerExceptionResolverImpl Could not read loose ref
com.atlassian.stash.internal.scm.git.ref.InvalidRefException: Could not read loose ref
	at com.atlassian.stash.internal.scm.git.ref.LooseRefDb.retryingRead(LooseRefDb.java:143)
	at com.atlassian.stash.internal.scm.git.ref.LooseRefDb.readRef(LooseRefDb.java:363)
	at com.atlassian.stash.internal.scm.git.ref.LooseRefDb.internalResolveSha1(LooseRefDb.java:326)
	at com.atlassian.stash.internal.scm.git.ref.LooseRefDb.internalResolve(LooseRefDb.java:265)
	at com.atlassian.stash.internal.scm.git.ref.LooseRefDb.resolve(LooseRefDb.java:115)
	at com.atlassian.stash.internal.scm.git.ref.CompositeGitRefDb.resolve(CompositeGitRefDb.java:109)
	at com.atlassian.stash.internal.scm.git.command.refdb.ResolveGitRefDbCommand.internalCall(ResolveGitRefDbCommand.java:54)
	at com.atlassian.stash.internal.scm.git.command.refdb.ResolveGitRefDbCommand.internalCall(ResolveGitRefDbCommand.java:23)
	at com.atlassian.stash.internal.scm.git.command.refdb.AbstractGitRefDbCommand.call(AbstractGitRefDbCommand.java:49)
	at com.atlassian.stash.internal.scm.git.command.refdb.ResolveGitRefDbCommand.call(ResolveGitRefDbCommand.java:43)
	at com.atlassian.stash.internal.scm.git.command.refdb.ResolveGitRefDbCommand.call(ResolveGitRefDbCommand.java:23)
	at com.atlassian.stash.internal.scm.git.command.TransformedGitCommand.call(TransformedGitCommand.java:45)
	at com.atlassian.stash.internal.repository.DefaultRefService.resolveRef(DefaultRefService.java:248)
	at com.atlassian.stash.internal.web.repos.RepositoryController.findViewRef(RepositoryController.java:599)
	at com.atlassian.stash.internal.web.repos.RepositoryController.getCommits(RepositoryController.java:159)
	at com.atlassian.stash.internal.web.repos.RepositoryController.getCommitListContents(RepositoryController.java:228)
	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.bitbucket.internal.importer.web.RepositoryImportFilter.doFilter(RepositoryImportFilter.java:68)
	at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42)
	at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42)
	at com.atlassian.stash.internal.spring.security.StashAuthenticationFilter.doFilter(StashAuthenticationFilter.java:88)
	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.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.core.filters.ServletContextThreadLocalFilter.doFilter(ServletContextThreadLocalFilter.java:21)
	at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)
	at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42)
	at com.atlassian.plugin.connect.plugin.auth.user.ThreeLeggedAuthFilter.doFilter(ThreeLeggedAuthFilter.java:109)
	at com.atlassian.jwt.internal.servlet.JwtAuthFilter.doFilter(JwtAuthFilter.java:32)
	at com.atlassian.analytics.client.filter.DefaultAnalyticsFilter.doFilter(DefaultAnalyticsFilter.java:38)
	at com.atlassian.analytics.client.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:39)
	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:83)
	at com.atlassian.stash.internal.hazelcast.ConfigurableWebFilter.doFilter(ConfigurableWebFilter.java:38)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.lang.Thread.run(Thread.java:745)
	... 294 frames trimmed
Caused by: java.nio.charset.MalformedInputException: Input length = 1
	at java.nio.charset.CoderResult.throwException(CoderResult.java:281)
	at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:339)
	at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
	at java.io.InputStreamReader.read(InputStreamReader.java:184)
	at java.io.BufferedReader.fill(BufferedReader.java:161)
	at java.io.BufferedReader.readLine(BufferedReader.java:324)
	at java.io.BufferedReader.readLine(BufferedReader.java:389)
	at com.atlassian.stash.internal.scm.git.ref.LooseRefDb.readFirstLine(LooseRefDb.java:357)
	at com.atlassian.stash.internal.scm.git.ref.LooseRefDb.lambda$readRef$16(LooseRefDb.java:364)
	at com.atlassian.stash.internal.scm.git.ref.LooseRefDb.retryingRead(LooseRefDb.java:138)
	... 47 common frames omitted

原因

Someone used vim to manually edit refs in BITBUCKET_HOME/shared/data/repositories/<id>/refs and then did not clean up the swap files. 

ソリューション

Increase the connection timeout in your Web/Proxy Server.

 

Stop Bitbucket, and remove the swap files to resolve the issue.

 

最終更新日 2017 年 6 月 27 日

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

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