[Bug]: Inconsistent "As no valid configuration was found, execution cannot continue. " on GitHub Actions runner

オープン
#10,788 コメント 3 件 リアクション 1 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
38/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
静か
技術スタック
docker, github-actions, java
領域
ci-cd, testing-qa

調査の方向性

スタックトレースに記載されているエントリーポイントである DockerClientProviderStrategy.getFirstValidStrategy と DockerClientFactory.getOrInitializeStrategy から始めてください。リンクされている GitHub Actions の実行結果と Docker/Testcontainers のログを比較し、有効な環境が断続的に見逃される理由を特定してください。原因を再現でき、動作が修正されるか、GitHub Actions での検証を伴って明確に文書化されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

type/bug
Module

Core

Testcontainers version

1.21.3

Using the latest Testcontainers version?

Yes

Host OS

ubuntu-22.04

Host Arch

x86

Docker version
Client: Docker Engine - Community
 Version:           28.0.4
 API version:       1.48
 Go version:        go1.23.7
 Git commit:        b8034c0
 Built:             Tue Mar 25 15:07:11 2025
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          28.0.4
  API version:      1.48 (minimum version 1.24)
  Go version:       go1.23.7
  Git commit:       6430e49
  Built:            Tue Mar 25 15:07:11 2025
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.7.27
  GitCommit:        05044ec0a9a75232cad458027ca83437aae3f4da
 runc:
  Version:          1.2.5
  GitCommit:        v1.2.5-0-g59923ef
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
What happened?

I have a Gradle build service that uses Testcontainers.
When running tests locally, everything works reliably.

However, when running the same tests on GitHub Actions, I will inconsistently get "Could not find a valid Docker environment." errors.
It is inconsistent between runs; if I "Re-run jobs" enough times I can eventually produce a run that works.

The attached Gradle Build Scans are from the GHA workflows targeting the same commit, the only difference was a retry.

Note: Run 2 (when Testcontainers did start) has failing tests. These are unrelated, the important part is that the tests were successfully able to run.

Relevant log output
Could not find a valid Docker environment. Please check configuration. Attempted configurations were:	
As no valid configuration was found, execution cannot continue.	
See https://java.testcontainers.org/on_failure.html for more details.

Caused by: java.lang.IllegalStateException: Could not find a valid Docker environment. Please see logs and check configuration	
at org.testcontainers.dockerclient.DockerClientProviderStrategy.lambda$getFirstValidStrategy$7(DockerClientProviderStrategy.java:274)	
at org.testcontainers.dockerclient.DockerClientProviderStrategy.getFirstValidStrategy(DockerClientProviderStrategy.java:265)	
at org.testcontainers.DockerClientFactory.getOrInitializeStrategy(DockerClientFactory.java:154)	
at org.testcontainers.DockerClientFactory.client(DockerClientFactory.java:196)	
at org.testcontainers.DockerClientFactory$1.getDockerClient(DockerClientFactory.java:108)	
at com.github.dockerjava.api.DockerClientDelegate.authConfig(DockerClientDelegate.java:109)	
at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:321)	
at com.mussonindustrial.ignition.embr.e2e.env.TestEnvironmentService$start$1.accept(TestEnvironmentService.kt:54)	
at com.mussonindustrial.ignition.embr.e2e.env.TestEnvironmentService$start$1.accept(TestEnvironmentService.kt:54)
Additional Information
Run Result GitHub Actions Attempt Gradle Build Scan
1) Initial Run Testcontainers failed to start Link Gradle Build Scan
2) After a Retry Testcontainers started Link Gradle Build Scan
主要言語
Java
スター
8.8k
フォーク
2k
平均マージ
2日 1時間
マージ済み PR(30日)
11

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

testcontainers/testcontainers-java のほかの issue

testcontainers/testcontainers-java の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。