Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-14099

Exceptions while generating support zip for mirrors

    XMLWordPrintable

Details

    Description

      Issue Summary

      When a support zip is generated for mirrors (standalone or farm), AuthorisationExceptions are noticed in the logs.

      This is reproducible on Data Center: Yes

      Steps to Reproduce

      1. Setup a primary instance and a mirror
      2. Go to Settings > Troubleshooting and Support Tools - <Mirror name> > Create Support Zip
      3. Click "Create zip"

      Expected Results

      Support zip is created successfully with all the information and without any exceptions

      Actual Results

      Support zip is created successfully but some information is missing e.g SCM cache statistics, data stores, DB. HTTP authentication handlers etc

      The below exception is thrown in the xxxxxxx.log file:

      2023-05-24 12:36:17,466 WARN  [support-zip]  c.a.t.b.s.c.PluginSupportInfoAppenderManager Problem adding support info for module 'com.atlassian.bitbucket.server.support-info-providers:server-support-info'
      com.atlassian.bitbucket.AuthorisationException: You are not permitted to access this resource
      	at com.atlassian.stash.internal.aop.ExceptionRewriteAdvice.afterThrowing(ExceptionRewriteAdvice.java:37)
      	at com.atlassian.stash.internal.server.ServerSupportInfo.addDataStores(ServerSupportInfo.java:153)
      	at com.atlassian.stash.internal.server.ServerSupportInfo.addSupportInfo(ServerSupportInfo.java:122)
      	at com.atlassian.support.tools.spi.RootLevelSupportInfoAppender.addSupportInfo(RootLevelSupportInfoAppender.java:11)
      	at com.atlassian.support.tools.spi.RootLevelSupportInfoAppender.addSupportInfo(RootLevelSupportInfoAppender.java:6)
      	at com.atlassian.troubleshooting.bitbucket.stp.compatibility.PluginSupportInfoAppenderManager.addSupportInfo(PluginSupportInfoAppenderManager.java:93)
      	at com.atlassian.troubleshooting.bitbucket.stp.compatibility.PluginSupportInfoAppenderManager.addSupportInfo(PluginSupportInfoAppenderManager.java:83)
      	at com.atlassian.troubleshooting.bitbucket.BitbucketApplicationInfo.internalLoadProperties(BitbucketApplicationInfo.java:260)
      	at com.atlassian.troubleshooting.stp.salext.AbstractSupportApplicationInfo.lambda$loadProperties$0(AbstractSupportApplicationInfo.java:185)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at com.atlassian.util.concurrent.ConcurrentOperationMapImpl$CallerRunsFuture.get(ConcurrentOperationMapImpl.java:65)
      	at com.atlassian.util.concurrent.ConcurrentOperationMapImpl.runOperation(ConcurrentOperationMapImpl.java:52)
      	at com.atlassian.troubleshooting.stp.salext.AbstractSupportApplicationInfo.loadProperties(AbstractSupportApplicationInfo.java:185)
      	at com.atlassian.troubleshooting.bitbucket.BitbucketApplicationInfo.saveProperties(BitbucketApplicationInfo.java:275)
      	at com.atlassian.troubleshooting.stp.salext.bundle.ApplicationPropertiesInfoBundle.getFiles(ApplicationPropertiesInfoBundle.java:42)
      	at com.atlassian.troubleshooting.stp.zip.ZipFileAppender.getFilesToZip(ZipFileAppender.java:104)
      	at com.atlassian.troubleshooting.stp.zip.ZipFileAppender.getInnerItems(ZipFileAppender.java:93)
      	at com.atlassian.troubleshooting.stp.zip.ZipFileAppender.getInnerItems(ZipFileAppender.java:39)
      	at com.atlassian.troubleshooting.stp.zip.NestedProgressTracker.process(NestedProgressTracker.java:42)
      	at com.atlassian.troubleshooting.stp.zip.CreateSupportZipTask.addSupportFilesToZip(CreateSupportZipTask.java:135)
      	at com.atlassian.troubleshooting.stp.zip.CreateSupportZipTask.lambda$null$0(CreateSupportZipTask.java:80)
      	at com.atlassian.troubleshooting.stp.zip.CreateSupportZipTask.writeSupportZipFile(CreateSupportZipTask.java:114)
      	at com.atlassian.troubleshooting.stp.zip.CreateSupportZipTask.lambda$call$1(CreateSupportZipTask.java:78)
      	at com.atlassian.stash.internal.user.DefaultEscalatedSecurityContext.call(DefaultEscalatedSecurityContext.java:59)
      	at com.atlassian.stash.internal.atst.SupportHostApplication$RunAsCallable.call(SupportHostApplication.java:62)
      	at com.atlassian.troubleshooting.stp.zip.CreateSupportZipTask.call(CreateSupportZipTask.java:90)
      	at com.atlassian.troubleshooting.stp.zip.CreateSupportZipTask.call(CreateSupportZipTask.java:35)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.lang.Thread.run(Thread.java:748)
      	... 12 frames trimmed
      Caused by: org.springframework.security.access.AccessDeniedException: Access is denied
      	at org.springframework.security.access.vote.AffirmativeBased.decide(AffirmativeBased.java:73)
      	... 32 common frames omitted
      

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

      Attachments

        Activity

          People

            mgoyal2@atlassian.com Manish
            mgoyal2@atlassian.com Manish
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: