I'm unable to reproduce this, can you share the example CURL command you are using that results in this error?
On Wed, Aug 19, 2020 at 9:23 AM Eugene Bolshakoff < [email protected]> wrote: > > Hello, > > PuppetDB is partially broken after we upgrade Debian from Jessie to > Stretch. > PuppetDB version has been upgraded from 5.2.9 to 5.2.18. We used "apt-get > dist-upgrade" command, no manual setups. > > Puppet master works fine with Puppetdb. But, if I try to use API via CURL, > I got: > > <p>Problem accessing /pdb/query/v4/resources. Reason: > <pre> Server Error</pre></p><h3>Caused > by:</h3><pre>clojure.lang.ExceptionInfo: Input to paged-sql does not match > schema: [(named (not (instance? java.lang.String a-honeysql.types.SqlRaw)) > sql) nil] {:type :schema.core/error, :schema [#schema.core.One{:schema > java.lang.String, :optional? false, :name sql} #schema.core.One{:schema > Any, :optional? false, :name arg1}], :value [#sql/raw " ( SELECT > reports.corrective_change AS latest_report_corrective_change, > certnames.deactivated AS deactivated, certnames.expired AS expired, > reports_environment.environment AS report_environment, certnames.certname > AS certname, fs.timestamp AS facts_timestamp, facts_environment.environment > AS facts_environment, reports.cached_catalog_status AS > cached_catalog_status, report_statuses.status AS latest_report_status, > encode(reports.hash::bytea, 'hex') AS latest_report_hash, > catalogs.timestamp AS catalog_timestamp, reports.noop_pending AS > latest_report_noop_pending, reports.end_time AS report_timestamp, > reports.noop AS latest_report_noop, catalog_environment.environment AS > catalog_environment, reports.job_id AS latest_report_job_id FROM certnames > LEFT JOIN catalogs ON catalogs.certname = certnames.certname LEFT JOIN > factsets fs ON certnames.certname = fs.certname LEFT JOIN reports ON > (certnames.certname = reports.certname AND certnames.latest_report_id = > reports.id) LEFT JOIN environments catalog_environment ON > catalog_environment.id = catalogs.environment_id LEFT JOIN > report_statuses ON reports.status_id = report_statuses.id LEFT JOIN > environments facts_environment ON facts_environment.id = > fs.environment_id LEFT JOIN environments reports_environment ON > reports_environment.id = reports.environment_id WHERE > (((certnames.certname) in (SELECT certname FROM ( (SELECT > certnames.certname AS certname FROM factsets fs LEFT JOIN environments ON > fs.environment_id = environments.id LEFT JOIN producers ON fs.producer_id > = producers.id LEFT JOIN certnames ON fs.certname = certnames.certname > WHERE (fs.stable||fs.volatile) @> ?) ) sub)) AND ((certnames.certname) > in (SELECT certname FROM ( (SELECT active_nodes.certname AS certname FROM > active_nodes) ) sub))) ) " {:node-purge-ttl > #object[org.joda.time.Period 0x3484bd4a "P14D"], :limit nil, > :offset nil, :order_by ()}], :error [(named (not (instance? > java.lang.String a-honeysql.types.SqlRaw)) sql) nil]} > at > puppetlabs.puppetdb.jdbc$eval28778$paged_sql__28783.invoke(jdbc.clj:389) > at > puppetlabs.puppetdb.query_eng.engine$compile_user_query__GT_sql.invokeStatic(engine.clj:2429) > at > puppetlabs.puppetdb.query_eng.engine$compile_user_query__GT_sql.doInvoke(engine.clj:2410) > at clojure.lang.RestFn.invoke(RestFn.java:442) > at > puppetlabs.puppetdb.query_eng$query__GT_sql.invokeStatic(query_eng.clj:115) > at > puppetlabs.puppetdb.query_eng$query__GT_sql.invoke(query_eng.clj:88) > at > puppetlabs.puppetdb.query_eng$eval35521$produce_streaming_body__35526$fn__35527$fn__35530.invoke(query_eng.clj:204) > at > puppetlabs.puppetdb.jdbc$with_transacted_connection_fn$fn__28935$fn__28936.invoke(jdbc.clj:514) > at > clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:628) > at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:598) > at > puppetlabs.puppetdb.jdbc$with_transacted_connection_fn$fn__28935.invoke(jdbc.clj:513) > at > puppetlabs.puppetdb.jdbc$eval28909$retry_sql_STAR___28914$fn__28915$fn__28916.invoke(jdbc.clj:485) > at > puppetlabs.puppetdb.jdbc$eval28909$retry_sql_STAR___28914$fn__28915.invoke(jdbc.clj:484) > at > puppetlabs.puppetdb.jdbc$eval28909$retry_sql_STAR___28914.invoke(jdbc.clj:475) > at > puppetlabs.puppetdb.jdbc$with_transacted_connection_fn.invokeStatic(jdbc.clj:511) > at > puppetlabs.puppetdb.jdbc$with_transacted_connection_fn.invoke(jdbc.clj:500) > at > puppetlabs.puppetdb.query_eng$eval35521$produce_streaming_body__35526$fn__35527.invoke(query_eng.clj:200) > at > puppetlabs.puppetdb.query_eng$eval35521$produce_streaming_body__35526.invoke(query_eng.clj:185) > at > puppetlabs.puppetdb.http.query$query_handler$fn__38938.invoke(query.clj:383) > at clojure.core$comp$fn__4727.invoke(core.clj:2460) > at clojure.core$comp$fn__4727.invoke(core.clj:2460) > at compojure.response$eval22875$fn__22876.invoke(response.clj:33) > at > compojure.response$eval22830$fn__22831$G__22821__22838.invoke(response.clj:6) > at > puppetlabs.puppetdb.http.handlers$eval39182$resources_routes__39187$fn__39188$fn__39189.invoke(handlers.clj:201) > at > puppetlabs.puppetdb.http.query$extract_query$fn__38921.invoke(query.clj:315) > at bidi.ring$eval36767$fn__36768.invoke(ring.clj:20) > at > bidi.ring$eval36746$fn__36747$G__36737__36756.invoke(ring.clj:12) > at > puppetlabs.puppetdb.middleware$eval38106$make_pdb_handler__38115$fn__38118$fn__38120.invoke(middleware.clj:360) > at > puppetlabs.puppetdb.middleware$wrap_with_illegal_argument_catch$fn__37966.invoke(middleware.clj:101) > at > puppetlabs.puppetdb.middleware$verify_accepts_content_type$fn__37970.invoke(middleware.clj:116) > at > puppetlabs.puppetdb.middleware$verify_content_type$fn__37982.invoke(middleware.clj:146) > at > puppetlabs.puppetdb.middleware$wrap_with_metrics$fn__38027$fn__38036.invoke(middleware.clj:252) > at > puppetlabs.puppetdb.utils.metrics$multitime_BANG__STAR_$fn__35598$fn__35599$fn__35600.invoke(metrics.clj:14) > at > puppetlabs.puppetdb.utils.metrics.proxy$java.lang.Object$Callable$7da976d4.call(Unknown > Source) > at com.codahale.metrics.Timer.time(Timer.java:101) > at > puppetlabs.puppetdb.utils.metrics$multitime_BANG__STAR_$fn__35598$fn__35599.invoke(metrics.clj:14) > at > puppetlabs.puppetdb.utils.metrics$multitime_BANG__STAR_$fn__35598$fn__35599$fn__35600.invoke(metrics.clj:14) > at > puppetlabs.puppetdb.utils.metrics.proxy$java.lang.Object$Callable$7da976d4.call(Unknown > Source) > at com.codahale.metrics.Timer.time(Timer.java:101) > at > puppetlabs.puppetdb.utils.metrics$multitime_BANG__STAR_$fn__35598$fn__35599.invoke(metrics.clj:14) > at > puppetlabs.puppetdb.utils.metrics$multitime_BANG__STAR_$fn__35598$fn__35599$fn__35600.invoke(metrics.clj:14) > at > puppetlabs.puppetdb.utils.metrics.proxy$java.lang.Object$Callable$7da976d4.call(Unknown > Source) > at com.codahale.metrics.Timer.time(Timer.java:101) > at > puppetlabs.puppetdb.utils.metrics$multitime_BANG__STAR_$fn__35598$fn__35599.invoke(metrics.clj:14) > at > puppetlabs.puppetdb.utils.metrics$multitime_BANG__STAR_$fn__35598$fn__35599$fn__35600.invoke(metrics.clj:14) > at > puppetlabs.puppetdb.utils.metrics.proxy$java.lang.Object$Callable$7da976d4.call(Unknown > Source) > at com.codahale.metrics.Timer.time(Timer.java:101) > at > puppetlabs.puppetdb.utils.metrics$multitime_BANG__STAR_$fn__35598$fn__35599.invoke(metrics.clj:14) > at > puppetlabs.puppetdb.utils.metrics$multitime_BANG__STAR_.invokeStatic(metrics.clj:17) > at > puppetlabs.puppetdb.utils.metrics$multitime_BANG__STAR_.invoke(metrics.clj:6) > at > puppetlabs.puppetdb.middleware$wrap_with_metrics$fn__38027.invoke(middleware.clj:251) > at > puppetlabs.puppetdb.middleware$wrap_with_globals$fn__37961.invoke(middleware.clj:95) > at > puppetlabs.puppetdb.http.server$build_app$fn__39636.invoke(server.clj:74) > at compojure.core$routing$fn__24425.invoke(core.clj:151) > at clojure.core$some.invokeStatic(core.clj:2592) > at clojure.core$some.invoke(core.clj:2583) > at compojure.core$routing.invokeStatic(core.clj:151) > at compojure.core$routing.doInvoke(core.clj:148) > at clojure.lang.RestFn.invoke(RestFn.java:423) > at > puppetlabs.puppetdb.pdb_routing$wrap_with_context$fn__50546.invoke(pdb_routing.clj:35) > at compojure.core$if_context$fn__24487.invoke(core.clj:218) > at compojure.core$routing$fn__24425.invoke(core.clj:151) > at clojure.core$some.invokeStatic(core.clj:2592) > at clojure.core$some.invoke(core.clj:2583) > at compojure.core$routing.invokeStatic(core.clj:151) > at compojure.core$routing.doInvoke(core.clj:148) > at clojure.lang.RestFn.applyTo(RestFn.java:139) > at clojure.core$apply.invokeStatic(core.clj:648) > at clojure.core$apply.invoke(core.clj:641) > at compojure.core$routes$fn__24429.invoke(core.clj:156) > at compojure.core$routing$fn__24425.invoke(core.clj:151) > at clojure.core$some.invokeStatic(core.clj:2592) > at clojure.core$some.invoke(core.clj:2583) > at compojure.core$routing.invokeStatic(core.clj:151) > at compojure.core$routing.doInvoke(core.clj:148) > at clojure.lang.RestFn.invoke(RestFn.java:460) > at > puppetlabs.puppetdb.pdb_routing$pdb_app$fn__50557.invoke(pdb_routing.clj:63) > at compojure.core$if_context$fn__24487.invoke(core.clj:218) > at > ring.middleware.params$wrap_params$fn__35698.invoke(params.clj:64) > at > puppetlabs.puppetdb.middleware$wrap_with_certificate_cn$fn__37951.invoke(middleware.clj:77) > at > puppetlabs.puppetdb.middleware$wrap_with_default_body$fn__37956.invoke(middleware.clj:84) > at > puppetlabs.puppetdb.middleware$wrap_with_debug_logging$fn__37934.invoke(middleware.clj:41) > at > puppetlabs.i18n.core$locale_negotiator$fn__124.invoke(core.clj:357) > at > puppetlabs.trapperkeeper.services.webserver.jetty9_core$ring_handler$fn__44870.invoke(jetty9_core.clj:434) > at > puppetlabs.trapperkeeper.services.webserver.jetty9_core.proxy$org.eclipse.jetty.server.handler.AbstractHandler$ff19274a.handle(Unknown > Source) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) > at > org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257) > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1317) > at > org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:205) > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1219) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144) > at > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:219) > at > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126) > at > org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:724) > at > org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:56) > at > com.puppetlabs.trapperkeeper.services.webserver.jetty9.utils.MDCRequestLogHandler.handle(MDCRequestLogHandler.java:36) > at > org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:169) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) > at org.eclipse.jetty.server.Server.handle(Server.java:531) > at > org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:352) > at > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260) > at > org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:281) > at > org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102) > at > org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118) > at > org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333) > at > org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310) > at > org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168) > at > org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126) > at > org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:762) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:680) > at java.lang.Thread.run(Thread.java:748) > </pre> > > I don't know where to look. Thanks for help. > > WBR, Eugene > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-users/bde62219-68b4-4580-9294-cfe8390ce7b5n%40googlegroups.com > <https://groups.google.com/d/msgid/puppet-users/bde62219-68b4-4580-9294-cfe8390ce7b5n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- *Austin Blatt* Developer, Puppet -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CADVW12Pmc6naME%2BdVTkGMC083qU4RcVpTuRp%3DjYezq%2BT6GW%2BmQ%40mail.gmail.com.
