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

ClassCastException when using OpenTelemetry and max-connections property #43852

Closed
mpuczynski55 opened this issue Oct 14, 2024 · 3 comments · Fixed by #43919
Closed

ClassCastException when using OpenTelemetry and max-connections property #43852

mpuczynski55 opened this issue Oct 14, 2024 · 3 comments · Fixed by #43919
Assignees
Labels
area/tracing env/windows Impacts Windows machines kind/bug Something isn't working
Milestone

Comments

@mpuczynski55
Copy link

Describe the bug

Using OpenTelemetry and setting quarkus.http.limits.max-connection property results in ClassCastException

Expected behavior

No error

Actual behavior

2024-10-14 11:06:26,807 ERROR [io.qua.dep.dev.IsolatedDevModeMain] (main) Failed to recover after failed start: java.lang.RuntimeException: java.lang.RuntimeException: Unable to start HTTP server
        at io.quarkus.vertx.http.runtime.VertxHttpRecorder.startServerAfterFailedStart(VertxHttpRecorder.java:307)
        at io.quarkus.vertx.http.runtime.devmode.VertxHttpHotReplacementSetup.handleFailedInitialStart(VertxHttpHotReplacementSetup.java:73)
        at io.quarkus.deployment.dev.RuntimeUpdatesProcessor.startupFailed(RuntimeUpdatesProcessor.java:1299)
        at io.quarkus.deployment.dev.IsolatedDevModeMain.firstStart(IsolatedDevModeMain.java:128)
        at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:430)
        at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:57)
        at io.quarkus.bootstrap.app.CuratedApplication.runInCl(CuratedApplication.java:138)
        at io.quarkus.bootstrap.app.CuratedApplication.runInAugmentClassLoader(CuratedApplication.java:93)
        at io.quarkus.deployment.dev.DevModeMain.start(DevModeMain.java:131)
        at io.quarkus.deployment.dev.DevModeMain.main(DevModeMain.java:62)
Caused by: java.lang.RuntimeException: Unable to start HTTP server
        at io.quarkus.vertx.http.runtime.VertxHttpRecorder.doServerStart(VertxHttpRecorder.java:947)
        at io.quarkus.vertx.http.runtime.VertxHttpRecorder.startServerAfterFailedStart(VertxHttpRecorder.java:299)
        ... 9 more
Caused by: java.util.concurrent.ExecutionException: java.lang.ClassCastException: class io.quarkus.opentelemetry.runtime.tracing.intrumentation.vertx.OpenTelemetryVertxMetricsFactory$1 cannot be cast to class io.quarkus.vertx.http.r
untime.ExtendedQuarkusVertxHttpMetrics (io.quarkus.opentelemetry.runtime.tracing.intrumentation.vertx.OpenTelemetryVertxMetricsFactory$1 and io.quarkus.vertx.http.runtime.ExtendedQuarkusVertxHttpMetrics are in unnamed module of loader io.quarkus.bootstrap.classloading.QuarkusClassLoader @5ad851c9)
        at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
        at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2073)
        at io.quarkus.vertx.http.runtime.VertxHttpRecorder.doServerStart(VertxHttpRecorder.java:864)
        ... 10 more
Caused by: java.lang.ClassCastException: class io.quarkus.opentelemetry.runtime.tracing.intrumentation.vertx.OpenTelemetryVertxMetricsFactory$1 cannot be cast to class io.quarkus.vertx.http.runtime.ExtendedQuarkusVertxHttpMetrics (i
o.quarkus.opentelemetry.runtime.tracing.intrumentation.vertx.OpenTelemetryVertxMetricsFactory$1 and io.quarkus.vertx.http.runtime.ExtendedQuarkusVertxHttpMetrics are in unnamed module of loader io.quarkus.bootstrap.classloading.QuarkusClassLoader @5ad851c9)
        at io.quarkus.vertx.http.runtime.VertxHttpRecorder$WebDeploymentVerticle.setupTcpHttpServer(VertxHttpRecorder.java:1278)
        at io.quarkus.vertx.http.runtime.VertxHttpRecorder$WebDeploymentVerticle.start(VertxHttpRecorder.java:1222)
        at io.vertx.core.impl.DeploymentManager.lambda$doDeploy$5(DeploymentManager.java:210)
        at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:270)
        at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:252)
        at io.vertx.core.impl.ContextInternal.lambda$runOnContext$0(ContextInternal.java:50)
        at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173)
        at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166)
        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:469)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569)
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:994)
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Thread.java:840)


How to Reproduce?

Follow the instructions from https://quarkus.io/guides/opentelemetry-metrics:

  1. quarkus create app org.acme:opentelemetry-quickstart
    --extension='rest,quarkus-opentelemetry'
    --no-code
  2. add quarkus.http.limits.max-connections=50 property in application.properties
  3. run application: quarkus dev

Output of uname -a or ver

Microsoft Windows [Version 10.0.19045.4529]

Output of java -version

temurin-21.0.3

Quarkus version or git rev

3.15.1

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)

Additional information

No response

@mpuczynski55 mpuczynski55 added the kind/bug Something isn't working label Oct 14, 2024
@quarkus-bot quarkus-bot bot added area/tracing env/windows Impacts Windows machines labels Oct 14, 2024
Copy link

quarkus-bot bot commented Oct 14, 2024

/cc @brunobat (opentelemetry), @radcortez (opentelemetry)

@brunobat
Copy link
Contributor

Will be looking at this, this week.

@brunobat
Copy link
Contributor

I could reproduce the issue. Debugging now.

@brunobat brunobat moved this from Todo to In Progress in Quarkus Roadmap/Planning Oct 17, 2024
brunobat added a commit that referenced this issue Oct 17, 2024
Fix Class Cast Exception when using OpenTelemetry and max-connections property
@github-project-automation github-project-automation bot moved this from In Progress to Done in Quarkus Roadmap/Planning Oct 17, 2024
@quarkus-bot quarkus-bot bot added this to the 3.17 - main milestone Oct 17, 2024
@gsmet gsmet modified the milestones: 3.17 - main, 3.16.0 Oct 21, 2024
@gsmet gsmet modified the milestones: 3.16.0, 3.15.2 Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/tracing env/windows Impacts Windows machines kind/bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants