I encountered this very same problem installing puppetDB v4.4 from RPM on CentOS 7.2.1511, with postgres v9.4 installed via RPMs retrieved from yum.postgresql.org.
I tried following the instructions here for creating the puppetdb role and database in postgresql: https://docs.puppet.com/puppetdb/4.4/configure.html#using-postgresql Nevertheless, pointing the puppetdb service to this blank database and starting it up yielded this same (persistent) error in puppetdb.log, quoted below. A resolution I found was to pg_restore a backup from another instance of puppetdb, and then restart puppetdb again. That is, the problem appears to be limited to populating the postgres database on first startup. 2017-10-06 17:28:42,627 INFO [p.p.s.migrate] Applying database migration version 28 2017-10-06 17:28:43,153 INFO [p.p.s.migrate] Applying database migration version 29 2017-10-06 17:28:43,564 INFO [p.p.s.migrate] Applying database migration version 30 2017-10-06 17:28:43,571 INFO [p.p.s.migrate] Applying database migration version 31 2017-10-06 17:28:43,586 INFO [p.p.s.migrate] Applying database migration version 32 2017-10-06 17:28:43,589 INFO [p.p.s.migrate] Applying database migration version 33 2017-10-06 17:28:43,611 INFO [p.p.s.migrate] Applying database migration version 34 2017-10-06 17:28:43,632 INFO [p.p.s.migrate] Applying database migration version 35 2017-10-06 17:28:43,633 INFO [p.p.s.migrate] Applying database migration version 36 2017-10-06 17:28:43,635 INFO [p.p.s.migrate] Applying database migration version 37 2017-10-06 17:28:43,637 INFO [p.p.s.migrate] Applying database migration version 38 2017-10-06 17:28:43,647 INFO [p.p.s.migrate] Applying database migration version 39 2017-10-06 17:28:43,791 INFO [p.p.s.migrate] Applying database migration version 40 2017-10-06 17:28:43,803 INFO [p.p.s.migrate] Applying database migration version 41 2017-10-06 17:28:43,804 INFO [p.p.s.migrate] Applying database migration version 42 2017-10-06 17:28:43,840 INFO [p.p.s.migrate] Applying database migration version 43 2017-10-06 17:28:43,853 ERROR [p.p.s.migrate] Caught SQLException during migration java.sql.BatchUpdateException: Batch entry 1 CREATE AGGREGATE md5_agg (BYTEA) ( sfunc = dual_md5, stype = bytea, initcond = '\x00' ) was aborted. Call getNextException to see the cause. at org.postgresql.jdbc.BatchResultHandler.handleError(BatchResultHandler.java:133) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2004) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:360) at org.postgresql.jdbc.PgStatement.executeBatch(PgStatement.java:1019) 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:439) at clojure.java.jdbc$execute_batch.invoke(jdbc.clj:432) at clojure.java.jdbc$db_do_commands$fn__21807.invoke(jdbc.clj:748) at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:662) at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:598) at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:611) at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:598) at clojure.java.jdbc$db_do_commands.invokeStatic(jdbc.clj:747) at clojure.java.jdbc$db_do_commands.invoke(jdbc.clj:732) 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:436) at puppetlabs.puppetdb.scf.migrate$add_indexes_for_reports_summary_query.invokeStatic(migrate.clj:900) at puppetlabs.puppetdb.scf.migrate$add_indexes_for_reports_summary_query.invoke(migrate.clj:898) at puppetlabs.puppetdb.scf.migrate$migrate_BANG_$fn__35954$fn__35963.invoke(migrate.clj:1400) at puppetlabs.puppetdb.scf.migrate$sql_or_die.invokeStatic(migrate.clj:1343) at puppetlabs.puppetdb.scf.migrate$sql_or_die.invoke(migrate.clj:1334) at puppetlabs.puppetdb.scf.migrate$migrate_BANG_$fn__35954.invoke(migrate.clj:1400) 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.scf.migrate$migrate_BANG_.invokeStatic(migrate.clj:1397) at puppetlabs.puppetdb.scf.migrate$migrate_BANG_.invoke(migrate.clj:1367) at puppetlabs.puppetdb.cli.services$initialize_schema.invokeStatic(services.clj:293) at puppetlabs.puppetdb.cli.services$initialize_schema.invoke(services.clj:284) at puppetlabs.puppetdb.cli.services$init_with_db$fn__36175.invoke(services.clj:316) at puppetlabs.puppetdb.cli.services$init_with_db.invokeStatic(services.clj:312) at puppetlabs.puppetdb.cli.services$init_with_db.invoke(services.clj:297) at puppetlabs.puppetdb.cli.services$start_puppetdb.invokeStatic(services.clj:343) at puppetlabs.puppetdb.cli.services$start_puppetdb.invoke(services.clj:323) at puppetlabs.puppetdb.cli.services$reify__36282$service_fnk__19218__auto___positional$reify__36291.start(services.clj:432) at puppetlabs.trapperkeeper.services$eval19020$fn__19034$G__19010__19037.invoke(services.clj:8) at puppetlabs.trapperkeeper.services$eval19020$fn__19034$G__19009__19041.invoke(services.clj:8) at puppetlabs.trapperkeeper.internal$eval19576$run_lifecycle_fn_BANG___19583$fn__19584.invoke(internal.clj:204) at puppetlabs.trapperkeeper.internal$eval19576$run_lifecycle_fn_BANG___19583.invoke(internal.clj:187) at puppetlabs.trapperkeeper.internal$eval19605$run_lifecycle_fns__19610$fn__19611.invoke(internal.clj:238) at puppetlabs.trapperkeeper.internal$eval19605$run_lifecycle_fns__19610.invoke(internal.clj:215) at puppetlabs.trapperkeeper.internal$eval20075$build_app_STAR___20084$fn$reify__20094.start(internal.clj:591) at puppetlabs.trapperkeeper.internal$eval20121$boot_services_for_app_STAR__STAR___20128$fn__20129$fn__20131.invoke(internal.clj:617) at puppetlabs.trapperkeeper.internal$eval20121$boot_services_for_app_STAR__STAR___20128$fn__20129.invoke(internal.clj:615) at puppetlabs.trapperkeeper.internal$eval20121$boot_services_for_app_STAR__STAR___20128.invoke(internal.clj:609) at clojure.core$partial$fn__4761.invoke(core.clj:2521) at puppetlabs.trapperkeeper.internal$eval19644$initialize_lifecycle_worker__19655$fn__19656$fn__19742$state_machine__14866__auto____19743$fn__19745.invoke(internal.clj:255) at puppetlabs.trapperkeeper.internal$eval19644$initialize_lifecycle_worker__19655$fn__19656$fn__19742$state_machine__14866__auto____19743.invoke(internal.clj:255) at clojure.core.async.impl.ioc_macros$run_state_machine.invokeStatic(ioc_macros.clj:1012) at clojure.core.async.impl.ioc_macros$run_state_machine.invoke(ioc_macros.clj:1011) at clojure.core.async.impl.ioc_macros$run_state_machine_wrapped.invokeStatic(ioc_macros.clj:1016) at clojure.core.async.impl.ioc_macros$run_state_machine_wrapped.invoke(ioc_macros.clj:1014) at clojure.core.async$ioc_alts_BANG_$fn__15034.invoke(async.clj:383) at clojure.core.async$do_alts$fn__14980$fn__14983.invoke(async.clj:252) at clojure.core.async.impl.channels.ManyToManyChannel$fn__9790$fn__9791.invoke(channels.clj:95) at clojure.lang.AFn.run(AFn.java:22) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) 2017-10-06 17:28:43,854 ERROR [p.p.s.migrate] Unravelled exception org.postgresql.util.PSQLException: ERROR: invalid byte sequence for encoding "UTF8": 0x00 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2284) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2003) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:360) at org.postgresql.jdbc.PgStatement.executeBatch(PgStatement.java:1019) 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:439) at clojure.java.jdbc$execute_batch.invoke(jdbc.clj:432) at clojure.java.jdbc$db_do_commands$fn__21807.invoke(jdbc.clj:748) at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:662) at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:598) at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:611) at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:598) at clojure.java.jdbc$db_do_commands.invokeStatic(jdbc.clj:747) at clojure.java.jdbc$db_do_commands.invoke(jdbc.clj:732) 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:436) at puppetlabs.puppetdb.scf.migrate$add_indexes_for_reports_summary_query.invokeStatic(migrate.clj:900) at puppetlabs.puppetdb.scf.migrate$add_indexes_for_reports_summary_query.invoke(migrate.clj:898) at puppetlabs.puppetdb.scf.migrate$migrate_BANG_$fn__35954$fn__35963.invoke(migrate.clj:1400) at puppetlabs.puppetdb.scf.migrate$sql_or_die.invokeStatic(migrate.clj:1343) at puppetlabs.puppetdb.scf.migrate$sql_or_die.invoke(migrate.clj:1334) at puppetlabs.puppetdb.scf.migrate$migrate_BANG_$fn__35954.invoke(migrate.clj:1400) 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.scf.migrate$migrate_BANG_.invokeStatic(migrate.clj:1397) at puppetlabs.puppetdb.scf.migrate$migrate_BANG_.invoke(migrate.clj:1367) at puppetlabs.puppetdb.cli.services$initialize_schema.invokeStatic(services.clj:293) at puppetlabs.puppetdb.cli.services$initialize_schema.invoke(services.clj:284) at puppetlabs.puppetdb.cli.services$init_with_db$fn__36175.invoke(services.clj:316) at puppetlabs.puppetdb.cli.services$init_with_db.invokeStatic(services.clj:312) at puppetlabs.puppetdb.cli.services$init_with_db.invoke(services.clj:297) at puppetlabs.puppetdb.cli.services$start_puppetdb.invokeStatic(services.clj:343) at puppetlabs.puppetdb.cli.services$start_puppetdb.invoke(services.clj:323) at puppetlabs.puppetdb.cli.services$reify__36282$service_fnk__19218__auto___positional$reify__36291.start(services.clj:432) at puppetlabs.trapperkeeper.services$eval19020$fn__19034$G__19010__19037.invoke(services.clj:8) at puppetlabs.trapperkeeper.services$eval19020$fn__19034$G__19009__19041.invoke(services.clj:8) at puppetlabs.trapperkeeper.internal$eval19576$run_lifecycle_fn_BANG___19583$fn__19584.invoke(internal.clj:204) at puppetlabs.trapperkeeper.internal$eval19576$run_lifecycle_fn_BANG___19583.invoke(internal.clj:187) at puppetlabs.trapperkeeper.internal$eval19605$run_lifecycle_fns__19610$fn__19611.invoke(internal.clj:238) at puppetlabs.trapperkeeper.internal$eval19605$run_lifecycle_fns__19610.invoke(internal.clj:215) at puppetlabs.trapperkeeper.internal$eval20075$build_app_STAR___20084$fn$reify__20094.start(internal.clj:591) at puppetlabs.trapperkeeper.internal$eval20121$boot_services_for_app_STAR__STAR___20128$fn__20129$fn__20131.invoke(internal.clj:617) at puppetlabs.trapperkeeper.internal$eval20121$boot_services_for_app_STAR__STAR___20128$fn__20129.invoke(internal.clj:615) at puppetlabs.trapperkeeper.internal$eval20121$boot_services_for_app_STAR__STAR___20128.invoke(internal.clj:609) at clojure.core$partial$fn__4761.invoke(core.clj:2521) at puppetlabs.trapperkeeper.internal$eval19644$initialize_lifecycle_worker__19655$fn__19656$fn__19742$state_machine__14866__auto____19743$fn__19745.invoke(internal.clj:255) at puppetlabs.trapperkeeper.internal$eval19644$initialize_lifecycle_worker__19655$fn__19656$fn__19742$state_machine__14866__auto____19743.invoke(internal.clj:255) at clojure.core.async.impl.ioc_macros$run_state_machine.invokeStatic(ioc_macros.clj:1012) at clojure.core.async.impl.ioc_macros$run_state_machine.invoke(ioc_macros.clj:1011) at clojure.core.async.impl.ioc_macros$run_state_machine_wrapped.invokeStatic(ioc_macros.clj:1016) at clojure.core.async.impl.ioc_macros$run_state_machine_wrapped.invoke(ioc_macros.clj:1014) at clojure.core.async$ioc_alts_BANG_$fn__15034.invoke(async.clj:383) at clojure.core.async$do_alts$fn__14980$fn__14983.invoke(async.clj:252) at clojure.core.async.impl.channels.ManyToManyChannel$fn__9790$fn__9791.invoke(channels.clj:95) at clojure.lang.AFn.run(AFn.java:22) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) 2017-10-06 17:28:43,857 INFO [p.t.internal] Shutting down due to JVM shutdown hook. 2017-10-06 17:28:43,859 INFO [p.t.internal] Beginning shutdown sequence >From postgresql.log: 2017-10-06 17:34:44 UTC ERROR: invalid byte sequence for encoding "UTF8": 0x00 2017-10-06 17:34:44 UTC STATEMENT: CREATE AGGREGATE md5_agg (BYTEA) ( sfunc = dual_md5, stype = bytea, initcond = '\x00' ) On Friday, February 17, 2017 at 11:26:53 AM UTC-6, Wyatt Alt wrote: > > Hi, > > This seems like a bug to me, but I can't reproduce it on postgres 9.4 + > centos 7.3 and the combination of PDB 4.3 and postgres 9.4 is widely > used/tested. > > Can you give a bit more detail about your environment? I'd like to know > your OS and version and the method you used to install postgres. It would > also be good to see the output of > > '\l+' > > executed in psql, which will give you a table like this: > https://gist.github.com/wkalt/bbffafe68ec4018f7bcbc5b62961dc24 > > Thanks, > Wyatt > -- 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/54210685-2175-4a5d-93f6-897966331737%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.