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

Execute jmh test failed #6409

Open
huange7 opened this issue Apr 26, 2024 · 3 comments
Open

Execute jmh test failed #6409

huange7 opened this issue Apr 26, 2024 · 3 comments
Assignees
Labels
Bug Something isn't working

Comments

@huange7
Copy link

huange7 commented Apr 26, 2024

Describe the bug
When I execute java -jar libs/opentelemetry-sdk-trace-*-jmh.jar -rf json ExporterBenchmark locally, an error occurs during the run:

org.testcontainers.containers.ContainerLaunchException: Container startup failed for image otel/opentelemetry-collector-dev:latest
        at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:362)
        at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:333)
        at io.opentelemetry.sdk.trace.ExporterBenchmark$AbstractProcessorBenchmark.setup(ExporterBenchmark.java:57)
        at io.opentelemetry.sdk.trace.jmh_generated.ExporterBenchmark_OtlpBenchmark_createAndExportSpan_jmhTest._jmh_tryInit_f_otlpbenchmark0_G(ExporterBenchmark_OtlpBenchmark_createAndExportSpan_jmhTest.java:440)
        at io.opentelemetry.sdk.trace.jmh_generated.ExporterBenchmark_OtlpBenchmark_createAndExportSpan_jmhTest.createAndExportSpan_AverageTime(ExporterBenchmark_OtlpBenchmark_createAndExportSpan_jmhTest.java:163)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at org.openjdk.jmh.runner.BenchmarkHandler$BenchmarkTask.call(BenchmarkHandler.java:527)
        at org.openjdk.jmh.runner.BenchmarkHandler$BenchmarkTask.call(BenchmarkHandler.java:504)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: org.rnorth.ducttape.RetryCountExceededException: Retry limit hit with exception
        at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:88)
        at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:347)
        ... 16 more
Caused by: org.testcontainers.containers.ContainerLaunchException: Could not create/start container
        at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:566)
        at org.testcontainers.containers.GenericContainer.lambda$doStart$0(GenericContainer.java:357)
        at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:81)
        ... 17 more
Caused by: java.lang.IllegalStateException: Wait strategy failed. Container exited with code 1
        at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:536)
        ... 19 more
Caused by: org.testcontainers.containers.ContainerLaunchException: Timed out waiting for URL to be accessible (http://localhost:32826/ should return HTTP 200)
        at org.testcontainers.containers.wait.strategy.HttpWaitStrategy.waitUntilReady(HttpWaitStrategy.java:320)
        at org.testcontainers.containers.wait.strategy.AbstractWaitStrategy.waitUntilReady(AbstractWaitStrategy.java:52)
        at org.testcontainers.containers.GenericContainer.waitUntilContainerStarted(GenericContainer.java:912)
        at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:503)
        ... 19 more
Caused by: org.rnorth.ducttape.TimeoutException: Timeout waiting for result with exception
        at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:54)
        at org.testcontainers.containers.wait.strategy.HttpWaitStrategy.waitUntilReady(HttpWaitStrategy.java:252)
        ... 22 more
Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused
        at org.testcontainers.containers.wait.strategy.HttpWaitStrategy.lambda$null$6(HttpWaitStrategy.java:312)
        at org.rnorth.ducttape.ratelimits.RateLimiter.doWhenReady(RateLimiter.java:27)
        at org.testcontainers.containers.wait.strategy.HttpWaitStrategy.lambda$waitUntilReady$7(HttpWaitStrategy.java:257)
        at org.rnorth.ducttape.unreliables.Unreliables.lambda$retryUntilSuccess$0(Unreliables.java:43)
        ... 4 more
Caused by: java.net.ConnectException: Connection refused
        at java.base/sun.nio.ch.Net.connect0(Native Method)
        at java.base/sun.nio.ch.Net.connect(Net.java:579)
        at java.base/sun.nio.ch.Net.connect(Net.java:568)
        at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:593)
        at java.base/java.net.Socket.connect(Socket.java:633)
        at java.base/java.net.Socket.connect(Socket.java:583)
        at java.base/sun.net.NetworkClient.doConnect(NetworkClient.java:183)
        at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:533)
        at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:638)
        at java.base/sun.net.www.http.HttpClient.<init>(HttpClient.java:281)
        at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:386)
        at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:408)
        at java.base/sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1309)
        at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1242)
        at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1128)
        at java.base/sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:1057)
        at org.testcontainers.containers.wait.strategy.HttpWaitStrategy.lambda$null$6(HttpWaitStrategy.java:274)
        ... 7 more

Upon investigation, I found that when jmh initiates the container, it attempts to start the health_check extension, which does not exist in otel/opentelemetry-collector-dev:latest, causing a startup error:

2024-04-26T05:03:59.921Z        info    service/collector.go:303        Starting otelcol...     {"Version": "v0.33.0-50-g0594aa1a", "NumCPU": 8}
2024-04-26T05:03:59.921Z        info    service/collector.go:242        Loading configuration...
Error: cannot load configuration: unknown extensions type "health_check" for health_check
2024/04/26 05:03:59 collector server run finished with error: cannot load configuration: unknown extensions type "health_check" for health_check

I am thinking whether the image version here should be switched to: otel/opentelemetry-collector-contrib:latest.

What version and what artifacts are you using?
sdk:trace 1.35.0

Environment
jdk17

@huange7 huange7 added the Bug Something isn't working label Apr 26, 2024
@huange7 huange7 closed this as completed Apr 26, 2024
@huange7 huange7 reopened this Apr 26, 2024
@huange7 huange7 changed the title execute sdk Execute jmh test failed Apr 26, 2024
@huange7
Copy link
Author

huange7 commented May 8, 2024

@iNikem Hello, may I ask if you are aware with this?

@jkwatson
Copy link
Contributor

jkwatson commented May 8, 2024

@huange7 can you submit a PR to address this?

@huange7
Copy link
Author

huange7 commented May 8, 2024

@huange7 can you submit a PR to address this?

of course. please assign to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants