clojure.lang.ExceptionInfo: Input to maybe-activate-node! does not match schema: [nil (named (not (datetime? nil)) time)]

JIRA | Daniel Dreier | 1 year ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    I realize this is a bit of an edge case. I'm experimenting with scripts to submit facts to PuppetDB and I accidentally submitted facts with producer_timestamp in MM-DD-YYYY format rather than the expected YYYY-MM-DD format. I got a 200 and a UUID back, but the node facts aren't in puppetdb and in the logs, I get errors like the following: {code} 2015-09-23 16:36:52,495 ERROR [p.p.mq-listener] message receive failed clojure.lang.ExceptionInfo: Input to maybe-activate-node! does not match schema: [nil (named (not (datetime? nil)) time)] at puppetlabs.puppetdb.scf.storage$eval16589$maybe_activate_node_BANG___16590.invoke(storage.clj:1195) ~[na:na] at puppetlabs.puppetdb.command$eval30122$fn__30125$fn__30133.invoke(command.clj:224) ~[na:na] at puppetlabs.puppetdb.jdbc$with_transacted_connection_fn$fn__6270$fn__6271$fn__6272.invoke(jdbc.clj:234) ~[na:na] at clojure.java.jdbc.internal$transaction_STAR_.invoke(internal.clj:204) ~[na:na] at puppetlabs.puppetdb.jdbc$with_transacted_connection_fn$fn__6270$fn__6271.invoke(jdbc.clj:234) ~[na:na] at clojure.java.jdbc.internal$with_connection_STAR_.invoke(internal.clj:186) ~[na:na] at puppetlabs.puppetdb.jdbc$with_transacted_connection_fn$fn__6270.invoke(jdbc.clj:231) ~[na:na] at puppetlabs.puppetdb.jdbc$eval6248$retry_sql_STAR___6249$fn__6250$fn__6251.invoke(jdbc.clj:203) ~[na:na] at puppetlabs.puppetdb.jdbc$eval6248$retry_sql_STAR___6249$fn__6250.invoke(jdbc.clj:202) ~[na:na] at puppetlabs.puppetdb.jdbc$eval6248$retry_sql_STAR___6249.invoke(jdbc.clj:194) ~[na:na] at puppetlabs.puppetdb.jdbc$with_transacted_connection_fn.invoke(jdbc.clj:230) ~[na:na] at puppetlabs.puppetdb.command$eval30122$fn__30125.invoke(command.clj:223) ~[na:na] at clojure.lang.MultiFn.invoke(MultiFn.java:233) ~[puppetdb.jar:na] at puppetlabs.puppetdb.command$reify__30213$service_fnk__21198__auto___positional$reify__30222$fn__30224.invoke(command.clj:310) ~[na:na] at puppetlabs.puppetdb.mq_listener$reify__31024$service_fnk__21198__auto___positional$reify__31034.process_message(mq_listener.clj:398) ~[na:na] at puppetlabs.puppetdb.mq_listener$reify__31024$service_fnk__21198__auto___positional$reify__31034$process_msg__31036.invoke(mq_listener.clj:366) ~[na:na] at puppetlabs.puppetdb.mq_listener$wrap_with_discard$fn__30861$fn__30865.invoke(mq_listener.clj:219) ~[na:na] at puppetlabs.puppetdb.mq_listener.proxy$java.lang.Object$Callable$7da976d4.call(Unknown Source) ~[na:na] at com.yammer.metrics.core.Timer.time(Timer.java:91) ~[puppetdb.jar:na] at puppetlabs.puppetdb.mq_listener$wrap_with_discard$fn__30861.invoke(mq_listener.clj:218) ~[na:na] at puppetlabs.puppetdb.mq_listener$wrap_with_exception_handling$fn__30848$fn__30850.invoke(mq_listener.clj:172) ~[na:na] at puppetlabs.puppetdb.mq_listener.proxy$java.lang.Object$Callable$7da976d4.call(Unknown Source) ~[na:na] at com.yammer.metrics.core.Timer.time(Timer.java:91) ~[puppetdb.jar:na] at puppetlabs.puppetdb.mq_listener$wrap_with_exception_handling$fn__30848.invoke(mq_listener.clj:171) ~[na:na] at puppetlabs.puppetdb.mq_listener$wrap_with_command_parser$fn__30856.invoke(mq_listener.clj:194) ~[na:na] at puppetlabs.puppetdb.mq_listener$wrap_with_meter$fn__30840.invoke(mq_listener.clj:132) ~[na:na] at puppetlabs.puppetdb.mq_listener$wrap_with_thread_name$fn__30870.invoke(mq_listener.clj:234) ~[na:na] at puppetlabs.puppetdb.mq_listener$start_receiver$reify__31017.onMessage(mq_listener.clj:348) ~[na:na] at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:1394) [puppetdb.jar:na] at org.apache.activemq.ActiveMQMessageConsumer.iterate(ActiveMQMessageConsumer.java:1556) [puppetdb.jar:na] at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:191) [puppetdb.jar:na] at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:133) [puppetdb.jar:na] at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:48) [puppetdb.jar:na] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_51] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_51] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_51] {code} This error seems to happen every second, even after I tried restarting puppetdb. If it would be useful, I'd be glad to provide a more automated test case. edit: I should have been more clear what I was asking for - the behavior I would have expected would be that invalid input would be rejected rather than give me back an HTTP 200.

    JIRA | 1 year ago | Daniel Dreier
    clojure.lang.ExceptionInfo: Input to maybe-activate-node! does not match schema: [nil (named (not (datetime? nil)) time)]

    Root Cause Analysis

    1. clojure.lang.ExceptionInfo

      Input to maybe-activate-node! does not match schema: [nil (named (not (datetime? nil)) time)]

      at puppetlabs.puppetdb.scf.storage$eval16589$maybe_activate_node_BANG___16590.invoke()
    2. puppetlabs.puppetdb.scf
      storage$eval16589$maybe_activate_node_BANG___16590.invoke
      1. puppetlabs.puppetdb.scf.storage$eval16589$maybe_activate_node_BANG___16590.invoke(storage.clj:1195)[na:na]
      1 frame
    3. puppetlabs.puppetdb
      jdbc$with_transacted_connection_fn$fn__6270$fn__6271$fn__6272.invoke
      1. puppetlabs.puppetdb.command$eval30122$fn__30125$fn__30133.invoke(command.clj:224)[na:na]
      2. puppetlabs.puppetdb.jdbc$with_transacted_connection_fn$fn__6270$fn__6271$fn__6272.invoke(jdbc.clj:234)[na:na]
      2 frames
    4. notificationagent
      internal$transaction_STAR_.invoke
      1. clojure.java.jdbc.internal$transaction_STAR_.invoke(internal.clj:204)[na:na]
      1 frame
    5. puppetlabs.puppetdb
      jdbc$with_transacted_connection_fn$fn__6270$fn__6271.invoke
      1. puppetlabs.puppetdb.jdbc$with_transacted_connection_fn$fn__6270$fn__6271.invoke(jdbc.clj:234)[na:na]
      1 frame
    6. notificationagent
      internal$with_connection_STAR_.invoke
      1. clojure.java.jdbc.internal$with_connection_STAR_.invoke(internal.clj:186)[na:na]
      1 frame
    7. puppetlabs.puppetdb
      command$eval30122$fn__30125.invoke
      1. puppetlabs.puppetdb.jdbc$with_transacted_connection_fn$fn__6270.invoke(jdbc.clj:231)[na:na]
      2. puppetlabs.puppetdb.jdbc$eval6248$retry_sql_STAR___6249$fn__6250$fn__6251.invoke(jdbc.clj:203)[na:na]
      3. puppetlabs.puppetdb.jdbc$eval6248$retry_sql_STAR___6249$fn__6250.invoke(jdbc.clj:202)[na:na]
      4. puppetlabs.puppetdb.jdbc$eval6248$retry_sql_STAR___6249.invoke(jdbc.clj:194)[na:na]
      5. puppetlabs.puppetdb.jdbc$with_transacted_connection_fn.invoke(jdbc.clj:230)[na:na]
      6. puppetlabs.puppetdb.command$eval30122$fn__30125.invoke(command.clj:223)[na:na]
      6 frames
    8. Clojure
      MultiFn.invoke
      1. clojure.lang.MultiFn.invoke(MultiFn.java:233)[puppetdb.jar:na]
      1 frame
    9. puppetlabs.puppetdb
      mq_listener$wrap_with_discard$fn__30861$fn__30865.invoke
      1. puppetlabs.puppetdb.command$reify__30213$service_fnk__21198__auto___positional$reify__30222$fn__30224.invoke(command.clj:310)[na:na]
      2. puppetlabs.puppetdb.mq_listener$reify__31024$service_fnk__21198__auto___positional$reify__31034.process_message(mq_listener.clj:398)[na:na]
      3. puppetlabs.puppetdb.mq_listener$reify__31024$service_fnk__21198__auto___positional$reify__31034$process_msg__31036.invoke(mq_listener.clj:366)[na:na]
      4. puppetlabs.puppetdb.mq_listener$wrap_with_discard$fn__30861$fn__30865.invoke(mq_listener.clj:219)[na:na]
      4 frames
    10. puppetlabs.puppetdb.mq_listener
      Object$Callable$7da976d4.call
      1. puppetlabs.puppetdb.mq_listener.proxy$java.lang.Object$Callable$7da976d4.call(Unknown Source)[na:na]
      1 frame
    11. Apache Giraph Core
      Timer.time
      1. com.yammer.metrics.core.Timer.time(Timer.java:91)[puppetdb.jar:na]
      1 frame
    12. puppetlabs.puppetdb
      mq_listener$wrap_with_exception_handling$fn__30848$fn__30850.invoke
      1. puppetlabs.puppetdb.mq_listener$wrap_with_discard$fn__30861.invoke(mq_listener.clj:218)[na:na]
      2. puppetlabs.puppetdb.mq_listener$wrap_with_exception_handling$fn__30848$fn__30850.invoke(mq_listener.clj:172)[na:na]
      2 frames
    13. puppetlabs.puppetdb.mq_listener
      Object$Callable$7da976d4.call
      1. puppetlabs.puppetdb.mq_listener.proxy$java.lang.Object$Callable$7da976d4.call(Unknown Source)[na:na]
      1 frame
    14. Apache Giraph Core
      Timer.time
      1. com.yammer.metrics.core.Timer.time(Timer.java:91)[puppetdb.jar:na]
      1 frame
    15. puppetlabs.puppetdb
      mq_listener$start_receiver$reify__31017.onMessage
      1. puppetlabs.puppetdb.mq_listener$wrap_with_exception_handling$fn__30848.invoke(mq_listener.clj:171)[na:na]
      2. puppetlabs.puppetdb.mq_listener$wrap_with_command_parser$fn__30856.invoke(mq_listener.clj:194)[na:na]
      3. puppetlabs.puppetdb.mq_listener$wrap_with_meter$fn__30840.invoke(mq_listener.clj:132)[na:na]
      4. puppetlabs.puppetdb.mq_listener$wrap_with_thread_name$fn__30870.invoke(mq_listener.clj:234)[na:na]
      5. puppetlabs.puppetdb.mq_listener$start_receiver$reify__31017.onMessage(mq_listener.clj:348)[na:na]
      5 frames
    16. ActiveMQ :: Core
      PooledTaskRunner$1.run
      1. org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:1394)[puppetdb.jar:na]
      2. org.apache.activemq.ActiveMQMessageConsumer.iterate(ActiveMQMessageConsumer.java:1556)[puppetdb.jar:na]
      3. org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:191)[puppetdb.jar:na]
      4. org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:133)[puppetdb.jar:na]
      5. org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:48)[puppetdb.jar:na]
      5 frames
    17. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[na:1.8.0_51]
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[na:1.8.0_51]
      3. java.lang.Thread.run(Thread.java:745)[na:1.8.0_51]
      3 frames