Bamboo Specs scan fails with java.io.IOException: No such file or directory
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
The Bamboo Specs scan fails when Processing Specs within Docker container and after clicking View Error Log the below is present in the log:
1
2
3
4
5
6
7
8
9
10
11
12
16-Oct-2019 06:32:54 Unable to scan repository REPO (1111111) for Bamboo Specs
16-Oct-2019 06:32:54 com.atlassian.bamboo.repository.RepositoryException: Unable to scan repository REPO (1111111) for Bamboo Specs
16-Oct-2019 06:32:54 at com.atlassian.bamboo.configuration.external.RepositoryStoredSpecsServiceImpl.lambda$runSpecsWithDocker$9(RepositoryStoredSpecsServiceImpl.java:924)
16-Oct-2019 06:32:54 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
16-Oct-2019 06:32:54 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
16-Oct-2019 06:32:54 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
16-Oct-2019 06:32:54 at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:48)
16-Oct-2019 06:32:54 at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26)
16-Oct-2019 06:32:54 at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:17)
16-Oct-2019 06:32:54 at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:41)
16-Oct-2019 06:32:54 at java.lang.Thread.run(Thread.java:748)
16-Oct-2019 06:32:54 Caused by: com.spotify.docker.client.exceptions.DockerException: java.util.concurrent.ExecutionException: com.spotify.docker.client.shaded.javax.ws.rs.ProcessingException: java.io.IOException: No such file or directory
Diagnosis
Environment
Bamboo administration > Security Settings > Process Bamboo Specs in Docker is enabled
Cause
There can be a number of reasons:
Docker is not installed on the Bamboo Server
Docker is not started on the Bamboo Server
Solution
Docker is not installed on the Bamboo Server
Docker only needs to be installed on the Bamboo Server for Bamboo Specs processing within Docker to work. It does not need to be installed on agents for this purpose.
Install Docker on the Bamboo Server: https://docs.docker.com/install/
Ensure that the user that you use to run Bamboo is a member of the
docker
group: https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-userEnsure the path to Docker is correctly defined at Bamboo Administration >> Server Capabilities
Docker is not started on the Bamboo Server
Start the Docker daemon: https://docs.docker.com/config/daemon/systemd/
Workaround
Processing Bamboo Specs in a Docker container is a security feature as it isolates the environment in which the Java code which is in a Bamboo Spec is executed. This is an added layer of security and should only be disabled as a workaround if you understand the risk and trust Bamboo Spec code being committed to your repositories.
Disable Bamboo administration > Security Settings > Process Bamboo Specs in Docker
Was this helpful?