io.smallrye.config.ConfigValidationException when using gradle dependency “io.smallrye.reactive:smallrye-mutiny-vertx-consul-client”

I am using the gradle dependency io.smallrye.reactive:smallrye-mutiny-vertx-consul-client:3.11.0 in a Quarkus Web Service to register the service to the Consul service discovery.
Starting the service via IntelliJ Run configuration works successfully, but if I containerize the application using docker-compose and run docker compose up, an io.smallrye.config.ConfigValidationException is thrown, indicating that some properties like quarkus.consul-config.apps-config.enabled does not map to any root.

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>2024-06-06 12:16:04 Jun 06, 2024 10:16:02 AM io.quarkus.config
2024-06-06 12:16:04 WARN: Unrecognized configuration key "quarkus.consul-config.apps-config.enabled" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2024-06-06 12:16:04 Jun 06, 2024 10:16:02 AM io.quarkus.config
2024-06-06 12:16:04 WARN: Unrecognized configuration key "quarkus.consul.registration.service-id" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2024-06-06 12:16:04 Jun 06, 2024 10:16:02 AM io.quarkus.config
2024-06-06 12:16:04 WARN: Unrecognized configuration key "quarkus.consul.registration.port" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2024-06-06 12:16:04 Jun 06, 2024 10:16:02 AM io.quarkus.config
2024-06-06 12:16:04 WARN: Unrecognized configuration key "quarkus.consul.registration.enabled" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2024-06-06 12:16:04 Jun 06, 2024 10:16:02 AM io.quarkus.config
2024-06-06 12:16:04 WARN: Unrecognized configuration key "quarkus.consul.registration.host" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2024-06-06 12:16:04 Jun 06, 2024 10:16:02 AM io.quarkus.config
2024-06-06 12:16:04 WARN: Unrecognized configuration key "quarkus.consul-config.default-config" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2024-06-06 12:16:04 Jun 06, 2024 10:16:02 AM io.quarkus.config
2024-06-06 12:16:04 WARN: Unrecognized configuration key "quarkus.consul.registration.service-name" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2024-06-06 12:16:05 Configuration validation failed:
2024-06-06 12:16:05 SRCFG00050: quarkus.consul-config.apps-config.enabled in io.smallrye.config.ConfigSourceContext$ConfigSourceContextConfigSource does not map to any root
2024-06-06 12:16:05 SRCFG00050: quarkus.consul-config.default-config in io.smallrye.config.ConfigSourceContext$ConfigSourceContextConfigSource does not map to any root
2024-06-06 12:16:05 java.lang.RuntimeException: Failed to start quarkus
2024-06-06 12:16:05 at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source)
2024-06-06 12:16:05 at io.quarkus.runtime.Application.start(Application.java:101)
2024-06-06 12:16:05 at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:111)
2024-06-06 12:16:05 at io.quarkus.runtime.Quarkus.run(Quarkus.java:71)
2024-06-06 12:16:05 at io.quarkus.runtime.Quarkus.run(Quarkus.java:44)
2024-06-06 12:16:05 at io.quarkus.runtime.Quarkus.run(Quarkus.java:124)
2024-06-06 12:16:05 at io.quarkus.runner.GeneratedMain.main(Unknown Source)
2024-06-06 12:16:05 at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source)
2024-06-06 12:16:05 at java.base/java.lang.reflect.Method.invoke(Unknown Source)
2024-06-06 12:16:05 at io.quarkus.bootstrap.runner.QuarkusEntryPoint.doRun(QuarkusEntryPoint.java:62)
2024-06-06 12:16:05 at io.quarkus.bootstrap.runner.QuarkusEntryPoint.main(QuarkusEntryPoint.java:33)
2024-06-06 12:16:05 Caused by: io.quarkus.runtime.configuration.ConfigurationException: Failed to read configuration properties
2024-06-06 12:16:05 at io.quarkus.deployment.steps.RuntimeConfigSetup.deploy(Unknown Source)
2024-06-06 12:16:05 ... 11 more
2024-06-06 12:16:05 Caused by: io.smallrye.config.ConfigValidationException: Configuration validation failed:
2024-06-06 12:16:05 SRCFG00050: quarkus.consul-config.apps-config.enabled in io.smallrye.config.ConfigSourceContext$ConfigSourceContextConfigSource does not map to any root
2024-06-06 12:16:05 SRCFG00050: quarkus.consul-config.default-config in io.smallrye.config.ConfigSourceContext$ConfigSourceContextConfigSource does not map to any root
2024-06-06 12:16:05 at io.smallrye.config.ConfigMappingProvider.mapConfiguration(ConfigMappingProvider.java:75)
2024-06-06 12:16:05 at io.smallrye.config.SmallRyeConfig.<init>(SmallRyeConfig.java:84)
2024-06-06 12:16:05 at io.smallrye.config.SmallRyeConfigBuilder.build(SmallRyeConfigBuilder.java:714)
2024-06-06 12:16:05 at io.smallrye.config.ConfigSourceFactory$ConfigurableConfigSourceFactory.getConfigSources(ConfigSourceFactory.java:55)
2024-06-06 12:16:05 at io.smallrye.config.ConfigurableConfigSource.getConfigSources(ConfigurableConfigSource.java:50)
2024-06-06 12:16:05 at io.smallrye.config.SmallRyeConfig$ConfigSources.mapLateSources(SmallRyeConfig.java:862)
2024-06-06 12:16:05 at io.smallrye.config.SmallRyeConfig$ConfigSources.<init>(SmallRyeConfig.java:737)
2024-06-06 12:16:05 at io.smallrye.config.SmallRyeConfig.<init>(SmallRyeConfig.java:81)
2024-06-06 12:16:05 at io.smallrye.config.SmallRyeConfigBuilder.build(SmallRyeConfigBuilder.java:714)
2024-06-06 12:16:05 at io.quarkus.runtime.generated.Config.readConfig(Unknown Source)
2024-06-06 12:16:05 at io.quarkus.runtime.generated.Config.createRunTimeConfig(Unknown Source)
2024-06-06 12:16:05 ... 12 more
</code>
<code>2024-06-06 12:16:04 Jun 06, 2024 10:16:02 AM io.quarkus.config 2024-06-06 12:16:04 WARN: Unrecognized configuration key "quarkus.consul-config.apps-config.enabled" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo 2024-06-06 12:16:04 Jun 06, 2024 10:16:02 AM io.quarkus.config 2024-06-06 12:16:04 WARN: Unrecognized configuration key "quarkus.consul.registration.service-id" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo 2024-06-06 12:16:04 Jun 06, 2024 10:16:02 AM io.quarkus.config 2024-06-06 12:16:04 WARN: Unrecognized configuration key "quarkus.consul.registration.port" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo 2024-06-06 12:16:04 Jun 06, 2024 10:16:02 AM io.quarkus.config 2024-06-06 12:16:04 WARN: Unrecognized configuration key "quarkus.consul.registration.enabled" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo 2024-06-06 12:16:04 Jun 06, 2024 10:16:02 AM io.quarkus.config 2024-06-06 12:16:04 WARN: Unrecognized configuration key "quarkus.consul.registration.host" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo 2024-06-06 12:16:04 Jun 06, 2024 10:16:02 AM io.quarkus.config 2024-06-06 12:16:04 WARN: Unrecognized configuration key "quarkus.consul-config.default-config" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo 2024-06-06 12:16:04 Jun 06, 2024 10:16:02 AM io.quarkus.config 2024-06-06 12:16:04 WARN: Unrecognized configuration key "quarkus.consul.registration.service-name" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo 2024-06-06 12:16:05 Configuration validation failed: 2024-06-06 12:16:05 SRCFG00050: quarkus.consul-config.apps-config.enabled in io.smallrye.config.ConfigSourceContext$ConfigSourceContextConfigSource does not map to any root 2024-06-06 12:16:05 SRCFG00050: quarkus.consul-config.default-config in io.smallrye.config.ConfigSourceContext$ConfigSourceContextConfigSource does not map to any root 2024-06-06 12:16:05 java.lang.RuntimeException: Failed to start quarkus 2024-06-06 12:16:05 at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source) 2024-06-06 12:16:05 at io.quarkus.runtime.Application.start(Application.java:101) 2024-06-06 12:16:05 at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:111) 2024-06-06 12:16:05 at io.quarkus.runtime.Quarkus.run(Quarkus.java:71) 2024-06-06 12:16:05 at io.quarkus.runtime.Quarkus.run(Quarkus.java:44) 2024-06-06 12:16:05 at io.quarkus.runtime.Quarkus.run(Quarkus.java:124) 2024-06-06 12:16:05 at io.quarkus.runner.GeneratedMain.main(Unknown Source) 2024-06-06 12:16:05 at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source) 2024-06-06 12:16:05 at java.base/java.lang.reflect.Method.invoke(Unknown Source) 2024-06-06 12:16:05 at io.quarkus.bootstrap.runner.QuarkusEntryPoint.doRun(QuarkusEntryPoint.java:62) 2024-06-06 12:16:05 at io.quarkus.bootstrap.runner.QuarkusEntryPoint.main(QuarkusEntryPoint.java:33) 2024-06-06 12:16:05 Caused by: io.quarkus.runtime.configuration.ConfigurationException: Failed to read configuration properties 2024-06-06 12:16:05 at io.quarkus.deployment.steps.RuntimeConfigSetup.deploy(Unknown Source) 2024-06-06 12:16:05 ... 11 more 2024-06-06 12:16:05 Caused by: io.smallrye.config.ConfigValidationException: Configuration validation failed: 2024-06-06 12:16:05 SRCFG00050: quarkus.consul-config.apps-config.enabled in io.smallrye.config.ConfigSourceContext$ConfigSourceContextConfigSource does not map to any root 2024-06-06 12:16:05 SRCFG00050: quarkus.consul-config.default-config in io.smallrye.config.ConfigSourceContext$ConfigSourceContextConfigSource does not map to any root 2024-06-06 12:16:05 at io.smallrye.config.ConfigMappingProvider.mapConfiguration(ConfigMappingProvider.java:75) 2024-06-06 12:16:05 at io.smallrye.config.SmallRyeConfig.<init>(SmallRyeConfig.java:84) 2024-06-06 12:16:05 at io.smallrye.config.SmallRyeConfigBuilder.build(SmallRyeConfigBuilder.java:714) 2024-06-06 12:16:05 at io.smallrye.config.ConfigSourceFactory$ConfigurableConfigSourceFactory.getConfigSources(ConfigSourceFactory.java:55) 2024-06-06 12:16:05 at io.smallrye.config.ConfigurableConfigSource.getConfigSources(ConfigurableConfigSource.java:50) 2024-06-06 12:16:05 at io.smallrye.config.SmallRyeConfig$ConfigSources.mapLateSources(SmallRyeConfig.java:862) 2024-06-06 12:16:05 at io.smallrye.config.SmallRyeConfig$ConfigSources.<init>(SmallRyeConfig.java:737) 2024-06-06 12:16:05 at io.smallrye.config.SmallRyeConfig.<init>(SmallRyeConfig.java:81) 2024-06-06 12:16:05 at io.smallrye.config.SmallRyeConfigBuilder.build(SmallRyeConfigBuilder.java:714) 2024-06-06 12:16:05 at io.quarkus.runtime.generated.Config.readConfig(Unknown Source) 2024-06-06 12:16:05 at io.quarkus.runtime.generated.Config.createRunTimeConfig(Unknown Source) 2024-06-06 12:16:05 ... 12 more </code>
2024-06-06 12:16:04 Jun 06, 2024 10:16:02 AM io.quarkus.config
2024-06-06 12:16:04 WARN: Unrecognized configuration key "quarkus.consul-config.apps-config.enabled" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2024-06-06 12:16:04 Jun 06, 2024 10:16:02 AM io.quarkus.config
2024-06-06 12:16:04 WARN: Unrecognized configuration key "quarkus.consul.registration.service-id" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2024-06-06 12:16:04 Jun 06, 2024 10:16:02 AM io.quarkus.config
2024-06-06 12:16:04 WARN: Unrecognized configuration key "quarkus.consul.registration.port" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2024-06-06 12:16:04 Jun 06, 2024 10:16:02 AM io.quarkus.config
2024-06-06 12:16:04 WARN: Unrecognized configuration key "quarkus.consul.registration.enabled" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2024-06-06 12:16:04 Jun 06, 2024 10:16:02 AM io.quarkus.config
2024-06-06 12:16:04 WARN: Unrecognized configuration key "quarkus.consul.registration.host" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2024-06-06 12:16:04 Jun 06, 2024 10:16:02 AM io.quarkus.config
2024-06-06 12:16:04 WARN: Unrecognized configuration key "quarkus.consul-config.default-config" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2024-06-06 12:16:04 Jun 06, 2024 10:16:02 AM io.quarkus.config
2024-06-06 12:16:04 WARN: Unrecognized configuration key "quarkus.consul.registration.service-name" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2024-06-06 12:16:05 Configuration validation failed:
2024-06-06 12:16:05     SRCFG00050: quarkus.consul-config.apps-config.enabled in io.smallrye.config.ConfigSourceContext$ConfigSourceContextConfigSource does not map to any root
2024-06-06 12:16:05     SRCFG00050: quarkus.consul-config.default-config in io.smallrye.config.ConfigSourceContext$ConfigSourceContextConfigSource does not map to any root
2024-06-06 12:16:05 java.lang.RuntimeException: Failed to start quarkus
2024-06-06 12:16:05     at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source)
2024-06-06 12:16:05     at io.quarkus.runtime.Application.start(Application.java:101)
2024-06-06 12:16:05     at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:111)
2024-06-06 12:16:05     at io.quarkus.runtime.Quarkus.run(Quarkus.java:71)
2024-06-06 12:16:05     at io.quarkus.runtime.Quarkus.run(Quarkus.java:44)
2024-06-06 12:16:05     at io.quarkus.runtime.Quarkus.run(Quarkus.java:124)
2024-06-06 12:16:05     at io.quarkus.runner.GeneratedMain.main(Unknown Source)
2024-06-06 12:16:05     at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source)
2024-06-06 12:16:05     at java.base/java.lang.reflect.Method.invoke(Unknown Source)
2024-06-06 12:16:05     at io.quarkus.bootstrap.runner.QuarkusEntryPoint.doRun(QuarkusEntryPoint.java:62)
2024-06-06 12:16:05     at io.quarkus.bootstrap.runner.QuarkusEntryPoint.main(QuarkusEntryPoint.java:33)
2024-06-06 12:16:05 Caused by: io.quarkus.runtime.configuration.ConfigurationException: Failed to read configuration properties
2024-06-06 12:16:05     at io.quarkus.deployment.steps.RuntimeConfigSetup.deploy(Unknown Source)
2024-06-06 12:16:05     ... 11 more
2024-06-06 12:16:05 Caused by: io.smallrye.config.ConfigValidationException: Configuration validation failed:
2024-06-06 12:16:05     SRCFG00050: quarkus.consul-config.apps-config.enabled in io.smallrye.config.ConfigSourceContext$ConfigSourceContextConfigSource does not map to any root
2024-06-06 12:16:05     SRCFG00050: quarkus.consul-config.default-config in io.smallrye.config.ConfigSourceContext$ConfigSourceContextConfigSource does not map to any root
2024-06-06 12:16:05     at io.smallrye.config.ConfigMappingProvider.mapConfiguration(ConfigMappingProvider.java:75)
2024-06-06 12:16:05     at io.smallrye.config.SmallRyeConfig.<init>(SmallRyeConfig.java:84)
2024-06-06 12:16:05     at io.smallrye.config.SmallRyeConfigBuilder.build(SmallRyeConfigBuilder.java:714)
2024-06-06 12:16:05     at io.smallrye.config.ConfigSourceFactory$ConfigurableConfigSourceFactory.getConfigSources(ConfigSourceFactory.java:55)
2024-06-06 12:16:05     at io.smallrye.config.ConfigurableConfigSource.getConfigSources(ConfigurableConfigSource.java:50)
2024-06-06 12:16:05     at io.smallrye.config.SmallRyeConfig$ConfigSources.mapLateSources(SmallRyeConfig.java:862)
2024-06-06 12:16:05     at io.smallrye.config.SmallRyeConfig$ConfigSources.<init>(SmallRyeConfig.java:737)
2024-06-06 12:16:05     at io.smallrye.config.SmallRyeConfig.<init>(SmallRyeConfig.java:81)
2024-06-06 12:16:05     at io.smallrye.config.SmallRyeConfigBuilder.build(SmallRyeConfigBuilder.java:714)
2024-06-06 12:16:05     at io.quarkus.runtime.generated.Config.readConfig(Unknown Source)
2024-06-06 12:16:05     at io.quarkus.runtime.generated.Config.createRunTimeConfig(Unknown Source)
2024-06-06 12:16:05     ... 12 more

It is important to say, that I do not have defined these properties in my application.properties file. I also do not use @ConfigMap in my code.

JFYI, the application.properties file looks like this:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>quarkus.http.port=8094
quarkus.http.host=0.0.0.0
kafka.auto.offset.reset=none
quarkus.log.category."org.apache.kafka".level=WARN
service.host=172.29.32.1
# Producer settings
kafka.bootstrap.servers=localhost:29092,localhost:39092
mp.messaging.outgoing.orders-out.connector=smallrye-kafka
mp.messaging.outgoing.orders-out.topic=orders
# Consul
consul.host=localhost
consul.port=8500
# Database
quarkus.datasource.db-kind=postgresql
quarkus.datasource.username=fh
quarkus.datasource.password=fh
quarkus.datasource.jdbc.url=jdbc:postgresql://localhost:6543/orders-db
quarkus.datasource.jdbc.max-size=10
quarkus.hibernate-orm.log.sql=true
quarkus.hibernate-orm.log.format-sql=false
#quarkus.hibernate-orm.database.generation=drop-and-create
# Health
quarkus.http.root-path=/
quarkus.smallrye-health.root-path=/actuator/health
quarkus.smallrye-health.enable-liveness=true
quarkus.smallrye-health.enable-readiness=true
</code>
<code>quarkus.http.port=8094 quarkus.http.host=0.0.0.0 kafka.auto.offset.reset=none quarkus.log.category."org.apache.kafka".level=WARN service.host=172.29.32.1 # Producer settings kafka.bootstrap.servers=localhost:29092,localhost:39092 mp.messaging.outgoing.orders-out.connector=smallrye-kafka mp.messaging.outgoing.orders-out.topic=orders # Consul consul.host=localhost consul.port=8500 # Database quarkus.datasource.db-kind=postgresql quarkus.datasource.username=fh quarkus.datasource.password=fh quarkus.datasource.jdbc.url=jdbc:postgresql://localhost:6543/orders-db quarkus.datasource.jdbc.max-size=10 quarkus.hibernate-orm.log.sql=true quarkus.hibernate-orm.log.format-sql=false #quarkus.hibernate-orm.database.generation=drop-and-create # Health quarkus.http.root-path=/ quarkus.smallrye-health.root-path=/actuator/health quarkus.smallrye-health.enable-liveness=true quarkus.smallrye-health.enable-readiness=true </code>
quarkus.http.port=8094
quarkus.http.host=0.0.0.0

kafka.auto.offset.reset=none
quarkus.log.category."org.apache.kafka".level=WARN

service.host=172.29.32.1

# Producer settings
kafka.bootstrap.servers=localhost:29092,localhost:39092

mp.messaging.outgoing.orders-out.connector=smallrye-kafka
mp.messaging.outgoing.orders-out.topic=orders

# Consul
consul.host=localhost
consul.port=8500

# Database
quarkus.datasource.db-kind=postgresql
quarkus.datasource.username=fh
quarkus.datasource.password=fh
quarkus.datasource.jdbc.url=jdbc:postgresql://localhost:6543/orders-db
quarkus.datasource.jdbc.max-size=10

quarkus.hibernate-orm.log.sql=true
quarkus.hibernate-orm.log.format-sql=false
#quarkus.hibernate-orm.database.generation=drop-and-create

# Health
quarkus.http.root-path=/
quarkus.smallrye-health.root-path=/actuator/health
quarkus.smallrye-health.enable-liveness=true
quarkus.smallrye-health.enable-readiness=true

When starting the application locally, I use eclipse-temurin:21-jre and I also use the same as my base image in the Dockerfile.
My Dockerfile looks like this:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>FROM eclipse-temurin:21-jre
ENV LANGUAGE='en_US:en'
# We make four distinct layers so if there are application changes the library layers can be re-used
COPY --chown=185 build/quarkus-app/lib/ /deployments/lib/
COPY --chown=185 build/quarkus-app/*.jar /deployments/
COPY --chown=185 build/quarkus-app/app/ /deployments/app/
COPY --chown=185 build/quarkus-app/quarkus/ /deployments/quarkus/
EXPOSE 8098
USER 185
ENV JAVA_OPTS_APPEND="-Dquarkus.http.host=0.0.0.0"
ENV JAVA_APP_JAR="/deployments/quarkus-run.jar"
ENTRYPOINT ["java", "-jar", "/deployments/quarkus-run.jar"]
</code>
<code>FROM eclipse-temurin:21-jre ENV LANGUAGE='en_US:en' # We make four distinct layers so if there are application changes the library layers can be re-used COPY --chown=185 build/quarkus-app/lib/ /deployments/lib/ COPY --chown=185 build/quarkus-app/*.jar /deployments/ COPY --chown=185 build/quarkus-app/app/ /deployments/app/ COPY --chown=185 build/quarkus-app/quarkus/ /deployments/quarkus/ EXPOSE 8098 USER 185 ENV JAVA_OPTS_APPEND="-Dquarkus.http.host=0.0.0.0" ENV JAVA_APP_JAR="/deployments/quarkus-run.jar" ENTRYPOINT ["java", "-jar", "/deployments/quarkus-run.jar"] </code>
FROM eclipse-temurin:21-jre

ENV LANGUAGE='en_US:en'


# We make four distinct layers so if there are application changes the library layers can be re-used
COPY --chown=185 build/quarkus-app/lib/ /deployments/lib/
COPY --chown=185 build/quarkus-app/*.jar /deployments/
COPY --chown=185 build/quarkus-app/app/ /deployments/app/
COPY --chown=185 build/quarkus-app/quarkus/ /deployments/quarkus/

EXPOSE 8098
USER 185
ENV JAVA_OPTS_APPEND="-Dquarkus.http.host=0.0.0.0"
ENV JAVA_APP_JAR="/deployments/quarkus-run.jar"

ENTRYPOINT ["java", "-jar", "/deployments/quarkus-run.jar"]

I already tried several things to solve the issue, but none of them worked:

  • adding the gradle dependency io.quarkiverse.config:quarkus-config-consul
  • disabling the config property validation in application.properties

Additional information:
The code for registering the service in Consul:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>@ApplicationScoped
public class ServiceRegistration {
@ConfigProperty(name = "consul.host") String host;
@ConfigProperty(name = "consul.port") int port;
@ConfigProperty(name = "quarkus.http.port", defaultValue = "8094") int servicePort;
@ConfigProperty(name = "service.host", defaultValue = "localhost") String serviceHost;
/**
* Register our two services in Consul.
*
* Note: this method is called on a worker thread, and so it is allowed to block.
*/
public void init(@Observes StartupEvent ev, Vertx vertx) {
ConsulClient client = ConsulClient.create(vertx,
new ConsulClientOptions()
.setHost(host)
.setPort(port));
ServiceOptions serviceOptions = new ServiceOptions()
.setPort(servicePort)
.setAddress(serviceHost)
.setName("ordering-system");
CheckOptions checkOptions = new CheckOptions()
.setHttp("http://" + serviceHost + ":" + servicePort + "/actuator/health")
.setInterval("10s")
.setDeregisterAfter("1m");
serviceOptions.setCheckOptions(checkOptions);
client.registerServiceAndAwait(serviceOptions);
}
}
</code>
<code>@ApplicationScoped public class ServiceRegistration { @ConfigProperty(name = "consul.host") String host; @ConfigProperty(name = "consul.port") int port; @ConfigProperty(name = "quarkus.http.port", defaultValue = "8094") int servicePort; @ConfigProperty(name = "service.host", defaultValue = "localhost") String serviceHost; /** * Register our two services in Consul. * * Note: this method is called on a worker thread, and so it is allowed to block. */ public void init(@Observes StartupEvent ev, Vertx vertx) { ConsulClient client = ConsulClient.create(vertx, new ConsulClientOptions() .setHost(host) .setPort(port)); ServiceOptions serviceOptions = new ServiceOptions() .setPort(servicePort) .setAddress(serviceHost) .setName("ordering-system"); CheckOptions checkOptions = new CheckOptions() .setHttp("http://" + serviceHost + ":" + servicePort + "/actuator/health") .setInterval("10s") .setDeregisterAfter("1m"); serviceOptions.setCheckOptions(checkOptions); client.registerServiceAndAwait(serviceOptions); } } </code>
@ApplicationScoped
public class ServiceRegistration {
    @ConfigProperty(name = "consul.host") String host;
    @ConfigProperty(name = "consul.port") int port;

    @ConfigProperty(name = "quarkus.http.port", defaultValue = "8094") int servicePort;

    @ConfigProperty(name = "service.host", defaultValue = "localhost") String serviceHost;

    /**
     * Register our two services in Consul.
     *
     * Note: this method is called on a worker thread, and so it is allowed to block.
     */
    public void init(@Observes StartupEvent ev, Vertx vertx) {
        ConsulClient client = ConsulClient.create(vertx,
                new ConsulClientOptions()
                        .setHost(host)
                        .setPort(port));

        ServiceOptions serviceOptions = new ServiceOptions()
                .setPort(servicePort)
                .setAddress(serviceHost)
                .setName("ordering-system");

        CheckOptions checkOptions = new CheckOptions()
                .setHttp("http://" + serviceHost + ":" + servicePort + "/actuator/health")
                .setInterval("10s")
                .setDeregisterAfter("1m");

        serviceOptions.setCheckOptions(checkOptions);

        client.registerServiceAndAwait(serviceOptions);
    }
}

New contributor

Sebastian Zahrhuber is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật