EvoMaster icon indicating copy to clipboard operation
EvoMaster copied to clipboard

Testcontainers: could not start container

Open gcoremans opened this issue 2 years ago • 1 comments

Hi, I am working on the latest development versions of both EM and EMB, trying to test the system out to potentially build on it for my own research. For this purpose I built EM and the EMB spring-petclinic benchmark from source myself, and ran them from JARs:

  • java --add-opens java.base/java.net=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED -jar evomaster.jar
  • java -jar spring-petclinic-evomaster-runner.jar

Java version:

openjdk 17.0.8 2023-07-18
OpenJDK Runtime Environment (Red_Hat-17.0.8.0.7-1.fc38) (build 17.0.8+7)
OpenJDK 64-Bit Server VM (Red_Hat-17.0.8.0.7-1.fc38) (build 17.0.8+7, mixed mode, sharing)

EM is able to connect to the controller, but then after hanging on "initializing" fails with the following error (trace shortened for readability):

15:47:46.112 [main] ERROR 🐳 [testcontainers/ryuk:0.3.4] - Could not start container
com.github.dockerjava.api.exception.NotFoundException: Status 404: {"message":"No such container: 39a119fa215977c3e33a66d527df9c02ee13f07c2f820aa83a5387aa3113c7ac"}
	at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.execute(DefaultInvocationBuilder.java:241)
	at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.get(DefaultInvocationBuilder.java:202)
	at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.get(DefaultInvocationBuilder.java:74)
[...]
15:47:46.122 [main] ERROR 🐳 [testcontainers/ryuk:0.3.4] - There are no stdout/stderr logs available for the failed container
* [ERROR] EvoMaster process terminated abruptly. This is likely a bug in EvoMaster. Please copy&paste the following stacktrace, and create a new issue on https://github.com/EMResearch/EvoMaster/issues
java.lang.reflect.InvocationTargetException: invokedynamic: method=public void org.evomaster.core.problem.webfrontend.service.WebSampler.initialize(), target=org.evomaster.core.problem.webfrontend.service.WebSampler@17043b04
	at com.netflix.governator.lifecycle.LifecycleMethods.methodInvoke(LifecycleMethods.java:316)
	at com.netflix.governator.lifecycle.LifecycleMethods.methodInvoke(LifecycleMethods.java:298)
	at com.netflix.governator.lifecycle.LifecycleManager.startInstance(LifecycleManager.java:266)
[...]
Caused by: org.testcontainers.containers.ContainerLaunchException: Container startup failed
	at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:349)
	at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:322)
	at org.testcontainers.utility.RyukResourceReaper.maybeStart(RyukResourceReaper.java:78)
[...]
Caused by: com.github.dockerjava.api.exception.NotFoundException: Status 404: {"message":"No such container: 39a119fa215977c3e33a66d527df9c02ee13f07c2f820aa83a5387aa3113c7ac"}

	at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.execute(DefaultInvocationBuilder.java:241)
	at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.get(DefaultInvocationBuilder.java:202)
	at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.get(DefaultInvocationBuilder.java:74)
	at org.testcontainers.shaded.com.github.dockerjava.core.exec.InspectContainerCmdExec.execute(InspectContainerCmdExec.java:31)
[...]

This error seems rather bizarre to me, as it suggests that there is an issue connecting to the Docker daemon (which is running, and my user is in the docker group so access without sudo is possible), but the spring-petclinic benchmark does not seem to use testcontainers in its drivers anywhere, so I am not sure what causes this error.

Am I doing something wrong, or missing some dependency?

gcoremans avatar Dec 05 '23 15:12 gcoremans

Hi, thanks for your interest in EvoMaster. The spring-petclinic in EMB you are referring to is not a REST API, but a MVC Web application. Support for fuzzing Web GUIs is still work in progress. In this case, it is EvoMaster itself using Docker to start a Chrome browser (which seems failing in your case)

arcuri82 avatar Dec 05 '23 20:12 arcuri82