Search code examples
javaquarkusmicrometer

quarkus - java.lang.IllegalStateException: HttpBinderConfiguration was not found


I have a project on quarkus and for an unknow reason i have the next stack trace :

2024-06-04 09:34:44,497 DEBUG [org.jbo.threads] (Quarkus Main Thread) JBoss Threads version 3.4.2.Final
2024-06-04 09:34:44,535 INFO  [io.qua.dep.dev.IsolatedDevModeMain] (main) Attempting to start live reload endpoint to recover from previous Quarkus startup failure
2024-06-04 09:34:44,535 INFO  [io.qua.dep.dev.IsolatedDevModeMain] (main) Attempting to start live reload endpoint to recover from previous Quarkus startup failure
Press [space] to restart, [e] to edit command line args (currently ''), [r] to resume testing, [o] Toggle test output, [h] for more options>
2024-06-04 09:34:44,546 WARN  [io.qua.run.log.LoggingSetupRecorder] (main) Log level ALL for category 'root' set below minimum logging level DEBUG, promoting it to DEBUG
2024-06-04 09:34:44,546 WARN  [io.qua.run.log.LoggingSetupRecorder] (main) Log level ALL for category 'root' set below minimum logging level DEBUG, promoting it to DEBUG
2024-06-04 09:34:44,715 WARN  [io.net.uti.con.DefaultPromise] (vert.x-acceptor-thread-0) An exception was thrown by io.vertx.core.net.impl.TCPServerBase$$Lambda$1372/0x0000023f817bb608.operationComplete(): java.lang.IllegalStateException: HttpBinderConfiguration was not found
    at io.quarkus.micrometer.runtime.binder.vertx.VertxMeterBinderAdapter.createHttpServerMetrics(VertxMeterBinderAdapter.java:50)
    at io.vertx.core.http.impl.HttpServerImpl.createMetrics(HttpServerImpl.java:71)
    at io.vertx.core.net.impl.TCPServerBase.lambda$listen$2(TCPServerBase.java:186)
    at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:578)
    at io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:571)
    at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:550)
    at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:491)
    at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:616)
    at io.netty.util.concurrent.DefaultPromise.setSuccess0(DefaultPromise.java:605)
    at io.netty.util.concurrent.DefaultPromise.setSuccess(DefaultPromise.java:96)
    at 

Before, the project worked well without this problem. I leveled up the project from Java 11 to Java 17 and it worked well too, but for an unknown reason and since some days I have this problem. When I use the debug mode the HttpBinderConfiguration is created and configured but not set in order to be used for the creation of a virtual server for metrics and metrics endpoint in quarkus-micrometer (in VertxMeterBinderAdapter.createHttpServerMetrics the httpBinderConfiguration is null because not setted). Can you help me to resolve this problem?

Thanks.

project is using:

  • Java 17
  • Quarkus 2.10.2
  • maven 3.8.8
  • quarkus-micrometer-registry-prometheus 2.10.2

I'm trying to understand why this problem is here trying to fix this exception.

pom.xml

<?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>
    <artifactId>project</artifactId>
    <version>1.0.0-SNAPSHOT</version>
    <properties>
        <quarkus-operator-sdk.version>5.1.4</quarkus-operator-sdk.version>
        <java.version>17</java.version>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
        <!-- maven config -->
        <maven.compiler.parameters>true</maven.compiler.parameters>
        <compiler-plugin.version>3.13.0</compiler-plugin.version>
        <release-plugin.version>3.0.1</release-plugin.version>
        <!-- Check the version compatible in the build-parent/pom.xml corresponding to the Quarkus version used: -->
        <!-- https://github.com/quarkusio/quarkus/blob/2.7/build-parent/pom.xml -->
        <!-- Incompatible versions raise an exception like the following when building a service using oda-libs: -->
        <!-- org.jboss.jandex.UnsupportedVersion: Version: 10 -->
        <jandex-plugin.version>3.1.8</jandex-plugin.version>
        <!-- Quarkus version -->
        <quarkus.version>2.10.2</quarkus.version>
        <quarkus.platform.version>${quarkus.version}</quarkus.platform.version>
        <quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
        <quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id>
        <quarkus-logging-json>3.1.0</quarkus-logging-json>
        <!-- Third part libs -->
        <commons-lang.version>3.14.0</commons-lang.version>
        <json-patch.version>1.13</json-patch.version>
        <!-- test libs -->
        <surefire-plugin.version>3.2.5</surefire-plugin.version>
        <wiremock.version>2.35.2</wiremock.version>
    </properties>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>${quarkus.platform.group-id}</groupId>
                <artifactId>${quarkus.platform.artifact-id}</artifactId>
                <version>${quarkus.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>io.quarkiverse.operatorsdk</groupId>
                <artifactId>quarkus-operator-sdk-bom</artifactId>
                <version>${quarkus-operator-sdk.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>io.quarkiverse.operatorsdk</groupId>
            <artifactId>quarkus-operator-sdk</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-rest-client</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-rest-client-jackson</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.14.0</version>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-smallrye-opentracing</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-logging-gelf</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-junit5</artifactId>
            <version>2.16.12.Final</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-junit5-mockito</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-test-openshift-client</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.rest-assured</groupId>
            <artifactId>rest-assured</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>testcontainers</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>rabbitmq</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-smallrye-health</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-micrometer-registry-prometheus</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-smallrye-opentracing</artifactId>
        </dependency>
    </dependencies>
</project>

Solution

  • We have found the problem. We use the dependency

    <dependency>
       <groupId>io.quarkus</groupId>
       <artifactId>quarkus-oidc-common</artifactId>
    </dependency>
    

    and we need to use in the .env file the property %dev.quarkus.oauth-client.auth-server-url.