[Bug]: Could not start container when running in Jenkins #7959
-
ModuleCore Testcontainers version1.19.2 Using the latest Testcontainers version?Yes Host OSUnsure Host ArchUnsure Docker versionClient: Docker Engine - Community
Version: 20.10.13
API version: 1.41
Go version: go1.16.15
Git commit: a224086
Built: Thu Mar 10 14:08:00 2022
OS/Arch: linux/amd64
Context: default
Experimental: true
Server:
Engine:
Version: 20.10.23
API version: 1.41 (minimum version 1.12)
Go version: go1.18.9
Git commit: 6051f14
Built: Tue Apr 11 22:57:17 2023
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.19
GitCommit: 1e1ea6e986c6c86565bc33d52e34b81b3e2bc71f
runc:
Version: 1.1.4
GitCommit: 5fd4c4d144137e991c4acebb2146ab1483a97925
docker-init:
Version: 0.19.0
GitCommit: de40ad0 What happened?I'm using GenericContainer to pull an image from my private registry (aws) and it works fine locally, but as soon as I add a build step to jenkins to trigger the exact same test with the exact same logic - it fails: @Testcontainers
@SpringBootTest(classes = SpringTestConfig.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@ExtendWith(TestResultLoggerExtension.class)
@ExtendWith(OutputCaptureExtension.class)
@ExtendWith(MockitoExtension.class)
@ActiveProfiles("test")
class MyTest {
@Container
static GenericContainer simulator = new GenericContainer(DockerImageName.parse(DOCKER_IMAGE))
.withStartupTimeout(Duration.ofSeconds(300))
.withExposedPorts(3000); I've tried numerous configurations for the generic container that I found from other people having similar issues:
I've injected following env variables in jenkins podTemplate:
I'm out of options here. How do I make my test work in jenkins? Relevant log outputNo prefix is configured
Did not find a substitute image for xxxxxxxxxxxx.dkr.ecr.eu-west-1.amazonaws.com/my-app:latest (using image substitutor: DefaultImageNameSubstitutor (composite of 'ConfigurationFileImageNameSubstitutor' and 'PrefixingImageNameSubstitutor'))
Using locally available and not pulling image: xxxxxxxxxxxx.dkr.ecr.eu-west-1.amazonaws.com/my-app:latest
Creating container for image: xxxxxxxxxxxx.dkr.ecr.eu-west-1.amazonaws.com/my-app:latest
Looking up auth config for image: xxxxxxxxxxxx.dkr.ecr.eu-west-1.amazonaws.com/my-app:latest at registry: xxxxxxxxxxxx.dkr.ecr.eu-west-1.amazonaws.com
Cached auth found: [AuthConfig{username=AWS, password=hidden non-blank value, auth=hidden non-blank value, email=null, registryAddress=xxxxxxxxxxx.dkr.ecr.eu-west-1.amazonaws.com, registryToken=blank}]
Effective auth config [AuthConfig{username=AWS, password=hidden non-blank value, auth=hidden non-blank value, email=null, registryAddress=xxxxxxxxxxx.dkr.ecr.eu-west-1.amazonaws.com, registryToken=blank}]
Cmd: org.testcontainers.shaded.com.github.dockerjava.core.command.CreateContainerCmdImpl@fe337[aliases=<null>,argsEscaped=<null>,attachStderr=<null>,attachStdin=<null>,attachStdout=<null>,authConfig=AuthConfig(username=AWS, email=null, registryAddress=xxxxxxxxxxx.dkr.ecr.eu-west-1.amazonaws.com, stackOrchestrator=null),cmd={},domainName=<null>,entrypoint=<null>,env={},exposedPorts=ExposedPorts(exposedPorts=[3000/tcp]),healthcheck=<null>,hostConfig=HostConfig(binds=[], blkioWeight=null, blkioWeightDevice=null, blkioDeviceReadBps=null, blkioDeviceWriteBps=null, blkioDeviceReadIOps=null, blkioDeviceWriteIOps=null, memorySwappiness=null, nanoCPUs=null, capAdd=null, capDrop=null, containerIDFile=null, cpuPeriod=null, cpuRealtimePeriod=null, cpuRealtimeRuntime=null, cpuShares=null, cpuQuota=null, cpusetCpus=null, cpusetMems=null, devices=null, deviceCgroupRules=null, deviceRequests=null, diskQuota=null, dns=null, dnsOptions=null, dnsSearch=null, extraHosts=[], groupAdd=null, ipcMode=null, cgroup=null, links=[], logConfig=LogConfig(type=null, config=null), lxcConf=null, memory=null, memorySwap=null, memoryReservation=null, kernelMemory=null, networkMode=null, oomKillDisable=null, init=null, autoRemove=null, oomScoreAdj=null, portBindings={3000/tcp=[Lcom.github.dockerjava.api.model.Ports$Binding;@1a5c0b8}, privileged=null, publishAllPorts=null, readonlyRootfs=null, restartPolicy=null, ulimits=null, cpuCount=null, cpuPercent=null, ioMaximumIOps=null, ioMaximumBandwidth=null, volumesFrom=[], mounts=null, pidMode=null, isolation=null, securityOpts=null, storageOpt=null, cgroupParent=null, volumeDriver=null, shmSize=null, pidsLimit=null, runtime=null, tmpFs=null, utSMode=null, usernsMode=null, sysctls=null, consoleSize=null, cgroupnsMode=null),hostName=<null>,image=xxxxxxxxxxx.dkr.ecr.eu-west-1.amazonaws.com/my-app:latest,ipv4Address=<null>,ipv6Address=<null>,labels={org.testcontainers=true, org.testcontainers.lang=java, org.testcontainers.version=1.19.2, org.testcontainers.sessionId=cad267db-d1a6-4901-90c2-dd3dd207f92c},macAddress=<null>,name=<null>,networkDisabled=<null>,networkingConfig=<null>,onBuild=<null>,platform=<null>,portSpecs=<null>,shell=<null>,stdInOnce=<null>,stdinOpen=<null>,stopSignal=<null>,stopTimeout=<null>,tty=<null>,user=<null>,volumes=Volumes(volumes=[]),workingDir=<null>]
Container xxxxxxxxxxx.dkr.ecr.eu-west-1.amazonaws.com/my-app:latest is starting: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Cmd: 9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7,false
GET: DefaultWebTarget{path=[/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/json], queryParams={}}
Could not start container
org.testcontainers.shaded.org.awaitility.core.ConditionTimeoutException: org.testcontainers.containers.GenericContainer expected the predicate to return <true> but it returned <false> for input of <InspectContainerResponse(args=[./app.js], config=ContainerConfig(attachStderr=false, attachStdin=false, attachStdout=false, cmd=[./app.js], domainName=, entrypoint=[/nodejs/bin/node], env=[PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin, SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt], exposedPorts=[3000/tcp], hostName=9febf514b943, image=xxxxxxxxxxx.dkr.ecr.eu-west-1.amazonaws.com/my-app:latest, labels={org.testcontainers=true, org.testcontainers.lang=java, org.testcontainers.sessionId=cad267db-d1a6-4901-90c2-dd3dd207f92c, org.testcontainers.version=1.19.2}, macAddress=null, networkDisabled=true, onBuild=null, stdinOpen=false, portSpecs=null, stdInOnce=false, tty=false, user=0, volumes=null, workingDir=/app, healthCheck=null), created=2023-11-29T23:17:56.614594906Z, driver=overlay2, execDriver=null, hostConfig=HostConfig(binds=[], blkioWeight=0, blkioWeightDevice=null, blkioDeviceReadBps=null, blkioDeviceWriteBps=null, blkioDeviceReadIOps=null, blkioDeviceWriteIOps=null, memorySwappiness=null, nanoCPUs=0, capAdd=null, capDrop=null, containerIDFile=, cpuPeriod=0, cpuRealtimePeriod=0, cpuRealtimeRuntime=0, cpuShares=0, cpuQuota=0, cpusetCpus=, cpusetMems=, devices=null, deviceCgroupRules=null, deviceRequests=null, diskQuota=null, dns=null, dnsOptions=null, dnsSearch=null, extraHosts=[], groupAdd=null, ipcMode=shareable, cgroup=, links=[], logConfig=LogConfig(type=json-file, config={max-file=10, max-size=10m}), lxcConf=null, memory=0, memorySwap=0, memoryReservation=0, kernelMemory=0, networkMode=default, oomKillDisable=false, init=null, autoRemove=false, oomScoreAdj=0, portBindings={3000/tcp=[Lcom.github.dockerjava.api.model.Ports$Binding;@443b9ebb}, privileged=false, publishAllPorts=false, readonlyRootfs=false, restartPolicy=no, ulimits=[Ulimit(name=memlock, soft=-1, hard=-1)], cpuCount=0, cpuPercent=0, ioMaximumIOps=0, ioMaximumBandwidth=0, volumesFrom=[], mounts=null, pidMode=, isolation=null, securityOpts=null, storageOpt=null, cgroupParent=, volumeDriver=, shmSize=67108864, pidsLimit=null, runtime=runc, tmpFs=null, utSMode=, usernsMode=, sysctls=null, consoleSize=[0, 0], cgroupnsMode=host), hostnamePath=/var/lib/docker/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/hostname, hostsPath=/var/lib/docker/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/hosts, logPath=/var/lib/docker/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7-json.log, id=9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7, sizeRootFs=null, sizeRw=null, imageId=sha256:3e490510cadbd80fc708e009ed2c336f7628e8637226eded231b004701ea6e0a, mountLabel=, name=/confident_thompson, restartCount=0, networkSettings=NetworkSettings(bridge=, sandboxId=8c110a9dffce4ed19885e3bb8ffb48b4d8a8d0d6f840ecdf3049a907611319c0, hairpinMode=false, linkLocalIPv6Address=, linkLocalIPv6PrefixLen=0, ports={}, sandboxKey=/var/run/docker/netns/8c110a9dffce, secondaryIPAddresses=null, secondaryIPv6Addresses=null, endpointID=, gateway=, portMapping=null, globalIPv6Address=, globalIPv6PrefixLen=0, ipAddress=, ipPrefixLen=0, ipV6Gateway=, macAddress=, networks={bridge=ContainerNetwork(ipamConfig=null, links=[], aliases=null, networkID=, endpointId=, gateway=, ipAddress=, ipPrefixLen=0, ipV6Gateway=, globalIPv6Address=, globalIPv6PrefixLen=0, macAddress=)}), path=/nodejs/bin/node, processLabel=, resolvConfPath=/var/lib/docker/containers/9febf514b94322d551c96519d2ba29126d7841f6364b92ce190f0d17653de6a7/resolv.conf, execIds=null, state=InspectContainerResponse.ContainerState(status=running, running=true, paused=false, restarting=false, oomKilled=false, dead=false, pid=17815, exitCode=0, error=, startedAt=2023-11-29T23:17:56.88205876Z, finishedAt=0001-01-01T00:00:00Z, health=null), volumes=null, volumesRW=null, node=null, mounts=[], graphDriver=GraphDriver(name=overlay2, data=GraphData(rootDir=null, deviceId=null, deviceName=null, deviceSize=null, dir=null)), platform=linux)> within 5 seconds.
at org.testcontainers.shaded.org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
at org.testcontainers.shaded.org.awaitility.core.AbstractHamcrestCondition.await(AbstractHamcrestCondition.java:86)
at org.testcontainers.shaded.org.awaitility.core.ConditionFactory.until(ConditionFactory.java:985)
at org.testcontainers.shaded.org.awaitility.core.ConditionFactory.until(ConditionFactory.java:691)
at org.testcontainers.shaded.org.awaitility.core.ConditionFactory.until(ConditionFactory.java:708)
at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:469)
at org.testcontainers.containers.GenericContainer.lambda$doStart$0(GenericContainer.java:357)
at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:81)
at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:347)
at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:333)
at org.testcontainers.junit.jupiter.TestcontainersExtension$StoreAdapter.start(TestcontainersExtension.java:280)
at org.testcontainers.junit.jupiter.TestcontainersExtension$StoreAdapter.access$200(TestcontainersExtension.java:267)
at org.testcontainers.junit.jupiter.TestcontainersExtension.lambda$null$4(TestcontainersExtension.java:82)
at org.junit.jupiter.engine.execution.ExtensionValuesStore.lambda$getOrComputeIfAbsent$4(ExtensionValuesStore.java:86)
at org.junit.jupiter.engine.execution.ExtensionValuesStore$MemoizingSupplier.computeValue(ExtensionValuesStore.java:223)
at org.junit.jupiter.engine.execution.ExtensionValuesStore$MemoizingSupplier.get(ExtensionValuesStore.java:211)
at org.junit.jupiter.engine.execution.ExtensionValuesStore$StoredValue.evaluate(ExtensionValuesStore.java:191)
at org.junit.jupiter.engine.execution.ExtensionValuesStore$StoredValue.access$100(ExtensionValuesStore.java:171)
at org.junit.jupiter.engine.execution.ExtensionValuesStore.getOrComputeIfAbsent(ExtensionValuesStore.java:89)
at org.junit.jupiter.engine.execution.NamespaceAwareStore.getOrComputeIfAbsent(NamespaceAwareStore.java:53)
at org.testcontainers.junit.jupiter.TestcontainersExtension.lambda$startContainers$5(TestcontainersExtension.java:82)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at org.testcontainers.junit.jupiter.TestcontainersExtension.startContainers(TestcontainersExtension.java:82)
at org.testcontainers.junit.jupiter.TestcontainersExtension.beforeAll(TestcontainersExtension.java:56)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllCallbacks$12(ClassBasedTestDescriptor.java:395)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeBeforeAllCallbacks(ClassBasedTestDescriptor.java:395)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:211)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:84)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:148)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:147)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53)
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.execute(JUnitPlatformProvider.java:188)
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:154)
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:128)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:428)
at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:562)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:548)
Log output from the failed container:
server loaded
Example app listening on port 3000 Additional InformationThe weird thing I spotted in the log is that it says my server is actually up and running but actually not? From the last 3 lines from the "Relevant log output":
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @Delice0, the right wait strategy should be defined to set the ready state of the service. There are different such as I wonder if the env vars your are setting for Testcontainers are causing the issue. Also, check this blogpost. |
Beta Was this translation helpful? Give feedback.
-
Thanks @eddumelendez Here are the changes that I did to my jenkinsfile in order for it to work for anyone having similar issues:
|
Beta Was this translation helpful? Give feedback.
Hi @Delice0, the right wait strategy should be defined to set the ready state of the service. There are different such as
Wait.forHttp
,Wait.forHttps
,Wait.forListeningPort
,Wait.forLogMessage
.I wonder if the env vars your are setting for Testcontainers are causing the issue.
TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE
value points to a well known docker socket location that Testcontainers will look for, so can be omitted.Also, check this blogpost.