Missing tags in Bitbucket Server and Data Center

お困りですか?

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

コミュニティに質問

プラットフォームについて: 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 は除く

要約

Tags don't appear in Bitbucket UI. When tried to access the commits page, tags are not seen on the right panel 



環境

Bitbucket Data Center 7.21.7

May be applicable for other Bitbucket Data Center versions


診断

From the atlassian-bitbucket.log, we see below error

YYYY_MM_DD ERROR [ThreadPoolAsyncTaskExecutor::Thread X]  c.a.plugin.osgi.factory.OsgiPlugin Unable to start the plugin container for plugin 'com.atlassian.bitbucket.server.bitbucket-tag'
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tagService' defined in URL [bundle://74.0:0/META-INF/spring/atlassian-plugin-context.xml]: Invocation of init method failed; nested exception is java.io.UncheckedIOException: java.nio.file.FileSystemException: <BITBUCKET_HOME>/caches/tag-index: Structure needs cleaning
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1804)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
	at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:57)
	at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:322)
	at org.eclipse.gemini.blueprint.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
	at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:287)
	at org.eclipse.gemini.blueprint.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:137)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.lang.Thread.run(Thread.java:829)
	... 8 frames trimmed
Caused by: java.io.UncheckedIOException: java.nio.file.FileSystemException: <BITBUCKET_HOME>/caches/tag-index: Structure needs cleaning
	at java.base/java.nio.file.Files$2.hasNext(Files.java:3710)
	at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1811)
	at java.base/java.util.Spliterators$1Adapter.hasNext(Spliterators.java:681)
	at com.atlassian.bitbucket.util.MoreFiles.cleanDirectory(MoreFiles.java:80)
	at com.atlassian.bitbucket.internal.tag.idx.TagIndexer.clearCacheDirectory(TagIndexer.java:191)
	at com.atlassian.bitbucket.internal.tag.idx.TagIndexer.init(TagIndexer.java:109)
	at com.atlassian.bitbucket.internal.tag.DefaultTagService.onInit(DefaultTagService.java:79)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	... 9 common frames omitted

Verify if the path <BITBUCKET_HOME>/caches/tag-index has read/write permissions


原因

The issue may be caused due to directory tag-index getting corrupted preventing tag service to start on the server.



ソリューション

Remove the tag-index directory under BITBUCKET-HOME/caches. 
(info) Caches directory contains cache and index files. It should be safe for these files to be deleted between application restarts; however, these files must not be modified or deleted while Bitbucket is running.

  1. Shutdown Bitbucket server
  2. Backup tag-index file located at BITBUCKET-HOME/caches to a temporary location. 
  3. Remove tag-index directory at BITBUCKET-HOME/caches
     Cache files will be rebuilt on runtime when the tags/commits page is accessed.
  4. Start Bitbucket server



最終更新日 2023 年 8 月 18 日

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

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