title: Timed out waiting for URL to be accessible error in the stack trace?
body: <p>I am using testcontainers. I have a springboot maven project . In my integration test I uses elastic search test container. I am getting an error when i run my integration test.</p>
  <pre><code>2021-03-25 13:06:29.048 ERROR   --- [           main] ?.e.c.11.2]                              : Could not start container
  
  org.testcontainers.containers.ContainerLaunchException: Timed out waiting for URL to be accessible (http://localhost:32779/ should return HTTP 200)
      at org.testcontainers.containers.wait.strategy.HttpWaitStrategy.waitUntilReady(HttpWaitStrategy.java:264)
      at org.testcontainers.containers.wait.strategy.AbstractWaitStrategy.waitUntilReady(AbstractWaitStrategy.java:35)
      at org.testcontainers.containers.GenericContainer.waitUntilContainerStarted(GenericContainer.java:892)
      at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:440)
      at org.testcontainers.containers.GenericContainer.lambda$doStart$0(GenericContainer.java:325)
      at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:81)
      at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:323)
      at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:311)
      at com.openmind.primecast.web.rest.MessageHistoryReportingResourceIntTest.startElasticServer(MessageHistoryReportingResourceIntTest.java:134)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
      at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
      at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
      at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
      at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
      at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:191)
      at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283)
      at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173)
      at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
      at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)
      at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
      at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
      at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
  
  2021-03-25 13:06:29.448 ERROR   --- [           main] ?.e.c.11.2]                              : Log output from the failed container:
  {&quot;type&quot;: &quot;server&quot;, &quot;timestamp&quot;: &quot;2021-03-25T13:06:28,166Z&quot;, &quot;level&quot;: &quot;INFO&quot;, &quot;component&quot;: &quot;o.e.n.Node&quot;, &quot;cluster.name&quot;: &quot;docker-cluster&quot;, &quot;node.name&quot;: &quot;968b0ad3adfb&quot;, &quot;message&quot;: &quot;version[7.11.2], pid[6], build[default/docker/3e5a16cfec50876d20ea77b075070932c6464c7d/2021-03-06T05:54:38.141101Z], OS[Linux/3.10.0-514.6.1.el7.x86_64/amd64], JVM[AdoptOpenJDK/OpenJDK 64-Bit Server VM/15.0.1/15.0.1+9]&quot; }
  {&quot;type&quot;: &quot;server&quot;, &quot;timestamp&quot;: &quot;2021-03-25T13:06:28,169Z&quot;, &quot;level&quot;: &quot;INFO&quot;, &quot;component&quot;: &quot;o.e.n.Node&quot;, &quot;cluster.name&quot;: &quot;docker-cluster&quot;, &quot;node.name&quot;: &quot;968b0ad3adfb&quot;, &quot;message&quot;: &quot;JVM home [/usr/share/elasticsearch/jdk], using bundled JDK [true]&quot; }
  {&quot;type&quot;: &quot;server&quot;, &quot;timestamp&quot;: &quot;2021-03-25T13:06:28,169Z&quot;, &quot;level&quot;: &quot;INFO&quot;, &quot;component&quot;: &quot;o.e.n.Node&quot;, &quot;cluster.name&quot;: &quot;docker-cluster&quot;, &quot;node.name&quot;: &quot;968b0ad3adfb&quot;, &quot;message&quot;: &quot;JVM arguments [-Xshare:auto, -Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -XX:+ShowCodeDetailsInExceptionMessages, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dio.netty.allocator.numDirectArenas=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.locale.providers=SPI,COMPAT, -XX:+UseG1GC, -Djava.io.tmpdir=/tmp/elasticsearch-16071601458555661130, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=data, -XX:ErrorFile=logs/hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m, -Des.cgroups.hierarchy.override=/, -Xms31744m, -Xmx31744m, -XX:MaxDirectMemorySize=16642998272, -XX:InitiatingHeapOccupancyPercent=30, -XX:G1ReservePercent=25, -Des.path.home=/usr/share/elasticsearch, -Des.path.conf=/usr/share/elasticsearch/config, -Des.distribution.flavor=default, -Des.distribution.type=docker, -Des.bundled_jdk=true]&quot; }
  
  Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 159.797 sec &lt;&lt;&lt; FAILURE! - in com.openmind.primecast.web.rest.MessageHistoryReportingResourceIntTest
  com.openmind.primecast.web.rest.MessageHistoryReportingResourceIntTest  Time elapsed: 159.781 sec  &lt;&lt;&lt; ERROR!
  org.testcontainers.containers.ContainerLaunchException: Container startup failed
      at org.testcontainers.containers.wait.strategy.HttpWaitStrategy.waitUntilReady(HttpWaitStrategy.java:264)
      at org.testcontainers.containers.wait.strategy.AbstractWaitStrategy.waitUntilReady(AbstractWaitStrategy.java:35)
      at org.testcontainers.containers.GenericContainer.waitUntilContainerStarted(GenericContainer.java:892)
      at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:440)
      at org.testcontainers.containers.GenericContainer.lambda$doStart$0(GenericContainer.java:325)
      at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:81)
      at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:323)
      at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:311)
      at com.openmind.primecast.web.rest.MessageHistoryReportingResourceIntTest.startElasticServer(MessageHistoryReportingResourceIntTest.java:134)
  </code></pre>
  <p>this is how i create my test container from the Junit test.</p>
  <pre><code>   MessageHistoryReportingResourceIntTest {
          /**
           * Elasticsearch version which should be used for the Tests
           */
          private static final String ELASTICSEARCH_VERSION = &quot;7.11.2&quot;;
      
          private static final DockerImageName ELASTICSEARCH_IMAGE = DockerImageName
                  .parse(&quot;docker.elastic.co/elasticsearch/elasticsearch&quot;).withTag(ELASTICSEARCH_VERSION);
      
      @BeforeClass
          public static void startElasticServer() throws Exception {
              container = new ElasticsearchContainer(ELASTICSEARCH_IMAGE);
              container.start();
      }
  }
  </code></pre>
  <p>appreciate if you can help</p>
  <p>thank you</p>