Bamboo Specs repository scan fails with java.io.IOException: No such file or directory when Process Specs in Docker is enabled

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

問題

Bamboo Specs repository scan fails with java.io.IOException: No such file or directory when Process Specs in Docker is enabled.

The following appears when viewing the error log produced by Bamboo Specs from the UI:

Processing Specs within Docker containerUnable to scan repository for Bamboo Specs
com.atlassian.bamboo.repository.RepositoryException: Unable to scan repository for Bamboo Specs
	at com.atlassian.bamboo.configuration.external.RepositoryStoredSpecsServiceImpl.lambda$runSpecsWithDocker$8(RepositoryStoredSpecsServiceImpl.java:739)
...
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
	at com.spotify.docker.client.DefaultDockerClient.propagate(DefaultDockerClient.java:2702)
...
Caused by: com.spotify.docker.client.shaded.javax.ws.rs.ProcessingException: java.io.IOException: No such file or directory
	at com.spotify.docker.client.shaded.org.glassfish.jersey.apache.connector.ApacheConnector.apply(ApacheConnector.java:481)
	at com.spotify.docker.client.shaded.org.glassfish.jersey.apache.connector.ApacheConnector$1.run(ApacheConnector.java:491)
...
Caused by: java.io.IOException: No such file or directory
	at jnr.unixsocket.UnixSocketChannel.doConnect(UnixSocketChannel.java:127)
	at jnr.unixsocket.UnixSocketChannel.connect(UnixSocketChannel.java:136)
	at jnr.unixsocket.UnixSocketChannel.connect(UnixSocketChannel.java:223)
...

原因

The security feature Process Bamboo Specs in Docker is enabled on your instance but Docker is not installed on your Bamboo Server / the Docker socket cannot be found at the default location : /var/run/docker.sock

回避策

While not recommended, you can disable the security feature at Bamboo Administration >> Security >> Process Bamboo Specs in Docker. Once disabled, Bamboo Specs will no longer attempt to be processed inside a Docker container and will be executed within the Bamboo Server environment instead.

ソリューション

Option 1: Install Docker

Install Docker on the Bamboo Server: https://docs.docker.com/install/

Option 2: If your Docker socket is at a non-default location

You can specify the location of the docker socket by setting the environment variable DOCKER_HOST and making it available to the user running your Bamboo Server to the correct path. Bamboo Server will need to be restarted to inherit the new DOCKER_HOST value.

説明Bamboo Specs repository scan fails with java.io.IOException: No such file or directory when Process Specs in Docker is enabled.
製品Bamboo
最終更新日 2018 年 11 月 7 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.