Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testcontainers: could not start container #866

Open
gcoremans opened this issue Dec 5, 2023 · 1 comment
Open

Testcontainers: could not start container #866

gcoremans opened this issue Dec 5, 2023 · 1 comment

Comments

@gcoremans
Copy link

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?

@arcuri82
Copy link
Collaborator

arcuri82 commented Dec 5, 2023

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants