Hello Rob Thanks for that. I can now get PuppetDB to start following your instructions. I'm running on Ubuntu 18 which uses PostgreSQL 10 and this version of PostgreSQL doesn't like some aspects of the SQL being performed by the JAR.
Excerpt from the log file ... ------------------------------------------------------------------------------------------------------------------------------------- 2018-07-24 22:05:52,203 INFO [p.p.c.services] Finished gc packages 2018-07-24 22:05:52,204 INFO [p.p.c.services] Starting database garbage collection 2018-07-24 22:05:52,250 WARN [c.z.h.p.ProxyConnection] PDBWritePool - Connection org.postgresql.jdbc.PgConnection@6e32d291 marked as broken because of SQLSTATE(0A000), ErrorCode(0) java.sql.BatchUpdateException: Batch entry 0 with recursive live_paths(key, path, value) as (select key, key as path, value from (select (jsonb_each(stable||volatile)).* from factsets) as base_case union all select sub_path as key, sub_paths.path||'#~'||sub_path as path, sub_value as value from (select * from (select path, case jsonb_typeof(value) when 'object' then (jsonb_each(value)).key when 'array' then generate_series(0, jsonb_array_length(value - 1))::text end as sub_path, case jsonb_typeof(value) when 'object' then (jsonb_each(value)).value when 'array' then jsonb_array_elements(value) end as sub_value from live_paths) as candidates where candidates.sub_path is not null) as sub_paths) delete from fact_paths fp where not exists (select 1 from live_paths where live_paths.path = fp.path) was aborted: ERROR: set-returning functions are not allowed in CASE Hint: You might be able to move the set-returning function into a LATERAL FROM item. Position: 559 Call getNextException to see other errors in the batch. at org.postgresql.jdbc.BatchResultHandler.handleError(BatchResultHandler.java:145) at org.postgresql.core.ResultHandlerDelegate.handleError(ResultHandlerDelegate.java:50) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2179) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:479) at org.postgresql.jdbc.PgStatement.executeBatch(PgStatement.java:835) at com.zaxxer.hikari.pool.ProxyStatement.executeBatch(ProxyStatement.java:128) at com.zaxxer.hikari.pool.HikariProxyStatement.executeBatch(HikariProxyStatement.java) at clojure.java.jdbc$execute_batch.invokeStatic(jdbc.clj:533) at clojure.java.jdbc$execute_batch.invoke(jdbc.clj:526) at clojure.java.jdbc$db_do_commands$fn__24916.invoke(jdbc.clj:873) at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:784) at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:711) at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:724) at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:711) at clojure.java.jdbc$db_do_commands.invokeStatic(jdbc.clj:872) at clojure.java.jdbc$db_do_commands.invoke(jdbc.clj:857) at puppetlabs.puppetdb.jdbc$do_commands.invokeStatic(jdbc.clj:38) at puppetlabs.puppetdb.jdbc$do_commands.doInvoke(jdbc.clj:33) at clojure.lang.RestFn.invoke(RestFn.java:408) at puppetlabs.puppetdb.scf.storage$delete_unused_fact_paths.invokeStatic(storage.clj:1127) at puppetlabs.puppetdb.scf.storage$delete_unused_fact_paths.invoke(storage.clj:1123) at puppetlabs.puppetdb.scf.storage$garbage_collect_BANG_$fn__32259$fn__32262.invoke(storage.clj:1439) at puppetlabs.puppetdb.jdbc$with_transacted_connection_fn$fn__25578$fn__25579.invoke(jdbc.clj:483) at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:741) at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:711) at puppetlabs.puppetdb.jdbc$with_transacted_connection_fn$fn__25578.invoke(jdbc.clj:482) at puppetlabs.puppetdb.jdbc$eval25552$retry_sql_STAR___25557$fn__25558$fn__25559.invoke(jdbc.clj:454) at puppetlabs.puppetdb.jdbc$eval25552$retry_sql_STAR___25557$fn__25558.invoke(jdbc.clj:453) at puppetlabs.puppetdb.jdbc$eval25552$retry_sql_STAR___25557.invoke(jdbc.clj:444) at puppetlabs.puppetdb.jdbc$with_transacted_connection_fn.invokeStatic(jdbc.clj:480) at puppetlabs.puppetdb.jdbc$with_transacted_connection_fn.invoke(jdbc.clj:469) at puppetlabs.puppetdb.scf.storage$garbage_collect_BANG_$fn__32259.invoke(storage.clj:1438) at puppetlabs.puppetdb.scf.storage.proxy$java.lang.Object$Callable$7da976d4.call(Unknown Source) at com.codahale.metrics.Timer.time(Timer.java:101) at puppetlabs.puppetdb.scf.storage$garbage_collect_BANG_.invokeStatic(storage.clj:1432) at puppetlabs.puppetdb.scf.storage$garbage_collect_BANG_.invoke(storage.clj:1429) at puppetlabs.puppetdb.cli.services$garbage_collect_BANG_.invokeStatic(services.clj:189) at puppetlabs.puppetdb.cli.services$garbage_collect_BANG_.invoke(services.clj:180) at puppetlabs.puppetdb.cli.services$eval40243$clean_up__40248$fn__40252$fn__40262.invoke(services.clj:259) at puppetlabs.puppetdb.cli.services.proxy$java.lang.Object$Callable$7da976d4.call(Unknown Source) at com.codahale.metrics.Timer.time(Timer.java:101) at puppetlabs.puppetdb.cli.services$eval40243$clean_up__40248$fn__40252.invoke(services.clj:258) at puppetlabs.puppetdb.cli.services$eval40243$clean_up__40248.invoke(services.clj:220) at puppetlabs.puppetdb.cli.services$collect_garbage.invokeStatic(services.clj:373) at puppetlabs.puppetdb.cli.services$collect_garbage.invoke(services.clj:368) at puppetlabs.puppetdb.cli.services$start_puppetdb$fn__40323.invoke(services.clj:434) at clojure.lang.AFn.run(AFn.java:22) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: org.postgresql.util.PSQLException: ERROR: set-returning functions are not allowed in CASE Hint: You might be able to move the set-returning function into a LATERAL FROM item. Position: 559 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2433) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2178) ... 51 common frames omitted 2018-07-24 22:05:52,263 ERROR [p.p.c.services] Error during garbage collection clojure.lang.ExceptionInfo: Rollback failed handling "Batch entry 0 with recursive live_paths(key, path, value) as (select key, key as path, value from (select (jsonb_each(stable||volatile)).* from factsets) as base_case union all select sub_path as key, sub_paths.path||'#~'||sub_path as path, sub_value as value from (select * from (select path, case jsonb_typeof(value) when 'object' then (jsonb_each(value)).key when 'array' then generate_series(0, jsonb_array_length(value - 1))::text end as sub_path, case jsonb_typeof(value) when 'object' then (jsonb_each(value)).value when 'array' then jsonb_array_elements(value) end as sub_value from live_paths) as candidates where candidates.sub_path is not null) as sub_paths) delete from fact_paths fp where not exists (select 1 from live_paths where live_paths.path = fp.path) was aborted: ERROR: set-returning functions are not allowed in CASE Hint: You might be able to move the set-returning function into a LATERAL FROM item. Position: 559 Call getNextException to see other errors in the batch." at clojure.core$ex_info.invokeStatic(core.clj:4739) at clojure.core$ex_info.invoke(core.clj:4739) at clojure.java.jdbc$db_transaction_STAR_$fn__24869.invoke(jdbc.clj:751) at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:747) at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:711) at puppetlabs.puppetdb.jdbc$with_transacted_connection_fn$fn__25578.invoke(jdbc.clj:482) at puppetlabs.puppetdb.jdbc$eval25552$retry_sql_STAR___25557$fn__25558$fn__25559.invoke(jdbc.clj:454) ------------------------------------------------------------------------------------------------------------------------------------- I can probably use a remote DB running on U16 with PostgreSQL 9.5 and I'm hopeful that this will get me working. Thanks for your help thus far. I will let you know if I finally get this working. Simon On Tuesday, July 24, 2018 at 6:45:41 AM UTC+10, Rob Browning wrote: > > Simon Tideswell <stide...@gmail.com <javascript:>> writes: > > > Hello Rob > > > > Thanks for that information. *lein uberjar *worked. But it built a jar > that > > does not contain every library necessary to run PuppetDB. > > Oh, I missed this message before my last reply, and I think I may have > just gotten the invocation slightly wrong. How about this: > > java -cp target/puppetdb.jar clojure.main -m puppetlabs.puppetdb.main \ > services -c foo.ini > > You might also eventually want some other arguments (setting the heap, > etc.). I suspect whatever invocation's in the existing packages might > be fine. > > Thanks > -- > Rob Browning > -- 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 puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/bc38bb87-e7d8-48d6-8240-b33c206e52f1%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.