Unable to use Bamboo Specs -- scanning never finishes

Hello! We're using Bamboo v6.9 with BitBucket Server and haven't had any luck using Bamboo Specs. When we enable Bamboo Spec scanning on a linked repository, it simply says "Scanning in progress..." and never finishes. Looking in the logs I see this:

 

2019-07-26 13:31:40,179 WARN [15-BAM::SpecsDetection:pool-23-thread-4] [AbstractGitExecutor] Deleting directory /opt/bamboo/build/serverSide/REPOSITORY_STORED_SPECS/repository-243695697/checkout
2019-07-26 13:31:40,187 INFO [15-BAM::SpecsDetection:pool-23-thread-4] [RssDetectionRunnable] Exception while executing RSS detection for repository 243695697
com.atlassian.bamboo.plugins.stash.repository.StashRepositoryException: com.atlassian.bamboo.plugins.git.GitCommandException: command [/usr/bin/git remote set-url origin file:///opt/bamboo/build/_git-repositories-cache/6056de3f10a08f7dbda5812e3892f39f8935a8a6] failed with code 128. Working directory was [/opt/bamboo/build/serverSide/REPOSITORY_STORED_SPECS/repository-243695697/checkout]., stderr:
fatal: Not a git repository (or any of the parent directories): .git
at com.atlassian.bamboo.plugins.stash.v2.BitbucketServerWorkingCopyManager.updateToLatestRevision(BitbucketServerWorkingCopyManager.java:149)
at com.atlassian.bamboo.configuration.external.RepositoryStoredSpecsServiceImpl.lambda$runBambooSpecs$0(RepositoryStoredSpecsServiceImpl.java:255)
at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:207)
at com.atlassian.bamboo.configuration.external.RepositoryStoredSpecsServiceImpl.lambda$runBambooSpecs$1(RepositoryStoredSpecsServiceImpl.java:259)
at com.atlassian.bamboo.util.CacheAwareness.withValuesOlderThanTimestampReloaded(CacheAwareness.java:126)
at com.atlassian.bamboo.configuration.external.RepositoryStoredSpecsServiceImpl.runBambooSpecs(RepositoryStoredSpecsServiceImpl.java:257)
at com.atlassian.bamboo.configuration.external.RssDetectionServiceImpl.runRssDetection(RssDetectionServiceImpl.java:267)
at com.atlassian.bamboo.configuration.external.detection.RssDetectionRunnable.run(RssDetectionRunnable.java:42)
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.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:48)
at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26)
at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:17)
at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:41)
at java.lang.Thread.run(Thread.java:748)
Caused by: com.atlassian.bamboo.plugins.git.GitCommandException: command [/usr/bin/git remote set-url origin file:///opt/bamboo/build/_git-repositories-cache/6056de3f10a08f7dbda5812e3892f39f8935a8a6] failed with code 128. Working directory was [/opt/bamboo/build/serverSide/REPOSITORY_STORED_SPECS/repository-243695697/checkout]., stderr:
fatal: Not a git repository (or any of the parent directories): .git
at com.atlassian.bamboo.plugins.git.GitCommandProcessor.runCommand(GitCommandProcessor.java:723)
at com.atlassian.bamboo.plugins.git.GitCommandProcessor.runCommand(GitCommandProcessor.java:652)
at com.atlassian.bamboo.plugins.git.GitCommandProcessor.runCommand(GitCommandProcessor.java:643)
at com.atlassian.bamboo.plugins.git.GitCommandProcessor.setOrigin(GitCommandProcessor.java:553)
at com.atlassian.bamboo.plugins.git.GitCommandProcessor.setOriginToLocalDirectory(GitCommandProcessor.java:610)
at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper.checkout(NativeGitOperationHelper.java:498)
at com.atlassian.bamboo.plugins.git.v2.GitWorkingCopyManager.lambda$checkout$1(GitWorkingCopyManager.java:264)
at io.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:293)
at com.atlassian.bamboo.plugins.git.v2.GitWorkingCopyManager.checkout(GitWorkingCopyManager.java:244)
at com.atlassian.bamboo.plugins.git.v2.GitWorkingCopyManager.updateToLatestRevision(GitWorkingCopyManager.java:116)
at com.atlassian.bamboo.plugins.stash.v2.BitbucketServerWorkingCopyManager.updateToLatestRevision(BitbucketServerWorkingCopyManager.java:145)
... 16 more

 

Anyone encounter this before and have any suggestions?

Thanks!

1 answer

1 accepted

1 vote
Answer accepted
Daniel Santos
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jul 29, 2019

Hi @Matthew Lieder

I've seen a similar issue and it was caused by the Git version installed in the Bamboo server.

  • Do you mind checking the Git version and sharing it with us? 
    Even better if you can update it and check if this problem will still persist it would be great.
  • Have you tried to delete the repository case through Admin >> Repository Settings >> (affected repository) >> Delete ?

Haha! We actually just discovered that ourselves too :). The version of Git on our Bamboo server was an ancient 1.7.1 (!!!) and after upgrading it the error went away and specs started loading. Thanks! Hopefully now that this error is documented here with a solution it will help others with the same issue.

Daniel Santos
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jul 29, 2019

For sure @Matthew Lieder!
Thank you very much for sharing your issue, logs and following up with the solution.
Have a good one!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events