question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Unrecognized configuration key" regression in 1.11.0.CR1

See original GitHub issue

Describe the bug When running in native mode with 1.11.0.CR1, we get “Unrecognized configuration key” warnings on a list of properties. those properties are all “quarkus” properties (we do not have any warnings on our applicative properties). some of those properties come from src/main/resources/application.yml, some properties come from runtime provided “application.yml”, and some properties are not set at all in any of these 2 files. We do not have this behavior in 1.10.5 native, or 1.11.0.CR1 jvm. The interesting thing is that the program is running normally. that is those properties are correctly read from the config.

Expected behavior No warnings “Unrecognized configuration key” in native mode.

Actual behavior here is what we get at startup:

__  ____  __  _____   ___  __ ____  ______ 
 --/ __ \/ / / / _ | / _ \/ //_/ / / / __/ 
 -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \   
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/   
2021-01-11 10:25:14,762 WARN  [io.qua.config] (main) Unrecognized configuration key "quarkus.logserver.display-env-variables" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2021-01-11 10:25:14,762 WARN  [io.qua.config] (main) Unrecognized configuration key "quarkus.freemarker.directive.base64" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2021-01-11 10:25:14,762 WARN  [io.qua.config] (main) Unrecognized configuration key "quarkus.log.console.darken" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2021-01-11 10:25:14,762 WARN  [io.qua.config] (main) Unrecognized configuration key "quarkus.freemarker.directive.mongodb_uri" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2021-01-11 10:25:14,762 WARN  [io.qua.config] (main) Unrecognized configuration key "quarkus.freemarker.default-encoding" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2021-01-11 10:25:14,762 WARN  [io.qua.config] (main) Unrecognized configuration key "quarkus.freemarker.template-exception-handler" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2021-01-11 10:25:14,762 WARN  [io.qua.config] (main) Unrecognized configuration key "quarkus.freemarker.log-template-exceptions" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2021-01-11 10:25:14,762 WARN  [io.qua.config] (main) Unrecognized configuration key "quarkus.smbj.hostname" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2021-01-11 10:25:14,762 WARN  [io.qua.config] (main) Unrecognized configuration key "quarkus.freemarker.boolean-format" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2021-01-11 10:25:14,762 WARN  [io.qua.config] (main) Unrecognized configuration key "quarkus.freemarker.object-wrapper-expose-fields" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2021-01-11 10:25:14,762 WARN  [io.qua.config] (main) Unrecognized configuration key "quarkus.log.filter."org.jboss.threads".if-starts-with" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2021-01-11 10:25:14,762 WARN  [io.qua.config] (main) Unrecognized configuration key "quarkus.freemarker.directive.json" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2021-01-11 10:25:14,762 WARN  [io.qua.config] (main) Unrecognized configuration key "quarkus.application.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
2021-01-11 10:25:14,762 WARN  [io.qua.config] (main) Unrecognized configuration key "quarkus.freemarker.number-format" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2021-01-11 10:25:14,762 WARN  [io.qua.config] (main) Unrecognized configuration key "quarkus.log.category."io.quarkus.vault".level" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2021-01-11 10:25:14,762 WARN  [io.qua.config] (main) Unrecognized configuration key "quarkus.freemarker.wrap-unchecked-exceptions" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2021-01-11 10:25:14,762 WARN  [io.qua.config] (main) Unrecognized configuration key "quarkus.log.category."com.lodh.arte.ocpdeploy".level" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2021-01-11 10:25:14,762 WARN  [io.qua.config] (main) Unrecognized configuration key "quarkus.logserver.erl-url" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2021-01-11 10:25:14,762 WARN  [io.qua.config] (main) Unrecognized configuration key "quarkus.freemarker.fallback-on-null-loop-variable" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2021-01-11 10:25:14,762 WARN  [io.qua.config] (main) Unrecognized configuration key "quarkus.log.filter."org.hibernate.validator.internal.util.Version".if-starts-with" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2021-01-11 10:25:14,762 WARN  [io.qua.config] (main) Unrecognized configuration key "quarkus.profile" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2021-01-11 10:25:14,762 WARN  [io.qua.config] (main) Unrecognized configuration key "quarkus.log.min-level" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2021-01-11 10:25:14,762 WARN  [io.qua.config] (main) Unrecognized configuration key "quarkus.freemarker.file-paths" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2021-01-11 10:25:14,762 WARN  [io.qua.config] (main) Unrecognized configuration key "quarkus.freemarker.directive.indent" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2021-01-11 10:25:14,762 WARN  [io.qua.config] (main) Unrecognized configuration key "quarkus.application.version" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2021-01-11 10:25:14,762 WARN  [io.qua.config] (main) Unrecognized configuration key "quarkus.freemarker.directive.yaml" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2021-01-11 10:25:15,203 INFO  [com.lod.art.log.LogServerHandlerRecorder] (main) Initializing LogServer Agent
2021-01-11 10:25:15,215 INFO  [io.quarkus] (main) ocpdeploy 4.1.0-SNAPSHOT native (powered by Quarkus 1.11.0.CR1) started in 0.463s. 
2021-01-11 10:25:15,215 INFO  [io.quarkus] (main) Profile prod activated. 
2021-01-11 10:25:15,215 INFO  [io.quarkus] (main) Installed features: [cdi, config-yaml, freemarker, hibernate-validator, kubernetes-client, logserver, mutiny, openshift-client, rest-client, rest-client-jackson, smallrye-context-propagation, smbj, vault]

From all of these properties we have 3 cases:

properties coming from src/main/resources/application.yaml

quarkus:
  log:
    min-level: DEBUG
  smbj:
    hostname: ${ocpdeploy.share.hostname:""}
  freemarker:
    file-paths: ${ocpdeploy.workspace-path}
    default-encoding: UTF-8
    template-exception-handler: rethrow
    log-template-exceptions: false
    wrap-unchecked-exceptions: true
    fallback-on-null-loop-variable: true
    boolean-format: c
    number-format: computer
    object-wrapper-expose-fields: true
    directive:
      base64: ...
      indent: ...
      yaml: ...
      json: ...
      mongodb_uri: ...
  logserver:
    erl-url: ${ocpdeploy.erl.url}

which is all quarkus properties, except:

  vault:
    kv-secret-engine-version: 1

properties coming from runtime provided application.yaml

                logserver:
                  display-env-variables: false
                log:
                  category:
                    "...":
                      level: DEBUG
                    "io.quarkus.vault":
                      level: DEBUG

which is all quarkus properties except vault properties:

              quarkus:
                vault:
                  url: ...
                  authentication:
                    kubernetes:
                      role: ...
                  secret-config-kv-path:
                    creds: ...

properties not coming from our config either runtime or build time

quarkus.log.console.darken
quarkus.log.filter."org.jboss.threads".if-starts-with
quarkus.application.name
quarkus.log.filter."org.hibernate.validator.internal.util.Version".if-starts-with
quarkus.profile
quarkus.application.version

To Reproduce We tried to reproduce in a simple “getting started” example, but did not succeed (instead we stumbled upon https://github.com/quarkusio/quarkus/issues/14229). so unfortunately we do not have a reproducer.

I tried printing a few variables at startup (some coming from src/main/resources/application.yml, and some coming from the runtime provided application.yml):

    @ConfigProperty(name = "quarkus.smbj.hostname")
    String quarkusSmbjHostname;

    @ConfigProperty(name = "quarkus.freemarker.default-encoding")
    String quarkusFreemarkerDefaultEncoding;

    @ConfigProperty(name = "quarkus.logserver.display-env-variables")
    Boolean quarkusLogServerDisplayEnvVariables;

    public void execute() throws InterruptedException, TemplateException, NoSuchAlgorithmException, IOException {

        log.info("quarkus.smbj.hostname => " + quarkusSmbjHostname);
        log.info("quarkus.freemarker.default-encoding => " + quarkusFreemarkerDefaultEncoding);
        log.info("quarkus.logserver.display-env-variables => " + quarkusLogServerDisplayEnvVariables);

in jvm mode I get (which is expected):

2021-01-11 18:32:59,313 INFO (main) quarkus.smbj.hostname => ...some value...
2021-01-11 18:32:59,314 INFO (main) quarkus.freemarker.default-encoding => UTF-8
2021-01-11 18:32:59,315 INFO (main) quarkus.logserver.display-env-variables => false

in native mode I get the same values, but with the unexpected warnings, such as:

2021-01-11 17:53:50,404 WARN  [io.qua.config] (main) Unrecognized configuration key "quarkus.smbj.hostname" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo

so properties are read appropriately (which explains why the program is running normally). the only issue seems to be those invalid warnings.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:20 (18 by maintainers)

github_iconTop GitHub Comments

2reactions
geoandcommented, Jan 12, 2021

@vsevel Stuart’s fix in https://github.com/quarkusio/quarkus/pull/14247 should take care of the issue.

I tried it with another example and the problem went away.

0reactions
vsevelcommented, Jan 12, 2021

@stuartwdouglas well done!

Read more comments on GitHub >

github_iconTop Results From Across the Web

quarkusio/quarkus 1.11.0.Final on GitHub - NewReleases.io
Final to 3.0.18.Final; #14233 - "Unrecognized configuration key" regression in 1.11.0.CR1; #14231 - Remove quarkus-resteasy-reactive-spi from the runtime ...
Read more >
chore(deps): update dependency io.quarkus:quarkus ... - GitLab
Final; #​14233 - "Unrecognized configuration key" regression in 1.11.0.CR1; #​14231 - Remove quarkus-resteasy-reactive-spi from the runtime dependencies of ...
Read more >
Java Agent version 1.x - Elastic
Remove the custom service.name field setting and either allow the agent to automatically discover and set it, or use the service_version config option...
Read more >
F-20 Branched report: 20131110 changes - Fedora Mailing-Lists
CR1.fc20 Hibernate Search New package: ... 'colormgr dump' output - Restrict the length of key and values when setting metadata Size change: ...
Read more >
Debian -- Source Packages in "bullseye"
... apt-cacher-ng (3.6.4-1); apt-config-auto-update (2.1+nmu1) ... binutils-riscv64-unknown-elf (2.32.2020.04+dfsg-2); binutils-xtensa-lx106 (3) ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found