quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.39k stars 2.56k forks source link

ClassLoader.definePackage throws IllegalArgumentException, `parentFirst` not solving issue #37363

Open mjdaly opened 7 months ago

mjdaly commented 7 months ago

Describe the bug

When the New Relic Java Agent is in use in dev mode (-javaagent:/path/to/newrelic.jar), ClassLoader.definePackage throws IllegalArgumentException on io.netty.bootstrap, see stacktrace below.

Tried using the parentFirstArtifacts configuration based on the dependencies tree (see below) but it didn't work, neither did quarkus.class-loading.parent-first-artifacts in application.properties.

<plugin>
  <groupId>io.quarkus</groupId>
  <artifactId>quarkus-extension-maven-plugin</artifactId>
  <configuration>
      <parentFirstArtifacts>
        <parentFirstArtifact>...</parentFirstArtifact>
      </parentFirstArtifacts>
  </configuration>
</plugin>    

Dependencies

[INFO] --- quarkus:3.5.3:dependency-tree (default-cli) @ code-with-quarkus ---
[INFO] Quarkus application PROD mode build dependency tree:
[INFO] org.acme:code-with-quarkus:pom:1.0.0-SNAPSHOT
[INFO] ├─ io.quarkus:quarkus-arc-deployment:jar:3.5.3 (compile)
[INFO] │  ├─ io.quarkus:quarkus-core-deployment:jar:3.5.3 (compile)
[INFO] │  │  ├─ org.aesh:readline:jar:2.4 (compile)
[INFO] │  │  │  └─ org.fusesource.jansi:jansi:jar:2.4.0 (compile)
[INFO] │  │  ├─ org.aesh:aesh:jar:2.7 (compile)
[INFO] │  │  ├─ org.apache.commons:commons-lang3:jar:3.12.0 (compile)
[INFO] │  │  ├─ org.wildfly.common:wildfly-common:jar:1.5.4.Final-format-001 (compile)
[INFO] │  │  ├─ io.quarkus.gizmo:gizmo:jar:1.7.0 (compile)
[INFO] │  │  │  └─ org.ow2.asm:asm-util:jar:9.5 (compile)
[INFO] │  │  │     └─ org.ow2.asm:asm-analysis:jar:9.5 (compile)
[INFO] │  │  ├─ io.smallrye:jandex:jar:3.1.5 (compile)
[INFO] │  │  ├─ org.ow2.asm:asm:jar:9.5 (compile)
[INFO] │  │  ├─ org.ow2.asm:asm-commons:jar:9.5 (compile)
[INFO] │  │  │  └─ org.ow2.asm:asm-tree:jar:9.5 (compile)
[INFO] │  │  ├─ io.quarkus:quarkus-development-mode-spi:jar:3.5.3 (compile)
[INFO] │  │  ├─ io.quarkus:quarkus-class-change-agent:jar:3.5.3 (compile)
[INFO] │  │  ├─ io.quarkus:quarkus-bootstrap-core:jar:3.5.3 (compile)
[INFO] │  │  │  ├─ io.quarkus:quarkus-bootstrap-app-model:jar:3.5.3 (compile)
[INFO] │  │  │  └─ io.smallrye.common:smallrye-common-io:jar:2.1.2 (compile)
[INFO] │  │  ├─ io.quarkus:quarkus-devtools-utilities:jar:3.5.3 (compile)
[INFO] │  │  ├─ org.eclipse.sisu:org.eclipse.sisu.inject:jar:0.3.5 (runtime)
[INFO] │  │  ├─ io.quarkus:quarkus-core:jar:3.5.3 (compile)
[INFO] │  │  │  ├─ jakarta.inject:jakarta.inject-api:jar:2.0.1 (compile)
[INFO] │  │  │  ├─ io.smallrye.common:smallrye-common-os:jar:2.1.2 (compile)
[INFO] │  │  │  ├─ io.quarkus:quarkus-ide-launcher:jar:3.5.3 (compile)
[INFO] │  │  │  ├─ io.smallrye.config:smallrye-config:jar:3.4.4 (compile)
[INFO] │  │  │  │  └─ io.smallrye.config:smallrye-config-core:jar:3.4.4 (compile)
[INFO] │  │  │  │     ├─ org.eclipse.microprofile.config:microprofile-config-api:jar:3.0.3 (compile)
[INFO] │  │  │  │     ├─ io.smallrye.common:smallrye-common-classloader:jar:2.1.2 (compile)
[INFO] │  │  │  │     └─ io.smallrye.config:smallrye-config-common:jar:3.4.4 (compile)
[INFO] │  │  │  ├─ org.jboss.logmanager:jboss-logmanager:jar:3.0.2.Final (compile)
[INFO] │  │  │  │  ├─ io.smallrye.common:smallrye-common-constraint:jar:2.1.2 (compile)
[INFO] │  │  │  │  ├─ io.smallrye.common:smallrye-common-cpu:jar:2.1.2 (compile)
[INFO] │  │  │  │  ├─ io.smallrye.common:smallrye-common-expression:jar:2.1.2 (compile)
[INFO] │  │  │  │  │  └─ io.smallrye.common:smallrye-common-function:jar:2.1.2 (compile)
[INFO] │  │  │  │  ├─ io.smallrye.common:smallrye-common-net:jar:2.1.2 (compile)
[INFO] │  │  │  │  ├─ io.smallrye.common:smallrye-common-ref:jar:2.1.2 (compile)
[INFO] │  │  │  │  └─ jakarta.json:jakarta.json-api:jar:2.1.2 (compile)
[INFO] │  │  │  ├─ org.jboss.logging:jboss-logging-annotations:jar:2.2.1.Final (compile)
[INFO] │  │  │  ├─ org.jboss.threads:jboss-threads:jar:3.5.0.Final (compile)
[INFO] │  │  │  ├─ org.slf4j:slf4j-api:jar:2.0.6 (compile)
[INFO] │  │  │  ├─ org.jboss.slf4j:slf4j-jboss-logmanager:jar:2.0.0.Final (compile)
[INFO] │  │  │  ├─ io.quarkus:quarkus-bootstrap-runner:jar:3.5.3 (compile)
[INFO] │  │  │  └─ io.quarkus:quarkus-fs-util:jar:0.0.9 (compile)
[INFO] │  │  ├─ io.quarkus:quarkus-builder:jar:3.5.3 (compile)
[INFO] │  │  ├─ org.graalvm.sdk:graal-sdk:jar:23.0.1 (compile)
[INFO] │  │  ├─ org.junit.platform:junit-platform-launcher:jar:1.10.0 (compile)
[INFO] │  │  │  ├─ org.junit.platform:junit-platform-engine:jar:1.10.0 (compile)
[INFO] │  │  │  │  ├─ org.opentest4j:opentest4j:jar:1.3.0 (compile)
[INFO] │  │  │  │  └─ org.junit.platform:junit-platform-commons:jar:1.10.0 (compile)
[INFO] │  │  │  └─ org.apiguardian:apiguardian-api:jar:1.1.2 (compile)
[INFO] │  │  └─ org.junit.jupiter:junit-jupiter:jar:5.10.0 (compile)
[INFO] │  │     ├─ org.junit.jupiter:junit-jupiter-api:jar:5.10.0 (compile)
[INFO] │  │     ├─ org.junit.jupiter:junit-jupiter-params:jar:5.10.0 (compile)
[INFO] │  │     └─ org.junit.jupiter:junit-jupiter-engine:jar:5.10.0 (runtime)
[INFO] │  ├─ io.quarkus:quarkus-smallrye-context-propagation-spi:jar:3.5.3 (compile)
[INFO] │  │  └─ org.eclipse.microprofile.context-propagation:microprofile-context-propagation-api:jar:1.3 (compile)
[INFO] │  ├─ io.quarkus:quarkus-vertx-http-dev-ui-spi:jar:3.5.3 (compile)
[INFO] │  ├─ io.quarkus:quarkus-arc:jar:3.5.3 (compile)
[INFO] │  │  └─ io.quarkus.arc:arc:jar:3.5.3 (compile)
[INFO] │  │     ├─ jakarta.transaction:jakarta.transaction-api:jar:2.0.1 (compile)
[INFO] │  │     └─ io.smallrye.reactive:mutiny:jar:2.5.1 (compile)
[INFO] │  │        └─ io.smallrye.common:smallrye-common-annotation:jar:2.1.2 (compile)
[INFO] │  └─ io.quarkus.arc:arc-processor:jar:3.5.3 (compile)
[INFO] │     ├─ jakarta.enterprise:jakarta.enterprise.cdi-api:jar:4.0.1 (compile)
[INFO] │     │  ├─ jakarta.enterprise:jakarta.enterprise.lang-model:jar:4.0.1 (compile)
[INFO] │     │  ├─ jakarta.el:jakarta.el-api:jar:5.0.1 (compile)
[INFO] │     │  └─ jakarta.interceptor:jakarta.interceptor-api:jar:2.1.0 (compile)
[INFO] │     ├─ org.jboss.logging:jboss-logging:jar:3.5.3.Final (compile)
[INFO] │     └─ jakarta.annotation:jakarta.annotation-api:jar:2.1.1 (compile)
[INFO] └─ io.quarkus:quarkus-resteasy-reactive-deployment:jar:3.5.3 (compile)
[INFO]    ├─ io.quarkus.resteasy.reactive:resteasy-reactive-processor:jar:3.5.3 (compile)
[INFO]    │  ├─ io.quarkus.resteasy.reactive:resteasy-reactive:jar:3.5.3 (compile)
[INFO]    │  │  └─ io.quarkus.resteasy.reactive:resteasy-reactive-common:jar:3.5.3 (compile)
[INFO]    │  │     ├─ io.quarkus.resteasy.reactive:resteasy-reactive-common-types:jar:3.5.3 (compile)
[INFO]    │  │     ├─ org.reactivestreams:reactive-streams:jar:1.0.4 (compile)
[INFO]    │  │     └─ io.smallrye.reactive:mutiny-zero-flow-adapters:jar:1.0.0 (compile)
[INFO]    │  ├─ io.quarkus.resteasy.reactive:resteasy-reactive-common-processor:jar:3.5.3 (compile)
[INFO]    │  └─ jakarta.ws.rs:jakarta.ws.rs-api:jar:3.1.0 (compile)
[INFO]    ├─ io.quarkus:quarkus-vertx-http-deployment:jar:3.5.3 (compile)
[INFO]    │  ├─ io.quarkus:quarkus-vertx-deployment:jar:3.5.3 (compile)
[INFO]    │  │  ├─ io.quarkus:quarkus-netty-deployment:jar:3.5.3 (compile)
[INFO]    │  │  │  └─ io.quarkus:quarkus-netty:jar:3.5.3 (compile)
[INFO]    │  │  │     ├─ io.netty:netty-codec:jar:4.1.100.Final (compile)
[INFO]    │  │  │     └─ com.aayushatharva.brotli4j:brotli4j:jar:1.12.0 (compile)
[INFO]    │  │  │        ├─ com.aayushatharva.brotli4j:service:jar:1.12.0 (compile)
[INFO]    │  │  │        └─ com.aayushatharva.brotli4j:native-linux-x86_64:jar:1.12.0 (compile)
[INFO]    │  │  └─ io.quarkus:quarkus-vertx:jar:3.5.3 (compile)
[INFO]    │  │     ├─ io.netty:netty-codec-haproxy:jar:4.1.100.Final (compile)
[INFO]    │  │     ├─ io.quarkus:quarkus-vertx-latebound-mdc-provider:jar:3.5.3 (compile)
[INFO]    │  │     └─ io.smallrye:smallrye-fault-tolerance-vertx:jar:6.2.6 (compile)
[INFO]    │  ├─ io.quarkus:quarkus-vertx-http:jar:3.5.3 (compile)
[INFO]    │  │  ├─ io.quarkus:quarkus-security-runtime-spi:jar:3.5.3 (compile)
[INFO]    │  │  ├─ io.quarkus:quarkus-credentials:jar:3.5.3 (compile)
[INFO]    │  │  ├─ io.smallrye.common:smallrye-common-vertx-context:jar:2.1.2 (compile)
[INFO]    │  │  ├─ io.smallrye.reactive:smallrye-mutiny-vertx-web:jar:3.7.2 (compile)
[INFO]    │  │  │  ├─ io.smallrye.reactive:smallrye-mutiny-vertx-web-common:jar:3.7.2 (compile)
[INFO]    │  │  │  ├─ io.smallrye.reactive:smallrye-mutiny-vertx-auth-common:jar:3.7.2 (compile)
[INFO]    │  │  │  ├─ io.smallrye.reactive:smallrye-mutiny-vertx-bridge-common:jar:3.7.2 (compile)
[INFO]    │  │  │  └─ io.smallrye.reactive:smallrye-mutiny-vertx-uri-template:jar:3.7.2 (compile)
[INFO]    │  │  │     └─ io.vertx:vertx-uri-template:jar:4.4.6 (compile)
[INFO]    │  │  └─ io.github.crac:org-crac:jar:0.1.3 (compile)
[INFO]    │  ├─ io.quarkus:quarkus-vertx-http-deployment-spi:jar:3.5.3 (compile)
[INFO]    │  ├─ io.quarkus:quarkus-mutiny-deployment:jar:3.5.3 (compile)
[INFO]    │  │  └─ io.quarkus:quarkus-smallrye-context-propagation-deployment:jar:3.5.3 (compile)
[INFO]    │  ├─ io.quarkus:quarkus-kubernetes-spi:jar:3.5.3 (compile)
[INFO]    │  ├─ io.quarkus:quarkus-vertx-http-dev-ui-resources:jar:3.5.3 (compile)
[INFO]    │  │  ├─ org.mvnpm.at.vaadin:router:jar:1.7.5 (runtime)
[INFO]    │  │  ├─ org.mvnpm:path-to-regexp:jar:2.4.0 (runtime)
[INFO]    │  │  ├─ org.mvnpm.at.mvnpm:vaadin-webcomponents:jar:24.1.10 (runtime)
[INFO]    │  │  ├─ org.mvnpm.at.vaadin:vaadin-usage-statistics:jar:2.1.2 (runtime)
[INFO]    │  │  ├─ org.mvnpm.at.vaadin:vaadin-development-mode-detector:jar:2.0.6 (runtime)
[INFO]    │  │  ├─ org.mvnpm.at.polymer:polymer:jar:3.5.1 (runtime)
[INFO]    │  │  ├─ org.mvnpm.at.webcomponents:shadycss:jar:1.11.2 (runtime)
[INFO]    │  │  ├─ org.mvnpm.at.open-wc:dedupe-mixin:jar:1.4.0 (runtime)
[INFO]    │  │  ├─ org.mvnpm:lit:jar:2.8.0 (runtime)
[INFO]    │  │  ├─ org.mvnpm.at.lit:reactive-element:jar:1.6.3 (runtime)
[INFO]    │  │  ├─ org.mvnpm:lit-element:jar:3.3.3 (runtime)
[INFO]    │  │  ├─ org.mvnpm:lit-html:jar:2.8.0 (runtime)
[INFO]    │  │  ├─ org.mvnpm.at.lit-labs:ssr-dom-shim:jar:1.1.1 (runtime)
[INFO]    │  │  ├─ org.mvnpm.at.types:trusted-types:jar:2.0.4 (runtime)
[INFO]    │  │  ├─ org.mvnpm:lit-element-state:jar:1.7.0 (runtime)
[INFO]    │  │  ├─ org.mvnpm:echarts:jar:5.4.3 (runtime)
[INFO]    │  │  │  ├─ org.mvnpm:tslib:jar:2.3.0 (runtime)
[INFO]    │  │  │  └─ org.mvnpm:zrender:jar:5.4.4 (runtime)
[INFO]    │  │  ├─ org.mvnpm.at.vanillawc:wc-codemirror:jar:2.1.0 (runtime)
[INFO]    │  │  └─ org.mvnpm:es-module-shims:jar:1.8.1 (runtime)
[INFO]    │  ├─ io.mvnpm:importmap:jar:1.0.10 (compile)
[INFO]    │  ├─ io.quarkus.qute:qute-core:jar:3.5.3 (compile)
[INFO]    │  ├─ org.yaml:snakeyaml:jar:2.1 (compile)
[INFO]    │  └─ com.fasterxml.jackson.core:jackson-databind:jar:2.15.3 (compile)
[INFO]    │     ├─ com.fasterxml.jackson.core:jackson-annotations:jar:2.15.3 (compile)
[INFO]    │     └─ com.fasterxml.jackson.core:jackson-core:jar:2.15.3 (compile)
[INFO]    ├─ io.quarkus:quarkus-resteasy-reactive:jar:3.5.3 (compile)
[INFO]    │  ├─ io.quarkus:quarkus-resteasy-reactive-common:jar:3.5.3 (compile)
[INFO]    │  │  └─ io.quarkus:quarkus-mutiny:jar:3.5.3 (compile)
[INFO]    │  │     ├─ io.quarkus:quarkus-smallrye-context-propagation:jar:3.5.3 (compile)
[INFO]    │  │     │  └─ io.smallrye:smallrye-context-propagation:jar:2.1.0 (compile)
[INFO]    │  │     │     ├─ io.smallrye:smallrye-context-propagation-api:jar:2.1.0 (compile)
[INFO]    │  │     │     └─ io.smallrye:smallrye-context-propagation-storage:jar:2.1.0 (compile)
[INFO]    │  │     └─ io.smallrye.reactive:mutiny-smallrye-context-propagation:jar:2.5.1 (compile)
[INFO]    │  ├─ io.quarkus.resteasy.reactive:resteasy-reactive-vertx:jar:3.5.3 (compile)
[INFO]    │  │  ├─ io.vertx:vertx-web:jar:4.4.6 (compile)
[INFO]    │  │  │  ├─ io.vertx:vertx-web-common:jar:4.4.6 (compile)
[INFO]    │  │  │  ├─ io.vertx:vertx-auth-common:jar:4.4.6 (compile)
[INFO]    │  │  │  └─ io.vertx:vertx-bridge-common:jar:4.4.6 (compile)
[INFO]    │  │  ├─ io.smallrye.reactive:smallrye-mutiny-vertx-core:jar:3.7.2 (compile)
[INFO]    │  │  │  ├─ io.smallrye.reactive:smallrye-mutiny-vertx-runtime:jar:3.7.2 (compile)
[INFO]    │  │  │  └─ io.smallrye.reactive:vertx-mutiny-generator:jar:3.7.2 (compile)
[INFO]    │  │  │     └─ io.vertx:vertx-codegen:jar:4.4.6 (compile)
[INFO]    │  │  ├─ org.jboss.logging:commons-logging-jboss-logging:jar:1.0.0.Final (compile)
[INFO]    │  │  └─ jakarta.xml.bind:jakarta.xml.bind-api:jar:4.0.1 (compile)
[INFO]    │  │     └─ jakarta.activation:jakarta.activation-api:jar:2.1.2 (compile)
[INFO]    │  ├─ io.quarkus:quarkus-jsonp:jar:3.5.3 (compile)
[INFO]    │  │  └─ org.eclipse.parsson:parsson:jar:1.1.5 (compile)
[INFO]    │  └─ io.quarkus:quarkus-virtual-threads:jar:3.5.3 (compile)
[INFO]    │     └─ io.vertx:vertx-core:jar:4.4.6 (compile)
[INFO]    │        ├─ io.netty:netty-common:jar:4.1.100.Final (compile)
[INFO]    │        ├─ io.netty:netty-buffer:jar:4.1.100.Final (compile)
[INFO]    │        ├─ io.netty:netty-transport:jar:4.1.100.Final (compile)
[INFO]    │        ├─ io.netty:netty-handler:jar:4.1.100.Final (compile)
[INFO]    │        │  └─ io.netty:netty-transport-native-unix-common:jar:4.1.100.Final (compile)
[INFO]    │        ├─ io.netty:netty-handler-proxy:jar:4.1.100.Final (compile)
[INFO]    │        │  └─ io.netty:netty-codec-socks:jar:4.1.100.Final (compile)
[INFO]    │        ├─ io.netty:netty-codec-http:jar:4.1.100.Final (compile)
[INFO]    │        ├─ io.netty:netty-codec-http2:jar:4.1.100.Final (compile)
[INFO]    │        ├─ io.netty:netty-resolver:jar:4.1.100.Final (compile)
[INFO]    │        └─ io.netty:netty-resolver-dns:jar:4.1.100.Final (compile)
[INFO]    │           └─ io.netty:netty-codec-dns:jar:4.1.100.Final (compile)
[INFO]    ├─ io.quarkus:quarkus-resteasy-reactive-server-spi-deployment:jar:3.5.3 (compile)
[INFO]    │  └─ io.quarkus:quarkus-resteasy-reactive-spi-deployment:jar:3.5.3 (compile)
[INFO]    ├─ io.quarkus:quarkus-jaxrs-spi-deployment:jar:3.5.3 (compile)
[INFO]    ├─ io.quarkus:quarkus-security-spi:jar:3.5.3 (compile)
[INFO]    │  └─ io.quarkus.security:quarkus-security:jar:2.0.2.Final (compile)
[INFO]    ├─ io.quarkus:quarkus-jsonp-deployment:jar:3.5.3 (compile)
[INFO]    ├─ io.quarkus:quarkus-resteasy-reactive-common-deployment:jar:3.5.3 (compile)
[INFO]    └─ io.quarkus:quarkus-virtual-threads-deployment:jar:3.5.3 (compile)

Expected behavior

Quarkus startup succeeds, http server is running.

Actual behavior

Quarkus application fails to start.

Stacktrace in Logs

2023-11-28 00:19:01,768 ERROR [io.qua.run.Application] (Quarkus Main Thread) Failed to start application (with profile [dev]): java.lang.RuntimeException: Failed to start quarkus
        at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source)
        at io.quarkus.runtime.Application.start(Application.java:101)
        at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:111)
        at io.quarkus.runtime.Quarkus.run(Quarkus.java:71)
        at io.quarkus.runtime.Quarkus.run(Quarkus.java:44)
        at io.quarkus.runtime.Quarkus.run(Quarkus.java:124)
        at io.quarkus.runner.GeneratedMain.main(Unknown Source)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        at io.quarkus.runner.bootstrap.StartupActionImpl$1.run(StartupActionImpl.java:113)
        at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.lang.RuntimeException: Unable to start HTTP server
        at io.quarkus.vertx.http.runtime.VertxHttpRecorder.doServerStart(VertxHttpRecorder.java:842)
        at io.quarkus.vertx.http.runtime.VertxHttpRecorder.startServer(VertxHttpRecorder.java:327)
        at io.quarkus.deployment.steps.VertxHttpProcessor$openSocket189362710.deploy_0(Unknown Source)
        at io.quarkus.deployment.steps.VertxHttpProcessor$openSocket189362710.deploy(Unknown Source)
        ... 11 more
Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: io.netty.bootstrap
        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:763)
        ... 14 more
Caused by: java.lang.IllegalArgumentException: io.netty.bootstrap
        at java.base/java.lang.ClassLoader.definePackage(ClassLoader.java:2239)
        at io.quarkus.bootstrap.classloading.QuarkusClassLoader.definePackage(QuarkusClassLoader.java:539)
        at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:505)
        at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:466)
        at io.vertx.core.net.impl.TCPServerBase.lambda$listen$4(TCPServerBase.java:216)
        at io.vertx.core.impl.future.FutureImpl$3.onSuccess(FutureImpl.java:141)
        at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60)
        at io.vertx.core.impl.future.FutureImpl.addListener(FutureImpl.java:196)
        at io.vertx.core.impl.future.FutureImpl.onComplete(FutureImpl.java:164)
        at io.vertx.core.net.impl.TCPServerBase.listen(TCPServerBase.java:211)
        at io.vertx.core.net.impl.TCPServerBase.bind(TCPServerBase.java:152)
        at io.vertx.core.http.impl.HttpServerImpl.listen(HttpServerImpl.java:180)
        at io.vertx.core.http.HttpServer.listen(HttpServer.java:173)
        at io.vertx.core.http.HttpServer.listen(HttpServer.java:186)
        at io.quarkus.vertx.http.runtime.VertxHttpRecorder$WebDeploymentVerticle.setupTcpHttpServer(VertxHttpRecorder.java:1157)
        at io.quarkus.vertx.http.runtime.VertxHttpRecorder$WebDeploymentVerticle.start(VertxHttpRecorder.java:1086)
        at io.vertx.core.impl.DeploymentManager.lambda$doDeploy$5(DeploymentManager.java:195)
        at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:277)
        at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:259)
        at io.vertx.core.impl.EventLoopContext.lambda$runOnContext$0(EventLoopContext.java:43)
        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:470)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569)
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        ... 1 more

2023-11-28 00:19:01,800 INFO  [io.qua.dep.dev.IsolatedDevModeMain] (main) Attempting to start live reload endpoint to recover from previous Quarkus startup failure
2023-11-28 00:19:01,800 INFO  [io.qua.dep.dev.IsolatedDevModeMain] (main) Attempting to start live reload endpoint to recover from previous Quarkus startup failure

How to Reproduce?

  1. Can be easily replicated with minimal changes to a quarkus create app.
  2. Sample pom
    <?xml version="1.0"?>
    <project
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
      xmlns="http://maven.apache.org/POM/4.0.0"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <modelVersion>4.0.0</modelVersion>
      <groupId>org.acme</groupId>
      <artifactId>code-with-quarkus</artifactId>
      <version>1.0.0-SNAPSHOT</version>
      <properties>
        <compiler-plugin.version>3.11.0</compiler-plugin.version>
        <maven.compiler.release>21</maven.compiler.release>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
        <quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id>
        <quarkus.platform.version>3.5.3</quarkus.platform.version>
        <skipITs>true</skipITs>
        <surefire-plugin.version>3.1.2</surefire-plugin.version>
        <jvm.args>-javaagent:/workspaces/spike-quarkus-newrelic/src/code-with-quarkus/.newrelic/newrelic.jar</jvm.args>
        <!-- <jvm.args>-agentlib:jdwp=transport=dt_socket,address=*:5005,server=y,suspend=n</jvm.args> -->
      </properties>
      <dependencyManagement>
        <dependencies>
          <dependency>
            <groupId>${quarkus.platform.group-id}</groupId>
            <artifactId>${quarkus.platform.artifact-id}</artifactId>
            <version>${quarkus.platform.version}</version>
            <type>pom</type>
            <scope>import</scope>
          </dependency>
        </dependencies>
      </dependencyManagement>
      <dependencies>
        <dependency>
          <groupId>io.quarkus</groupId>
          <artifactId>quarkus-arc</artifactId>
        </dependency>
        <dependency>
          <groupId>io.quarkus</groupId>
          <artifactId>quarkus-resteasy-reactive</artifactId>
        </dependency>
        <dependency>
          <groupId>io.quarkus</groupId>
          <artifactId>quarkus-junit5</artifactId>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>io.rest-assured</groupId>
          <artifactId>rest-assured</artifactId>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>com.newrelic.agent.java</groupId>
          <artifactId>newrelic-java</artifactId>
          <version>8.7.0</version>
          <scope>provided</scope>
          <type>zip</type>
        </dependency>
      </dependencies>
      <build>
        <plugins>
          <plugin>
            <groupId>${quarkus.platform.group-id}</groupId>
            <artifactId>quarkus-maven-plugin</artifactId>
            <version>${quarkus.platform.version}</version>
            <extensions>true</extensions>
            <executions>
              <execution>
                <goals>
                  <goal>build</goal>
                  <goal>generate-code</goal>
                  <goal>generate-code-tests</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>${compiler-plugin.version}</version>
            <configuration>
              <compilerArgs>
                <arg>-parameters</arg>
              </compilerArgs>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>${surefire-plugin.version}</version>
            <configuration>
              <systemPropertyVariables>
                <java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
                <maven.home>${maven.home}</maven.home>
              </systemPropertyVariables>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-failsafe-plugin</artifactId>
            <version>${surefire-plugin.version}</version>
            <executions>
              <execution>
                <goals>
                  <goal>integration-test</goal>
                  <goal>verify</goal>
                </goals>
                <configuration>
                  <systemPropertyVariables>
                    <native.image.path>${project.build.directory}/${project.build.finalName}-runner</native.image.path>
                    <java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
                    <maven.home>${maven.home}</maven.home>
                  </systemPropertyVariables>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <!-- Unzip New Relic Java agent into target/ -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <version>3.1.1</version>
            <executions>
              <execution>
                <id>unpack-newrelic</id>
                <phase>package</phase>
                <goals>
                  <goal>unpack-dependencies</goal>
                </goals>
                <configuration>
                  <includeGroupIds>com.newrelic.agent.java</includeGroupIds>
                  <includeArtifactIds>newrelic-java</includeArtifactIds>
                  <!-- you can optionally exclude files -->
                  <!-- <excludes>**/newrelic.yml</excludes> -->
                  <overWriteReleases>false</overWriteReleases>
                  <overWriteSnapshots>false</overWriteSnapshots>
                  <overWriteIfNewer>true</overWriteIfNewer>
                  <outputDirectory>${project.build.directory}</outputDirectory>
                </configuration>
              </execution>
            </executions>
    </plugin>
    <plugin>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-extension-maven-plugin</artifactId>
      <configuration>
          <parentFirstArtifacts>
            <parentFirstArtifact>io.netty:netty</parentFirstArtifact>
          </parentFirstArtifacts>
      </configuration>
    </plugin>    
        </plugins>
      </build>
      <profiles>
        <profile>
          <id>native</id>
          <activation>
            <property>
              <name>native</name>
            </property>
          </activation>
          <properties>
            <skipITs>false</skipITs>
            <quarkus.package.type>native</quarkus.package.type>
          </properties>
        </profile>
      </profiles>
    </project>

Output of uname -a or ver

Linux eb5b568104a9 5.15.133.1-microsoft-standard-WSL2 #1 SMP Thu Oct 5 21:02:42 UTC 2023 x86_64 GNU/Linux

Output of java -version

java version "21.0.1" 2023-10-17 LTS Java(TM) SE Runtime Environment (build 21.0.1+12-LTS-29) Java HotSpot(TM) 64-Bit Server VM (build 21.0.1+12-LTS-29, mixed mode, sharing)

Quarkus version or git rev

3.5.3

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

Apache Maven 3.9.5 (57804ffe001d7215b5e7bcb531cf83df38f93546) Maven home: /root/.m2/wrapper/dists/apache-maven-3.9.5-bin/32db9c34/apache-maven-3.9.5 Java version: 21.0.1, vendor: Oracle Corporation, runtime: /usr/lib/jvm/jdk-21-oracle-x64 Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "5.15.133.1-microsoft-standard-wsl2", arch: "amd64", family: "unix"

Additional information

No response

quarkus-bot[bot] commented 7 months ago

/cc @geoand (kubernetes), @iocanel (kubernetes)

mjdaly commented 7 months ago

Sample project. code-with-quarkus-bugreport.zip

geoand commented 7 months ago

I could not reproduce this with the latest NewRelic agent