clojure.lang.ExceptionInfo: Output of initialize-config does not match schema: {:master-code-dir missing-required-key, :master-log-dir missing-required-key, :master-run-dir missing-required-key}

JIRA | Ruth Linehan | 2 years ago
  1. Speed up your debug routine!

    Automated exception search integrated into your IDE

  2. 0

    When using any of the PQL functions it is very easy to get PuppetDB to throw a {{Input to munge-result-row does not match schema}} error. When this is thrown PuppetDB never responds to the query, causing it to timeout. All queries below are calling the root endpoint i.e. {{http://(master):8080/pdb/query/v4?query=(query)}} e.g. The following query: {code} fact_contents[value] { path ~> ["memory",".*","available_bytes"] } {code} Returns the following data as expected: {code} [ { "value": 693243904 }, { "value": 693268480 }, { "value": 3061817344 } ] {code} However if I try to average these numbers: {code} fact_contents[avg(value)] { path ~> ["memory",".*","available_bytes"] } {code} I get the following exception in the PuppetDB logs: {code} clojure.lang.ExceptionInfo: Input to munge-result-row does not match schema: [(named {:avg disallowed-key} row)] at puppetlabs.puppetdb.query.fact_contents$eval26634$munge_result_row__26639.invoke(fact_contents.clj:22) ~[na:na] at clojure.core$map$fn__4785.invoke(core.clj:2646) ~[puppetdb.jar:na] at clojure.lang.LazySeq.sval(LazySeq.java:40) ~[puppetdb.jar:na] at clojure.lang.LazySeq.seq(LazySeq.java:49) ~[puppetdb.jar:na] at clojure.lang.LazySeq.first(LazySeq.java:71) ~[puppetdb.jar:na] at clojure.lang.RT.first(RT.java:667) ~[puppetdb.jar:na] at clojure.core$first__4339.invokeStatic(core.clj:55) ~[puppetdb.jar:na] at clojure.core$first__4339.invoke(core.clj:55) ~[puppetdb.jar:na] at puppetlabs.puppetdb.query_eng$eval26835$produce_streaming_body__26840$fn__26841$fn__26845$fn__26847$fn__26848$fn__26851.invoke(query_eng.clj:182) ~[na:na] at clojure.core$comp$fn__4727.invoke(core.clj:2460) ~[puppetdb.jar:na] at clojure.core$comp$fn__4727.invoke(core.clj:2460) ~[puppetdb.jar:na] at puppetlabs.puppetdb.jdbc$with_query_results_cursor$fn__21251.invoke(jdbc.clj:344) ~[na:na] at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:620) ~[na:na] at clojure.java.jdbc$db_transaction_STAR_.doInvoke(jdbc.clj:568) ~[na:na] at clojure.lang.RestFn.invoke(RestFn.java:425) ~[puppetdb.jar:na] at puppetlabs.puppetdb.jdbc$with_query_results_cursor.invokeStatic(jdbc.clj:337) ~[na:na] at puppetlabs.puppetdb.jdbc$with_query_results_cursor.invoke(jdbc.clj:326) ~[na:na] at puppetlabs.puppetdb.query_eng$eval26835$produce_streaming_body__26840$fn__26841$fn__26845$fn__26847$fn__26848.invoke(query_eng.clj:179) ~[na:na] at puppetlabs.puppetdb.jdbc$with_transacted_connection_fn$fn__21230$fn__21231.invoke(jdbc.clj:306) ~[na:na] {code} However if I try seemingly the exact same thing using a different entity: {code} facts[value] { certname ~ "agent" and name = "uptime_seconds"} {code} Returns: {code} [ { "value": 20844 }, { "value": 20757 } ] {code} And If I try to average it: {code} facts[avg(value)] { certname ~ "agent" and name = "uptime_seconds"} {code} It works: {code} [ { "avg": 20800.5 } ] {code} This seems weird given that the input data for each function seems to be in the exact same format. This not only applicable to the avg() function. In situations where it fails, it will fail regardless of the function that is used.

    JIRA | 5 months ago | Dylan Ratcliffe
    clojure.lang.ExceptionInfo: Input to munge-result-row does not match schema: [(named {:avg disallowed-key} row)]

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. clojure.lang.ExceptionInfo

      Output of initialize-config does not match schema: {:master-code-dir missing-required-key, :master-log-dir missing-required-key, :master-run-dir missing-required-key}

      at puppetlabs.services.jruby.jruby_puppet_core$eval34199$initialize_config__34200.invoke()
    2. puppetlabs.services.jruby
      jruby_puppet_core$eval34199$initialize_config__34200.invoke
      1. puppetlabs.services.jruby.jruby_puppet_core$eval34199$initialize_config__34200.invoke(jruby_puppet_core.clj:84)[na:na]
      1 frame