Repository Stored Spec (Bamboo Specs) scanning fails with NotFoundException: Either container {container.id} or path /mnt/input not found
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
Repository Stored Specs scanning fails with com.spotify.docker.client.exceptions.NotFoundException: Either container {
container.id
} or path /mnt/input not found
error.
Environment
Docker version < 1.8
Diagnosis
The below is present in the $BAMBOO_HOME/logs/atlassian-bamboo.log
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
2019-11-05 13:49:47,275 INFO [15-BAM::SpecsDetection:pool-22-thread-3] [RssDetectionRunnable] Exception while executing RSS detection for repository 102826190
java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: Unable to scan repository BambooSpecs ({repository.id}) for Bamboo Specs
at com.google.common.base.Throwables.propagate(Throwables.java:160)
at com.atlassian.bamboo.configuration.external.RepositoryStoredSpecsServiceImpl.generateBambooYamlsFromSpecs(RepositoryStoredSpecsServiceImpl.java:505)
at com.atlassian.bamboo.configuration.external.RepositoryStoredSpecsServiceImpl.processSpecs(RepositoryStoredSpecsServiceImpl.java:396)
at com.atlassian.bamboo.configuration.external.RepositoryStoredSpecsServiceImpl.runBambooSpecs(RepositoryStoredSpecsServiceImpl.java:284)
at com.atlassian.bamboo.configuration.external.RssDetectionServiceImpl.runRssDetection(RssDetectionServiceImpl.java:262)
at com.atlassian.bamboo.configuration.external.detection.RssDetectionRunnable.run(RssDetectionRunnable.java:42)
...
at java.lang.Thread.run(Thread.java:745)
Caused by: com.atlassian.bamboo.repository.RepositoryException: Unable to scan repository BambooSpecs ({repository.id}) for Bamboo Specs
at com.atlassian.bamboo.configuration.external.RepositoryStoredSpecsServiceImpl.lambda$runSpecsWithDocker$8(RepositoryStoredSpecsServiceImpl.java:750)
... 8 more
Caused by: com.spotify.docker.client.exceptions.NotFoundException: Either container {container.id} or path /mnt/input not found.
at com.spotify.docker.client.DefaultDockerClient.copyToContainer(DefaultDockerClient.java:1041)
at com.spotify.docker.client.DefaultDockerClient.copyToContainer(DefaultDockerClient.java:1015)
at com.atlassian.bamboo.configuration.external.RepositoryStoredSpecsServiceImpl.lambda$runSpecsWithDocker$8(RepositoryStoredSpecsServiceImpl.java:716)
... 8 more
Caused by: com.spotify.docker.client.exceptions.DockerRequestException: Request error: PUT unix://localhost:80/containers/{container.id}/archive?noOverwriteDirNonDir=true&path=%2Fmnt%2Finput: 404, body: 404 page not found
at com.spotify.docker.client.DefaultDockerClient.propagate(DefaultDockerClient.java:2820)
at com.spotify.docker.client.DefaultDockerClient.request(DefaultDockerClient.java:2703)
at com.spotify.docker.client.DefaultDockerClient.copyToContainer(DefaultDockerClient.java:1030)
... 10 more
Caused by: com.spotify.docker.client.shaded.javax.ws.rs.NotFoundException: HTTP 404 Not Found
at com.spotify.docker.client.shaded.org.glassfish.jersey.client.JerseyInvocation.convertToException(JerseyInvocation.java:1008)
...
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
... 1 more
Cause
Repository Stored Specs are processed within a Docker container for an added layer of security so that Java code is executed within an environment isolated from your Bamboo Server. This error is encountered on older Docker versions due to use of an API that did not yet exist:
Docker versions < 1.8 run with Docker API version < 1.19 which does not have the PUT /containers/id/archive
endpoint:
It was first included in Docker API version v1.20 which was released with Docker 1.8:
Workaround
⚠️ If you follow this workaround; Bamboo Specs will now execute Java code within the Spec directly on your Bamboo server. While our security manager protects certain functions, processing the spec within Docker provides an added layer of security and isolation which you will unfortunately lose by disabling this.
Disable Bamboo Specs processing within Docker: Bamboo Administration >> Overview >> Security >> Click (Edit) at the bottom to unlock the options >> Process Bamboo Specs in Docker
Solution
Upgrade to a supported version of Docker for your version of Bamboo:
At the time of writing, for Bamboo 6.10.x the minimum supported Docker version is 17.07.
Was this helpful?