Missing tags in Bitbucket Server and Data Center

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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.

*Except Fisheye and Crucible

Summary

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

(Auto-migrated image: description temporarily unavailable)

Environment

Bitbucket Data Center 7.21.7

May be applicable for other Bitbucket Data Center versions

Diagnosis

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 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

Cause

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

Solution

Remove the tag-index directory under BITBUCKET-HOME/caches.

ℹ️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

Updated on April 24, 2025

Still need help?

The Atlassian Community is here for you.