org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "uk_trusted_app_restrict" Detail: Key (trusted_app_id, restriction_type, restriction_value)=(3, 0, 127.0.0.1) already exists.

Atlassian JIRA | Michael Heemskerk | 3 years ago
  1. 0

    When a trusted application link is updated, the original restrictions are replaced by the new ones. If one or more of the restrictions is unchanged, it causes the following error: {noformat} Next Exception: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "uk_trusted_app_restrict" Detail: Key (trusted_app_id, restriction_type, restriction_value)=(3, 0, 127.0.0.1) already exists. at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2102) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1835) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:407) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2737) at com.jolbox.bonecp.StatementHandle.executeBatch(StatementHandle.java:469) at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.performExecution(BatchingBatch.java:110) at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.doExecuteBatch(BatchingBatch.java:101) at org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl.execute(AbstractBatchImpl.java:149) at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.executeBatch(JdbcCoordinatorImpl.java:198) at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:372) {noformat} Specifically, this error occurs when the IP or URL patterns for a trusted application link is updated (under Admin > Application Links > click a link > Incoming Authentication > Trusted Applications). A workaround is to: * clear both the IP patterns _and_ URL patterns fields * click the 'Update' button. * click 'Incoming Authentication' again * enter the desired IP patterns and URL patterns settings * click the 'Update' button.

    Atlassian JIRA | 3 years ago | Michael Heemskerk
    org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "uk_trusted_app_restrict" Detail: Key (trusted_app_id, restriction_type, restriction_value)=(3, 0, 127.0.0.1) already exists.
  2. 0

    When a trusted application link is updated, the original restrictions are replaced by the new ones. If one or more of the restrictions is unchanged, it causes the following error: {noformat} Next Exception: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "uk_trusted_app_restrict" Detail: Key (trusted_app_id, restriction_type, restriction_value)=(3, 0, 127.0.0.1) already exists. at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2102) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1835) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:407) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2737) at com.jolbox.bonecp.StatementHandle.executeBatch(StatementHandle.java:469) at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.performExecution(BatchingBatch.java:110) at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.doExecuteBatch(BatchingBatch.java:101) at org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl.execute(AbstractBatchImpl.java:149) at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.executeBatch(JdbcCoordinatorImpl.java:198) at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:372) {noformat} Specifically, this error occurs when the IP or URL patterns for a trusted application link is updated (under Admin > Application Links > click a link > Incoming Authentication > Trusted Applications). A workaround is to: * clear both the IP patterns _and_ URL patterns fields * click the 'Update' button. * click 'Incoming Authentication' again * enter the desired IP patterns and URL patterns settings * click the 'Update' button.

    Atlassian JIRA | 3 years ago | Michael Heemskerk
    org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "uk_trusted_app_restrict" Detail: Key (trusted_app_id, restriction_type, restriction_value)=(3, 0, 127.0.0.1) already exists.
  3. 0

    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_fnk__18232__auto___positional$reify__21168.start(services.clj:366) [na:na] at puppetlabs.trapperkeeper.services$eval18068$fn__18082$G__18058__18085.invoke(services.clj:10) [na:na] at puppetlabs.trapperkeeper.services$eval18068$fn__18082$G__18057__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_fnk__18232__auto___positional$reify__21168.start(services.clj:366) [na:na] at puppetlabs.trapperkeeper.services$eval18068$fn__18082$G__18058__18085.invoke(services.clj:10) [na:na] at puppetlabs.trapperkeeper.services$eval18068$fn__18082$G__18057__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 ---- h3. QA Risk Analysis | Probability | Low | | Severity | Med (puppetdb crash | | Risk Level | Low | | Test Level | Unit |

    JIRA | 2 years ago | Pete Brown
    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".
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    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_fnk__18232__auto___positional$reify__21168.start(services.clj:366) [na:na] at puppetlabs.trapperkeeper.services$eval18068$fn__18082$G__18058__18085.invoke(services.clj:10) [na:na] at puppetlabs.trapperkeeper.services$eval18068$fn__18082$G__18057__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_fnk__18232__auto___positional$reify__21168.start(services.clj:366) [na:na] at puppetlabs.trapperkeeper.services$eval18068$fn__18082$G__18058__18085.invoke(services.clj:10) [na:na] at puppetlabs.trapperkeeper.services$eval18068$fn__18082$G__18057__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 ---- h3. QA Risk Analysis | Probability | Low | | Severity | Med (puppetdb crash | | Risk Level | Low | | Test Level | Unit |

    JIRA | 2 years ago | Pete Brown
    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".
  6. 0

    using Visits programmatically

    Google Groups | 4 years ago | Syam Gadde
    org.postgresql.util.PSQLException: ERROR: null value in column "id" violates not-null constraint

    2 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.postgresql.util.PSQLException

      ERROR: duplicate key value violates unique constraint "uk_trusted_app_restrict" Detail: Key (trusted_app_id, restriction_type, restriction_value)=(3, 0, 127.0.0.1) already exists.

      at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse()
    2. PostgreSQL JDBC Driver
      AbstractJdbc2Statement.executeBatch
      1. org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2102)
      2. org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1835)
      3. org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:407)
      4. org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2737)
      4 frames
    3. BoneCP :: Core Library
      StatementHandle.executeBatch
      1. com.jolbox.bonecp.StatementHandle.executeBatch(StatementHandle.java:469)
      1 frame
    4. Hibernate
      ActionQueue.executeActions
      1. org.hibernate.engine.jdbc.batch.internal.BatchingBatch.performExecution(BatchingBatch.java:110)
      2. org.hibernate.engine.jdbc.batch.internal.BatchingBatch.doExecuteBatch(BatchingBatch.java:101)
      3. org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl.execute(AbstractBatchImpl.java:149)
      4. org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.executeBatch(JdbcCoordinatorImpl.java:198)
      5. org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:372)
      5 frames