Uploaded image for project: 'PuppetDB'
  1. PuppetDB
  2. PDB-1362

puppetdb crashes after upgrade

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: PDB 2.3.0, PDB 2.3.1
    • Fix Version/s: PDB 2.3.2
    • Component/s: None
    • Labels:
      None
    • Template:
    • Story Points:
      1
    • Sprint:
      PuppetDB 2015-04-08

      Description

      Hi Gang,

      I just upgraded to PuppetDB 2.3.1 from 2.3.0 in my development environment and PuppetDB crashed on restart.

      If you need more information let me know.

      The resulting log messages.
      2015-04-01 08:44:51,294 INFO [o.e.j.u.log] Logging initialized @24441ms
      2015-04-01 08:44:52,110 INFO [p.t.s.w.jetty9-core] Removing buggy security provider SunPKCS11-NSS version 1.7
      2015-04-01 08:44:52,636 INFO [p.t.s.w.jetty9-service] Initializing web server(s).
      2015-04-01 08:44:52,642 INFO [p.t.s.w.jetty9-service] Starting web server(s).
      2015-04-01 08:44:52,818 INFO [p.t.s.w.jetty9-core] Starting web server.
      2015-04-01 08:44:52,822 INFO [o.e.j.s.Server] jetty-9.2.z-SNAPSHOT
      2015-04-01 08:44:52,874 INFO [o.e.j.s.ServerConnector] Started ServerConnector@66ace155

      {HTTP/1.1}{localhost:8080}
      2015-04-01 08:44:53,150 INFO [o.e.j.s.ServerConnector] Started ServerConnector@7f17e429{SSL-HTTP/1.1}{0.0.0.0:8081}
      2015-04-01 08:44:53,151 INFO [o.e.j.s.Server] Started @26300ms
      2015-04-01 08:44:53,228 INFO [c.p.p.c.services] PuppetDB version 2.3.1
      2015-04-01 08:44:53,362 INFO [c.p.p.s.migrate] Applying database migration version 28
      2015-04-01 08:44:53,396 ERROR [c.p.p.s.migrate] Caught SQLException during migration
      java.sql.BatchUpdateException: Batch entry 5 DELETE FROM fact_paths t1
      WHERE t1.id <> (SELECT MIN(t2.id) FROM fact_paths t2
      WHERE t1.path = t2.path) was aborted. Call getNextException to see the cause.
      at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2746) ~[puppetdb.jar:na]
      at org.postgresql.core.v3.QueryExecutorImpl$1.handleError(QueryExecutorImpl.java:457) ~[puppetdb.jar:na]
      at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1887) ~[puppetdb.jar:na]
      at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:405) ~[puppetdb.jar:na]
      at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2893) ~[puppetdb.jar:na]
      at com.jolbox.bonecp.StatementHandle.executeBatch(StatementHandle.java:469) ~[puppetdb.jar:na]
      at clojure.java.jdbc$do_commands$fn__7301.invoke(jdbc.clj:188) ~[na:na]
      at clojure.java.jdbc.internal$transaction_STAR_.invoke(internal.clj:223) [na:na]
      at clojure.java.jdbc$do_commands.doInvoke(jdbc.clj:187) ~[na:na]
      at clojure.lang.RestFn.invoke(RestFn.java:3894) [puppetdb.jar:na]
      at com.puppetlabs.puppetdb.scf.migrate$lift_fact_paths_into_facts.invoke(migrate.clj:968) ~[na:na]
      at com.puppetlabs.puppetdb.scf.migrate$migrate_BANG_$fn_20902$fn_20915.invoke(migrate.clj:1063) ~[na:na]
      at com.puppetlabs.puppetdb.scf.migrate$migrate_BANG_$fn__20902.invoke(migrate.clj:1062) [na:na]
      at clojure.java.jdbc.internal$transaction_STAR_.invoke(internal.clj:204) [na:na]
      at com.puppetlabs.puppetdb.scf.migrate$migrate_BANG_.invoke(migrate.clj:1059) [na:na]
      at com.puppetlabs.puppetdb.cli.services$start_puppetdb$fn__21109.invoke(services.clj:292) [na:na]
      at clojure.java.jdbc.internal$with_connection_STAR_.invoke(internal.clj:186) [na:na]
      at com.puppetlabs.puppetdb.cli.services$start_puppetdb.invoke(services.clj:290) [na:na]
      at com.puppetlabs.puppetdb.cli.services$reify_21157$service_fnk18232auto_positional$reify_21168.start(services.clj:366) [na:na]
      at puppetlabs.trapperkeeper.services$eval18068$fn_18082$G18058_18085.invoke(services.clj:10) [na:na]
      at puppetlabs.trapperkeeper.services$eval18068$fn_18082$G18057_18089.invoke(services.clj:10) [na:na]
      at puppetlabs.trapperkeeper.internal$run_lifecycle_fn_BANG_.invoke(internal.clj:154) [na:na]
      at puppetlabs.trapperkeeper.internal$run_lifecycle_fns.invoke(internal.clj:182) [na:na]
      at puppetlabs.trapperkeeper.internal$build_app_STAR_$reify__18905.start(internal.clj:449) [na:na]
      at puppetlabs.trapperkeeper.internal$boot_services_STAR_$fn__18917.invoke(internal.clj:473) [na:na]
      at puppetlabs.trapperkeeper.internal$boot_services_STAR_.invoke(internal.clj:471) [na:na]
      at puppetlabs.trapperkeeper.core$boot_with_cli_data.invoke(core.clj:113) [na:na]
      at puppetlabs.trapperkeeper.core$run.invoke(core.clj:144) [na:na]
      at puppetlabs.trapperkeeper.core$main.doInvoke(core.clj:159) [na:na]
      at clojure.lang.RestFn.applyTo(RestFn.java:137) [puppetdb.jar:na]
      at clojure.core$apply.invoke(core.clj:624) [puppetdb.jar:na]
      at com.puppetlabs.puppetdb.cli.services$_main.doInvoke(services.clj:373) [na:na]
      at clojure.lang.RestFn.invoke(RestFn.java:421) [puppetdb.jar:na]
      at clojure.lang.Var.invoke(Var.java:383) [puppetdb.jar:na]
      at clojure.lang.AFn.applyToHelper(AFn.java:156) [puppetdb.jar:na]
      at clojure.lang.Var.applyTo(Var.java:700) [puppetdb.jar:na]
      at clojure.core$apply.invoke(core.clj:624) [puppetdb.jar:na]
      at com.puppetlabs.puppetdb.core$run_command.invoke(core.clj:87) [na:na]
      at com.puppetlabs.puppetdb.core$_main.doInvoke(core.clj:95) [na:na]
      at clojure.lang.RestFn.invoke(RestFn.java:436) [puppetdb.jar:na]
      at clojure.lang.Var.invoke(Var.java:388) [puppetdb.jar:na]
      at clojure.lang.AFn.applyToHelper(AFn.java:160) [puppetdb.jar:na]
      at clojure.lang.Var.applyTo(Var.java:700) [puppetdb.jar:na]
      at clojure.core$apply.invoke(core.clj:624) [puppetdb.jar:na]
      at clojure.main$main_opt.invoke(main.clj:315) [puppetdb.jar:na]
      at clojure.main$main.doInvoke(main.clj:420) [puppetdb.jar:na]
      at clojure.lang.RestFn.invoke(RestFn.java:482) [puppetdb.jar:na]
      at clojure.lang.Var.invoke(Var.java:401) [puppetdb.jar:na]
      at clojure.lang.AFn.applyToHelper(AFn.java:171) [puppetdb.jar:na]
      at clojure.lang.Var.applyTo(Var.java:700) [puppetdb.jar:na]
      at clojure.main.main(main.java:37) [puppetdb.jar:na]
      2015-04-01 08:44:53,398 ERROR [c.p.p.s.migrate] Unravelled exception
      org.postgresql.util.PSQLException: ERROR: update or delete on table "fact_paths" violates foreign key constraint "fact_values_path_id_fk" on table "fact_values"
      Detail: Key (id)=(452) is still referenced from table "fact_values".
      at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2157) ~[puppetdb.jar:na]
      at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1886) ~[puppetdb.jar:na]
      at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:405) ~[puppetdb.jar:na]
      at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2893) ~[puppetdb.jar:na]
      at com.jolbox.bonecp.StatementHandle.executeBatch(StatementHandle.java:469) ~[puppetdb.jar:na]
      at clojure.java.jdbc$do_commands$fn__7301.invoke(jdbc.clj:188) ~[na:na]
      at clojure.java.jdbc.internal$transaction_STAR_.invoke(internal.clj:223) [na:na]
      at clojure.java.jdbc$do_commands.doInvoke(jdbc.clj:187) ~[na:na]
      at clojure.lang.RestFn.invoke(RestFn.java:3894) [puppetdb.jar:na]
      at com.puppetlabs.puppetdb.scf.migrate$lift_fact_paths_into_facts.invoke(migrate.clj:968) ~[na:na]
      at com.puppetlabs.puppetdb.scf.migrate$migrate_BANG_$fn_20902$fn_20915.invoke(migrate.clj:1063) ~[na:na]
      at com.puppetlabs.puppetdb.scf.migrate$migrate_BANG_$fn__20902.invoke(migrate.clj:1062) [na:na]
      at clojure.java.jdbc.internal$transaction_STAR_.invoke(internal.clj:204) [na:na]
      at com.puppetlabs.puppetdb.scf.migrate$migrate_BANG_.invoke(migrate.clj:1059) [na:na]
      at com.puppetlabs.puppetdb.cli.services$start_puppetdb$fn__21109.invoke(services.clj:292) [na:na]
      at clojure.java.jdbc.internal$with_connection_STAR_.invoke(internal.clj:186) [na:na]
      at com.puppetlabs.puppetdb.cli.services$start_puppetdb.invoke(services.clj:290) [na:na]
      at com.puppetlabs.puppetdb.cli.services$reify_21157$service_fnk18232auto_positional$reify_21168.start(services.clj:366) [na:na]
      at puppetlabs.trapperkeeper.services$eval18068$fn_18082$G18058_18085.invoke(services.clj:10) [na:na]
      at puppetlabs.trapperkeeper.services$eval18068$fn_18082$G18057_18089.invoke(services.clj:10) [na:na]
      at puppetlabs.trapperkeeper.internal$run_lifecycle_fn_BANG_.invoke(internal.clj:154) [na:na]
      at puppetlabs.trapperkeeper.internal$run_lifecycle_fns.invoke(internal.clj:182) [na:na]
      at puppetlabs.trapperkeeper.internal$build_app_STAR_$reify__18905.start(internal.clj:449) [na:na]
      at puppetlabs.trapperkeeper.internal$boot_services_STAR_$fn__18917.invoke(internal.clj:473) [na:na]
      at puppetlabs.trapperkeeper.internal$boot_services_STAR_.invoke(internal.clj:471) [na:na]
      at puppetlabs.trapperkeeper.core$boot_with_cli_data.invoke(core.clj:113) [na:na]
      at puppetlabs.trapperkeeper.core$run.invoke(core.clj:144) [na:na]
      at puppetlabs.trapperkeeper.core$main.doInvoke(core.clj:159) [na:na]
      at clojure.lang.RestFn.applyTo(RestFn.java:137) [puppetdb.jar:na]
      at clojure.core$apply.invoke(core.clj:624) [puppetdb.jar:na]
      at com.puppetlabs.puppetdb.cli.services$_main.doInvoke(services.clj:373) [na:na]
      at clojure.lang.RestFn.invoke(RestFn.java:421) [puppetdb.jar:na]
      at clojure.lang.Var.invoke(Var.java:383) [puppetdb.jar:na]
      at clojure.lang.AFn.applyToHelper(AFn.java:156) [puppetdb.jar:na]
      at clojure.lang.Var.applyTo(Var.java:700) [puppetdb.jar:na]
      at clojure.core$apply.invoke(core.clj:624) [puppetdb.jar:na]
      at com.puppetlabs.puppetdb.core$run_command.invoke(core.clj:87) [na:na]
      at com.puppetlabs.puppetdb.core$_main.doInvoke(core.clj:95) [na:na]
      at clojure.lang.RestFn.invoke(RestFn.java:436) [puppetdb.jar:na]
      at clojure.lang.Var.invoke(Var.java:388) [puppetdb.jar:na]
      at clojure.lang.AFn.applyToHelper(AFn.java:160) [puppetdb.jar:na]
      at clojure.lang.Var.applyTo(Var.java:700) [puppetdb.jar:na]
      at clojure.core$apply.invoke(core.clj:624) [puppetdb.jar:na]
      at clojure.main$main_opt.invoke(main.clj:315) [puppetdb.jar:na]
      at clojure.main$main.doInvoke(main.clj:420) [puppetdb.jar:na]
      at clojure.lang.RestFn.invoke(RestFn.java:482) [puppetdb.jar:na]
      at clojure.lang.Var.invoke(Var.java:401) [puppetdb.jar:na]
      at clojure.lang.AFn.applyToHelper(AFn.java:171) [puppetdb.jar:na]
      at clojure.lang.Var.applyTo(Var.java:700) [puppetdb.jar:na]
      at clojure.main.main(main.java:37) [puppetdb.jar:na]
      2015-04-01 08:44:53,403 INFO [p.t.internal] Shutting down due to JVM shutdown hook.
      2015-04-01 08:44:53,404 INFO [p.t.internal] Beginning shutdown sequence
      2015-04-01 08:44:53,406 INFO [c.p.p.c.services] Shutdown request received; puppetdb exiting.
      2015-04-01 08:44:53,406 INFO [p.t.s.w.jetty9-service] Shutting down web server(s).
      2015-04-01 08:44:53,407 INFO [p.t.s.w.jetty9-core] Shutting down web server.
      2015-04-01 08:44:53,414 INFO [o.e.j.s.ServerConnector] Stopped ServerConnector@66ace155{HTTP/1.1} {localhost:8080}

      2015-04-01 08:44:53,420 INFO [o.e.j.s.ServerConnector] Stopped ServerConnector@7f17e429

      {SSL-HTTP/1.1} {0.0.0.0:8081}

      2015-04-01 08:44:53,422 INFO [p.t.s.w.jetty9-core] Web server shutdown
      2015-04-01 08:44:53,423 INFO [p.t.internal] Finished shutdown sequence


      QA Risk Analysis

      Probability Low
      Severity Med (puppetdb crash
      Risk Level Low
      Test Level Unit

        Attachments

          Activity

            jsd-sla-details-panel

              People

              • Assignee:
                Unassigned
                Reporter:
                rendhalver Pete Brown
                QA Contact:
                Kurt Wall
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: