org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "resource_params_cache_pkey" Detail: Key (resource)=(f324ac019bfc50c61785b3fa2646bf5047433010) already exists.

JIRA | Wyatt Alt | 2 years ago
  1. 0

    This is an error I see in the postgres logs for the customer in PE-7392. I haven't seen it anywhere else, but it indicates that the DB got into a bad state: {code} < 2015-01-05 13:53:45.371 CET >ERROR: duplicate key value violates unique constraint "resource_params_cache_pkey" < 2015-01-05 13:53:45.371 CET >DETAIL: Key (resource)=(5824201f36916255fbc271f881f110585aff9491) already exists. < 2015-01-05 13:53:45.371 CET >STATEMENT: INSERT INTO resource_params_cache (resource,parameters) VALUES ($1,$2) RETURNING * {code} Here's a full stacktrace from PDB logs {code} 2014-12-10 15:38:12,081 ERROR [c.p.p.command] [4d733b2c-0464-4b21-8871-7ea6fd90df60] [replace catalog] Retrying after attempt 4, due to: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "resource_params_cache_pkey" Detail: Key (resource)=(f324ac019bfc50c61785b3fa2646bf5047433010) already exists. org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "resource_params_cache_pkey" Detail: Key (resource)=(f324ac019bfc50c61785b3fa2646bf5047433010) already exists. 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:255) ~[puppetdb.jar:na] at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555) ~[puppetdb.jar:na] at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417) ~[puppetdb.jar:na] at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:363) ~[puppetdb.jar:na] at com.jolbox.bonecp.PreparedStatementHandle.executeUpdate(PreparedStatementHandle.java:203) ~[puppetdb.jar:na] at clojure.java.jdbc.internal$do_prepared_return_keys_STAR_$fn__6343.invoke(internal.clj:337) ~[na:na] at clojure.java.jdbc.internal$transaction_STAR_.invoke(internal.clj:223) ~[na:na] at clojure.java.jdbc.internal$do_prepared_return_keys_STAR_.invoke(internal.clj:337) ~[na:na] at clojure.lang.AFn.applyToHelper(AFn.java:156) ~[puppetdb.jar:na] at clojure.lang.AFn.applyTo(AFn.java:144) ~[puppetdb.jar:na] at clojure.core$apply.invoke(core.clj:626) ~[puppetdb.jar:na] at clojure.java.jdbc$insert_values.doInvoke(jdbc.clj:263) ~[na:na] at clojure.lang.RestFn.invoke(RestFn.java:442) ~[puppetdb.jar:na] at clojure.java.jdbc$insert_records$ins_v__6411.invoke(jdbc.clj:278) ~[na:na] at clojure.core$map$fn__4245.invoke(core.clj:2559) ~[puppetdb.jar:na] at clojure.lang.LazySeq.sval(LazySeq.java:40) ~[puppetdb.jar:na] at clojure.lang.LazySeq.seq(LazySeq.java:49) ~[puppetdb.jar:na] at clojure.lang.Cons.next(Cons.java:39) ~[puppetdb.jar:na] at clojure.lang.RT.next(RT.java:598) ~[puppetdb.jar:na] at clojure.core$next.invoke(core.clj:64) ~[puppetdb.jar:na] at clojure.core$dorun.invoke(core.clj:2856) ~[puppetdb.jar:na] at clojure.core$doall.invoke(core.clj:2871) ~[puppetdb.jar:na] at clojure.java.jdbc$insert_records.doInvoke(jdbc.clj:279) ~[na:na] at clojure.lang.RestFn.applyTo(RestFn.java:139) ~[puppetdb.jar:na] at clojure.core$apply.invoke(core.clj:626) ~[puppetdb.jar:na] at com.puppetlabs.puppetdb.scf.storage$eval9198$insert_records_STAR___9199$fn__9200.invoke(storage.clj:423) ~[na:na] at com.puppetlabs.puppetdb.scf.storage$eval9198$insert_records_STAR___9199.invoke(storage.clj:418) ~[na:na] at com.puppetlabs.puppetdb.scf.storage$eval9217$add_params_BANG___9218$fn__9219.invoke(storage.clj:438) ~[na:na] at com.puppetlabs.puppetdb.scf.storage$eval9217$add_params_BANG___9218.invoke(storage.clj:425) ~[na:na] at com.puppetlabs.puppetdb.scf.storage$eval9401$add_resources_BANG___9402$fn__9403$fn__9404.invoke(storage.clj:558) ~[na:na] at clojure.java.jdbc.internal$transaction_STAR_.invoke(internal.clj:223) ~[na:na] at com.puppetlabs.puppetdb.scf.storage$eval9401$add_resources_BANG___9402$fn__9403.invoke(storage.clj:557) ~[na:na] at com.puppetlabs.puppetdb.scf.storage$eval9401$add_resources_BANG___9402.invoke(storage.clj:550) ~[na:na] at com.puppetlabs.puppetdb.scf.storage$eval9571$update_catalog_associations_BANG___9572$fn__9576$fn__9578.invoke(storage.clj:656) ~[na:na] at com.puppetlabs.puppetdb.scf.storage.proxy$java.lang.Object$Callable$7da976d4.call(Unknown Source) ~[na:na] at com.yammer.metrics.core.Timer.time(Timer.java:91) ~[puppetdb.jar:na] at com.puppetlabs.puppetdb.scf.storage$eval9571$update_catalog_associations_BANG___9572$fn__9576.invoke(storage.clj:655) ~[na:na] at com.puppetlabs.puppetdb.scf.storage$eval9571$update_catalog_associations_BANG___9572.invoke(storage.clj:650) ~[na:na] at com.puppetlabs.puppetdb.scf.storage$eval9628$add_new_catalog__9629$fn__9630$fn__9631.invoke(storage.clj:688) ~[na:na] at com.puppetlabs.puppetdb.scf.storage.proxy$java.lang.Object$Callable$7da976d4.call(Unknown Source) ~[na:na] at com.yammer.metrics.core.Timer.time(Timer.java:91) ~[puppetdb.jar:na] at com.puppetlabs.puppetdb.scf.storage$eval9628$add_new_catalog__9629$fn__9630.invoke(storage.clj:686) ~[na:na] at com.puppetlabs.puppetdb.scf.storage$eval9628$add_new_catalog__9629.invoke(storage.clj:679) ~[na:na] at com.puppetlabs.puppetdb.scf.storage$eval9655$add_catalog_BANG___9656$fn__9662$fn__9671.invoke(storage.clj:712) ~[na:na] at clojure.java.jdbc.internal$transaction_STAR_.invoke(internal.clj:223) ~[na:na] at com.puppetlabs.puppetdb.scf.storage$eval9655$add_catalog_BANG___9656$fn__9662.invoke(storage.clj:709) ~[na:na] at com.puppetlabs.puppetdb.scf.storage$eval9655$add_catalog_BANG___9656.invoke(storage.clj:690) ~[na:na] at com.puppetlabs.puppetdb.scf.storage$eval10208$replace_catalog_BANG___10209$fn__10215$fn__10217$fn__10218.invoke(storage.clj:1223) ~[na:na] at clojure.java.jdbc.internal$transaction_STAR_.invoke(internal.clj:223) ~[na:na] at com.puppetlabs.puppetdb.scf.storage$eval10208$replace_catalog_BANG___10209$fn__10215$fn__10217.invoke(storage.clj:1222) ~[na:na] at com.puppetlabs.puppetdb.scf.storage.proxy$java.lang.Object$Callable$7da976d4.call(Unknown Source) ~[na:na] at com.yammer.metrics.core.Timer.time(Timer.java:91) ~[puppetdb.jar:na] at com.puppetlabs.puppetdb.scf.storage$eval10208$replace_catalog_BANG___10209$fn__10215.invoke(storage.clj:1221) ~[na:na] at com.puppetlabs.puppetdb.scf.storage$eval10208$replace_catalog_BANG___10209.invoke(storage.clj:1210) ~[na:na] at com.puppetlabs.puppetdb.command$replace_catalog_STAR_$fn__11475.invoke(command.clj:313) ~[na:na] at com.puppetlabs.jdbc$with_transacted_connection_fn$fn__6761$fn__6762$fn__6763.invoke(jdbc.clj:290) ~[na:na] at clojure.java.jdbc.internal$transaction_STAR_.invoke(internal.clj:204) ~[na:na] at com.puppetlabs.jdbc$with_transacted_connection_fn$fn__6761$fn__6762.invoke(jdbc.clj:290) ~[na:na] at clojure.java.jdbc.internal$with_connection_STAR_.invoke(internal.clj:186) ~[na:na] at com.puppetlabs.jdbc$with_transacted_connection_fn$fn__6761.invoke(jdbc.clj:287) ~[na:na] at com.puppetlabs.jdbc$eval6739$retry_sql_STAR___6740$fn__6741$fn__6742.invoke(jdbc.clj:259) ~[na:na] at com.puppetlabs.jdbc$eval6739$retry_sql_STAR___6740$fn__6741.invoke(jdbc.clj:258) ~[na:na] at com.puppetlabs.jdbc$eval6739$retry_sql_STAR___6740.invoke(jdbc.clj:250) ~[na:na] at com.puppetlabs.jdbc$with_transacted_connection_fn.invoke(jdbc.clj:286) ~[na:na] at com.puppetlabs.puppetdb.command$replace_catalog_STAR_.invoke(command.clj:309) ~[na:na] at com.puppetlabs.puppetdb.command$eval11505$fn__11507.invoke(command.clj:347) ~[na:na] at clojure.lang.MultiFn.invoke(MultiFn.java:231) ~[puppetdb.jar:na] at com.puppetlabs.puppetdb.command$produce_message_handler$fn__11715.invoke(command.clj:647) ~[na:na] at com.puppetlabs.puppetdb.command$wrap_with_discard$fn__11664$fn__11668.invoke(command.clj:554) ~[na:na] at com.puppetlabs.puppetdb.command.proxy$java.lang.Object$Callable$7da976d4.call(Unknown Source) ~[na:na] at com.yammer.metrics.core.Timer.time(Timer.java:91) ~[puppetdb.jar:na] at com.puppetlabs.puppetdb.command$wrap_with_discard$fn__11664.invoke(command.clj:553) ~[na:na] at com.puppetlabs.puppetdb.command$wrap_with_exception_handling$fn__11649$fn__11650.invoke(command.clj:507) ~[na:na] at com.puppetlabs.puppetdb.command.proxy$java.lang.Object$Callable$7da976d4.call(Unknown Source) ~[na:na] at com.yammer.metrics.core.Timer.time(Timer.java:91) ~[puppetdb.jar:na] at com.puppetlabs.puppetdb.command$wrap_with_exception_handling$fn__11649.invoke(command.clj:506) ~[na:na] at com.puppetlabs.puppetdb.command$wrap_with_command_parser$fn__11659.invoke(command.clj:529) [na:na] at com.puppetlabs.puppetdb.command$wrap_with_meter$fn__11639.invoke(command.clj:467) [na:na] at com.puppetlabs.puppetdb.command$wrap_with_thread_name$fn__11673.invoke(command.clj:569) [na:na] at com.puppetlabs.mq$create_message_listener$reify__10820.onMessage(mq.clj:270) [na:na] at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:560) [puppetdb.jar:na] at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:498) [puppetdb.jar:na] at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:467) [puppetdb.jar:na] at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:325) [puppetdb.jar:na] at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:263) [puppetdb.jar:na] {code} judging by their PDB logs it's been happening infrequently going back to November. We should figure out what happened here.

    JIRA | 2 years ago | Wyatt Alt
    org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "resource_params_cache_pkey" Detail: Key (resource)=(f324ac019bfc50c61785b3fa2646bf5047433010) already exists.
  2. 0

    This is an error I see in the postgres logs for the customer in PE-7392. I haven't seen it anywhere else, but it indicates that the DB got into a bad state: {code} < 2015-01-05 13:53:45.371 CET >ERROR: duplicate key value violates unique constraint "resource_params_cache_pkey" < 2015-01-05 13:53:45.371 CET >DETAIL: Key (resource)=(5824201f36916255fbc271f881f110585aff9491) already exists. < 2015-01-05 13:53:45.371 CET >STATEMENT: INSERT INTO resource_params_cache (resource,parameters) VALUES ($1,$2) RETURNING * {code} Here's a full stacktrace from PDB logs {code} 2014-12-10 15:38:12,081 ERROR [c.p.p.command] [4d733b2c-0464-4b21-8871-7ea6fd90df60] [replace catalog] Retrying after attempt 4, due to: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "resource_params_cache_pkey" Detail: Key (resource)=(f324ac019bfc50c61785b3fa2646bf5047433010) already exists. org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "resource_params_cache_pkey" Detail: Key (resource)=(f324ac019bfc50c61785b3fa2646bf5047433010) already exists. 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:255) ~[puppetdb.jar:na] at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555) ~[puppetdb.jar:na] at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417) ~[puppetdb.jar:na] at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:363) ~[puppetdb.jar:na] at com.jolbox.bonecp.PreparedStatementHandle.executeUpdate(PreparedStatementHandle.java:203) ~[puppetdb.jar:na] at clojure.java.jdbc.internal$do_prepared_return_keys_STAR_$fn__6343.invoke(internal.clj:337) ~[na:na] at clojure.java.jdbc.internal$transaction_STAR_.invoke(internal.clj:223) ~[na:na] at clojure.java.jdbc.internal$do_prepared_return_keys_STAR_.invoke(internal.clj:337) ~[na:na] at clojure.lang.AFn.applyToHelper(AFn.java:156) ~[puppetdb.jar:na] at clojure.lang.AFn.applyTo(AFn.java:144) ~[puppetdb.jar:na] at clojure.core$apply.invoke(core.clj:626) ~[puppetdb.jar:na] at clojure.java.jdbc$insert_values.doInvoke(jdbc.clj:263) ~[na:na] at clojure.lang.RestFn.invoke(RestFn.java:442) ~[puppetdb.jar:na] at clojure.java.jdbc$insert_records$ins_v__6411.invoke(jdbc.clj:278) ~[na:na] at clojure.core$map$fn__4245.invoke(core.clj:2559) ~[puppetdb.jar:na] at clojure.lang.LazySeq.sval(LazySeq.java:40) ~[puppetdb.jar:na] at clojure.lang.LazySeq.seq(LazySeq.java:49) ~[puppetdb.jar:na] at clojure.lang.Cons.next(Cons.java:39) ~[puppetdb.jar:na] at clojure.lang.RT.next(RT.java:598) ~[puppetdb.jar:na] at clojure.core$next.invoke(core.clj:64) ~[puppetdb.jar:na] at clojure.core$dorun.invoke(core.clj:2856) ~[puppetdb.jar:na] at clojure.core$doall.invoke(core.clj:2871) ~[puppetdb.jar:na] at clojure.java.jdbc$insert_records.doInvoke(jdbc.clj:279) ~[na:na] at clojure.lang.RestFn.applyTo(RestFn.java:139) ~[puppetdb.jar:na] at clojure.core$apply.invoke(core.clj:626) ~[puppetdb.jar:na] at com.puppetlabs.puppetdb.scf.storage$eval9198$insert_records_STAR___9199$fn__9200.invoke(storage.clj:423) ~[na:na] at com.puppetlabs.puppetdb.scf.storage$eval9198$insert_records_STAR___9199.invoke(storage.clj:418) ~[na:na] at com.puppetlabs.puppetdb.scf.storage$eval9217$add_params_BANG___9218$fn__9219.invoke(storage.clj:438) ~[na:na] at com.puppetlabs.puppetdb.scf.storage$eval9217$add_params_BANG___9218.invoke(storage.clj:425) ~[na:na] at com.puppetlabs.puppetdb.scf.storage$eval9401$add_resources_BANG___9402$fn__9403$fn__9404.invoke(storage.clj:558) ~[na:na] at clojure.java.jdbc.internal$transaction_STAR_.invoke(internal.clj:223) ~[na:na] at com.puppetlabs.puppetdb.scf.storage$eval9401$add_resources_BANG___9402$fn__9403.invoke(storage.clj:557) ~[na:na] at com.puppetlabs.puppetdb.scf.storage$eval9401$add_resources_BANG___9402.invoke(storage.clj:550) ~[na:na] at com.puppetlabs.puppetdb.scf.storage$eval9571$update_catalog_associations_BANG___9572$fn__9576$fn__9578.invoke(storage.clj:656) ~[na:na] at com.puppetlabs.puppetdb.scf.storage.proxy$java.lang.Object$Callable$7da976d4.call(Unknown Source) ~[na:na] at com.yammer.metrics.core.Timer.time(Timer.java:91) ~[puppetdb.jar:na] at com.puppetlabs.puppetdb.scf.storage$eval9571$update_catalog_associations_BANG___9572$fn__9576.invoke(storage.clj:655) ~[na:na] at com.puppetlabs.puppetdb.scf.storage$eval9571$update_catalog_associations_BANG___9572.invoke(storage.clj:650) ~[na:na] at com.puppetlabs.puppetdb.scf.storage$eval9628$add_new_catalog__9629$fn__9630$fn__9631.invoke(storage.clj:688) ~[na:na] at com.puppetlabs.puppetdb.scf.storage.proxy$java.lang.Object$Callable$7da976d4.call(Unknown Source) ~[na:na] at com.yammer.metrics.core.Timer.time(Timer.java:91) ~[puppetdb.jar:na] at com.puppetlabs.puppetdb.scf.storage$eval9628$add_new_catalog__9629$fn__9630.invoke(storage.clj:686) ~[na:na] at com.puppetlabs.puppetdb.scf.storage$eval9628$add_new_catalog__9629.invoke(storage.clj:679) ~[na:na] at com.puppetlabs.puppetdb.scf.storage$eval9655$add_catalog_BANG___9656$fn__9662$fn__9671.invoke(storage.clj:712) ~[na:na] at clojure.java.jdbc.internal$transaction_STAR_.invoke(internal.clj:223) ~[na:na] at com.puppetlabs.puppetdb.scf.storage$eval9655$add_catalog_BANG___9656$fn__9662.invoke(storage.clj:709) ~[na:na] at com.puppetlabs.puppetdb.scf.storage$eval9655$add_catalog_BANG___9656.invoke(storage.clj:690) ~[na:na] at com.puppetlabs.puppetdb.scf.storage$eval10208$replace_catalog_BANG___10209$fn__10215$fn__10217$fn__10218.invoke(storage.clj:1223) ~[na:na] at clojure.java.jdbc.internal$transaction_STAR_.invoke(internal.clj:223) ~[na:na] at com.puppetlabs.puppetdb.scf.storage$eval10208$replace_catalog_BANG___10209$fn__10215$fn__10217.invoke(storage.clj:1222) ~[na:na] at com.puppetlabs.puppetdb.scf.storage.proxy$java.lang.Object$Callable$7da976d4.call(Unknown Source) ~[na:na] at com.yammer.metrics.core.Timer.time(Timer.java:91) ~[puppetdb.jar:na] at com.puppetlabs.puppetdb.scf.storage$eval10208$replace_catalog_BANG___10209$fn__10215.invoke(storage.clj:1221) ~[na:na] at com.puppetlabs.puppetdb.scf.storage$eval10208$replace_catalog_BANG___10209.invoke(storage.clj:1210) ~[na:na] at com.puppetlabs.puppetdb.command$replace_catalog_STAR_$fn__11475.invoke(command.clj:313) ~[na:na] at com.puppetlabs.jdbc$with_transacted_connection_fn$fn__6761$fn__6762$fn__6763.invoke(jdbc.clj:290) ~[na:na] at clojure.java.jdbc.internal$transaction_STAR_.invoke(internal.clj:204) ~[na:na] at com.puppetlabs.jdbc$with_transacted_connection_fn$fn__6761$fn__6762.invoke(jdbc.clj:290) ~[na:na] at clojure.java.jdbc.internal$with_connection_STAR_.invoke(internal.clj:186) ~[na:na] at com.puppetlabs.jdbc$with_transacted_connection_fn$fn__6761.invoke(jdbc.clj:287) ~[na:na] at com.puppetlabs.jdbc$eval6739$retry_sql_STAR___6740$fn__6741$fn__6742.invoke(jdbc.clj:259) ~[na:na] at com.puppetlabs.jdbc$eval6739$retry_sql_STAR___6740$fn__6741.invoke(jdbc.clj:258) ~[na:na] at com.puppetlabs.jdbc$eval6739$retry_sql_STAR___6740.invoke(jdbc.clj:250) ~[na:na] at com.puppetlabs.jdbc$with_transacted_connection_fn.invoke(jdbc.clj:286) ~[na:na] at com.puppetlabs.puppetdb.command$replace_catalog_STAR_.invoke(command.clj:309) ~[na:na] at com.puppetlabs.puppetdb.command$eval11505$fn__11507.invoke(command.clj:347) ~[na:na] at clojure.lang.MultiFn.invoke(MultiFn.java:231) ~[puppetdb.jar:na] at com.puppetlabs.puppetdb.command$produce_message_handler$fn__11715.invoke(command.clj:647) ~[na:na] at com.puppetlabs.puppetdb.command$wrap_with_discard$fn__11664$fn__11668.invoke(command.clj:554) ~[na:na] at com.puppetlabs.puppetdb.command.proxy$java.lang.Object$Callable$7da976d4.call(Unknown Source) ~[na:na] at com.yammer.metrics.core.Timer.time(Timer.java:91) ~[puppetdb.jar:na] at com.puppetlabs.puppetdb.command$wrap_with_discard$fn__11664.invoke(command.clj:553) ~[na:na] at com.puppetlabs.puppetdb.command$wrap_with_exception_handling$fn__11649$fn__11650.invoke(command.clj:507) ~[na:na] at com.puppetlabs.puppetdb.command.proxy$java.lang.Object$Callable$7da976d4.call(Unknown Source) ~[na:na] at com.yammer.metrics.core.Timer.time(Timer.java:91) ~[puppetdb.jar:na] at com.puppetlabs.puppetdb.command$wrap_with_exception_handling$fn__11649.invoke(command.clj:506) ~[na:na] at com.puppetlabs.puppetdb.command$wrap_with_command_parser$fn__11659.invoke(command.clj:529) [na:na] at com.puppetlabs.puppetdb.command$wrap_with_meter$fn__11639.invoke(command.clj:467) [na:na] at com.puppetlabs.puppetdb.command$wrap_with_thread_name$fn__11673.invoke(command.clj:569) [na:na] at com.puppetlabs.mq$create_message_listener$reify__10820.onMessage(mq.clj:270) [na:na] at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:560) [puppetdb.jar:na] at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:498) [puppetdb.jar:na] at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:467) [puppetdb.jar:na] at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:325) [puppetdb.jar:na] at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:263) [puppetdb.jar:na] {code} judging by their PDB logs it's been happening infrequently going back to November. We should figure out what happened here.

    JIRA | 2 years ago | Wyatt Alt
    org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "resource_params_cache_pkey" Detail: Key (resource)=(f324ac019bfc50c61785b3fa2646bf5047433010) already exists.
  3. 0

    I'm having this issue on puppetdb and is concurrent to see it [replace facts] Retrying after attempt 7, due to: org.postgresql.util.PSQLException: ERROR: invalid byte sequence for encoding "UTF8": 0x00 org.postgresql.util.PSQLException: ERROR: invalid byte sequence for encoding "UTF8": 0x00 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:255) ~[puppetdb.jar:na] at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555) ~[puppetdb.jar:na] at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417) ~[puppetdb.jar:na] at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:363) ~[puppetdb.jar:na] at com.jolbox.bonecp.PreparedStatementHandle.executeUpdate(PreparedStatementHandle.java:203) ~[puppetdb.jar:na] at clojure.java.jdbc.internal$do_prepared_return_keys_STAR_$fn__5838.invoke(internal.clj:337) ~[na:na] at clojure.java.jdbc.internal$transaction_STAR_.invoke(internal.clj:223) ~[na:na] at clojure.java.jdbc.internal$do_prepared_return_keys_STAR_.invoke(internal.clj:337) ~[na:na] at clojure.lang.AFn.applyToHelper(AFn.java:156) ~[puppetdb.jar:na] at clojure.lang.AFn.applyTo(AFn.java:144) ~[puppetdb.jar:na] at clojure.core$apply.invoke(core.clj:626) ~[puppetdb.jar:na] at clojure.java.jdbc$insert_values.doInvoke(jdbc.clj:263) ~[na:na] at clojure.lang.RestFn.invoke(RestFn.java:442) ~[puppetdb.jar:na] at clojure.java.jdbc$insert_records$ins_v__5906.invoke(jdbc.clj:278) ~[na:na] at clojure.core$map$fn__4245.invoke(core.clj:2559) ~[puppetdb.jar:na] at clojure.lang.LazySeq.sval(LazySeq.java:40) ~[puppetdb.jar:na] at clojure.lang.LazySeq.seq(LazySeq.java:49) ~[puppetdb.jar:na] at clojure.lang.Cons.next(Cons.java:39) ~[puppetdb.jar:na] at clojure.lang.RT.next(RT.java:598) ~[puppetdb.jar:na] at clojure.core$next.invoke(core.clj:64) ~[puppetdb.jar:na] at clojure.core$dorun.invoke(core.clj:2856) ~[puppetdb.jar:na] at clojure.core$doall.invoke(core.clj:2871) ~[puppetdb.jar:na] at clojure.java.jdbc$insert_records.doInvoke(jdbc.clj:279) ~[na:na] at clojure.lang.RestFn.applyTo(RestFn.java:139) ~[puppetdb.jar:na] at clojure.core$apply.invoke(core.clj:626) ~[puppetdb.jar:na] at com.puppetlabs.puppetdb.scf.storage$realize_records_BANG_.invoke(storage.clj:907) ~[na:na] at com.puppetlabs.puppetdb.scf.storage$realize_values_BANG_.invoke(storage.clj:941) ~[na:na] at com.puppetlabs.puppetdb.scf.storage$eval9557$add_facts_BANG___9558$fn__9562$fn__9564.invoke(storage.clj:963) ~[na:na] at clojure.java.jdbc.internal$transaction_STAR_.invoke(internal.clj:223) ~[na:na] at com.puppetlabs.puppetdb.scf.storage$eval9557$add_facts_BANG___9558$fn__9562.invoke(storage.clj:950) ~[na:na] at com.puppetlabs.puppetdb.scf.storage$eval9557$add_facts_BANG___9558.invoke(storage.clj:945) ~[na:na] at com.puppetlabs.puppetdb.scf.storage$eval9789$replace_facts_BANG___9790$fn__9794$fn__9796.invoke(storage.clj:1236) ~[na:na] at com.puppetlabs.puppetdb.scf.storage.proxy$java.lang.Object$Callable$7da976d4.call(Unknown Source) ~[na:na] at com.yammer.metrics.core.Timer.time(Timer.java:91) ~[puppetdb.jar:na] at com.puppetlabs.puppetdb.scf.storage$eval9789$replace_facts_BANG___9790$fn__9794.invoke(storage.clj:1232) ~[na:na] at com.puppetlabs.puppetdb.scf.storage$eval9789$replace_facts_BANG___9790.invoke(storage.clj:1225) ~[na:na] at com.puppetlabs.puppetdb.command$eval13360$fn__13363$fn__13376.invoke(command.clj:381) ~[na:na] at com.puppetlabs.jdbc$with_transacted_connection_fn$fn__6256$fn__6257$fn__6258.invoke(jdbc.clj:290) ~[na:na] at clojure.java.jdbc.internal$transaction_STAR_.invoke(internal.clj:204) ~[na:na] at com.puppetlabs.jdbc$with_transacted_connection_fn$fn__6256$fn__6257.invoke(jdbc.clj:290) ~[na:na] at clojure.java.jdbc.internal$with_connection_STAR_.invoke(internal.clj:186) ~[na:na] at com.puppetlabs.jdbc$with_transacted_connection_fn$fn__6256.invoke(jdbc.clj:287) ~[na:na] at com.puppetlabs.jdbc$eval6234$retry_sql_STAR___6235$fn__6236$fn__6237.invoke(jdbc.clj:259) ~[na:na] at com.puppetlabs.jdbc$eval6234$retry_sql_STAR___6235$fn__6236.invoke(jdbc.clj:258) ~[na:na] at com.puppetlabs.jdbc$eval6234$retry_sql_STAR___6235.invoke(jdbc.clj:250) ~[na:na] at com.puppetlabs.jdbc$with_transacted_connection_fn.invoke(jdbc.clj:286) ~[na:na] at com.puppetlabs.puppetdb.command$eval13360$fn__13363.invoke(command.clj:379) ~[na:na] at clojure.lang.MultiFn.invoke(MultiFn.java:231) ~[puppetdb.jar:na] at com.puppetlabs.puppetdb.command$produce_message_handler$fn__13532.invoke(command.clj:647) ~[na:na] at com.puppetlabs.puppetdb.command$wrap_with_discard$fn__13481$fn__13485.invoke(command.clj:554) ~[na:na] at com.puppetlabs.puppetdb.command.proxy$java.lang.Object$Callable$7da976d4.call(Unknown Source) ~[na:na] at com.yammer.metrics.core.Timer.time(Timer.java:91) ~[puppetdb.jar:na] at com.puppetlabs.puppetdb.command$wrap_with_discard$fn__13481.invoke(command.clj:553) ~[na:na] at com.puppetlabs.puppetdb.command$wrap_with_exception_handling$fn__13466$fn__13467.invoke(command.clj:507) ~[na:na] at com.puppetlabs.puppetdb.command.proxy$java.lang.Object$Callable$7da976d4.call(Unknown Source) ~[na:na] at com.yammer.metrics.core.Timer.time(Timer.java:91) ~[puppetdb.jar:na] at com.puppetlabs.puppetdb.command$wrap_with_exception_handling$fn__13466.invoke(command.clj:506) ~[na:na] at com.puppetlabs.puppetdb.command$wrap_with_command_parser$fn__13476.invoke(command.clj:529) [na:na] at com.puppetlabs.puppetdb.command$wrap_with_meter$fn__13456.invoke(command.clj:467) [na:na] at com.puppetlabs.puppetdb.command$wrap_with_thread_name$fn__13490.invoke(command.clj:569) [na:na] at com.puppetlabs.mq$create_message_listener$reify__10375.onMessage(mq.clj:277) [na:na] at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:560) [puppetdb.jar:na] at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:498) [puppetdb.jar:na] at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:467) [puppetdb.jar:na] at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:325) [puppetdb.jar:na] at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:263) [puppetdb.jar:na] at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1058) [puppetdb.jar:na] at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1050) [puppetdb.jar:na] at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:947) [puppetdb.jar:na] at java.lang.Thread.run(Thread.java:745) [na:1.7.0_101]

    JIRA | 4 months ago | Priscilla Piedra
    org.postgresql.util.PSQLException: ERROR: invalid byte sequence for encoding "UTF8": 0x00
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    We receive these errors every few minutes. Our logs indicate that these error began to occurring once our puppetdb instance was upgraded from 1.5.2 -> 1.6.2. {code} 2014-03-12 15:33:03,107 ERROR [command-proc-82] [puppetdb.command] [7b979257-dda8-4d46-b8b2-242b88611523] [replace catalog] Retrying after attempt 12, due to: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "catalogs_pkey" org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "catalogs_pkey" at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2157) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1886) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:363) at com.jolbox.bonecp.PreparedStatementHandle.executeUpdate(PreparedStatementHandle.java:203) at clojure.java.jdbc.internal$do_prepared_return_keys_STAR_$fn__2133.invoke(internal.clj:337) at clojure.java.jdbc.internal$transaction_STAR_.invoke(internal.clj:223) at clojure.java.jdbc.internal$do_prepared_return_keys_STAR_.invoke(internal.clj:337) at clojure.lang.AFn.applyToHelper(AFn.java:163) at clojure.lang.AFn.applyTo(AFn.java:151) at clojure.core$apply.invoke(core.clj:619) at clojure.java.jdbc$insert_values.doInvoke(jdbc.clj:263) at clojure.lang.RestFn.invoke(RestFn.java:442) at clojure.java.jdbc$insert_records$ins_v__2201.invoke(jdbc.clj:278) at clojure.core$map$fn__4207.invoke(core.clj:2487) at clojure.lang.LazySeq.sval(LazySeq.java:42) at clojure.lang.LazySeq.seq(LazySeq.java:60) at clojure.lang.RT.seq(RT.java:484) at clojure.core$seq.invoke(core.clj:133) at clojure.core$dorun.invoke(core.clj:2780) at clojure.core$doall.invoke(core.clj:2796) at clojure.java.jdbc$insert_records.doInvoke(jdbc.clj:279) at clojure.lang.RestFn.invoke(RestFn.java:423) at com.puppetlabs.puppetdb.scf.storage$eval3132$add_catalog_metadata_BANG___3133$fn__3137.invoke(storage.clj:297) at com.puppetlabs.puppetdb.scf.storage$eval3132$add_catalog_metadata_BANG___3133.invoke(storage.clj:284) at com.puppetlabs.puppetdb.scf.storage$eval3653$add_new_catalog__3654$fn__3655$fn__3656.invoke(storage.clj:613) at com.puppetlabs.puppetdb.scf.storage.proxy$java.lang.Object$Callable$f8c5758f.call(Unknown Source) at com.yammer.metrics.core.Timer.time(Timer.java:91) at com.puppetlabs.puppetdb.scf.storage$eval3653$add_new_catalog__3654$fn__3655.invoke(storage.clj:612) at com.puppetlabs.puppetdb.scf.storage$eval3653$add_new_catalog__3654.invoke(storage.clj:605) at com.puppetlabs.puppetdb.scf.storage$eval3680$add_catalog_BANG___3681$fn__3687$fn__3694.invoke(storage.clj:637) at clojure.java.jdbc.internal$transaction_STAR_.invoke(internal.clj:223) at com.puppetlabs.puppetdb.scf.storage$eval3680$add_catalog_BANG___3681$fn__3687.invoke(storage.clj:634) at com.puppetlabs.puppetdb.scf.storage$eval3680$add_catalog_BANG___3681.invoke(storage.clj:616) at com.puppetlabs.puppetdb.scf.storage$eval4037$replace_catalog_BANG___4038$fn__4044$fn__4046$fn__4047.invoke(storage.clj:908) at clojure.java.jdbc.internal$transaction_STAR_.invoke(internal.clj:223) at com.puppetlabs.puppetdb.scf.storage$eval4037$replace_catalog_BANG___4038$fn__4044$fn__4046.invoke(storage.clj:907) at com.puppetlabs.puppetdb.scf.storage.proxy$java.lang.Object$Callable$f8c5758f.call(Unknown Source) at com.yammer.metrics.core.Timer.time(Timer.java:91) at com.puppetlabs.puppetdb.scf.storage$eval4037$replace_catalog_BANG___4038$fn__4044.invoke(storage.clj:906) at com.puppetlabs.puppetdb.scf.storage$eval4037$replace_catalog_BANG___4038.invoke(storage.clj:895) at com.puppetlabs.puppetdb.command$replace_catalog_STAR_$fn__5497.invoke(command.clj:318) at com.puppetlabs.jdbc$with_transacted_connection_fn$fn__2278$fn__2279.invoke(jdbc.clj:229) at clojure.java.jdbc.internal$transaction_STAR_.invoke(internal.clj:204) at com.puppetlabs.jdbc$with_transacted_connection_fn$fn__2278.invoke(jdbc.clj:228) at clojure.java.jdbc.internal$with_connection_STAR_.invoke(internal.clj:186) at com.puppetlabs.jdbc$with_transacted_connection_fn.invoke(jdbc.clj:225) at com.puppetlabs.puppetdb.command$replace_catalog_STAR_.invoke(command.clj:314) at com.puppetlabs.puppetdb.command$eval5513$fn__5515.invoke(command.clj:338) at clojure.lang.MultiFn.invoke(MultiFn.java:231) at com.puppetlabs.puppetdb.command$produce_message_handler$fn__5667.invoke(command.clj:603) at com.puppetlabs.puppetdb.command$wrap_with_discard$fn__5616$fn__5620.invoke(command.clj:509) at com.puppetlabs.puppetdb.command.proxy$java.lang.Object$Callable$f8c5758f.call(Unknown Source) at com.yammer.metrics.core.Timer.time(Timer.java:91) at com.puppetlabs.puppetdb.command$wrap_with_discard$fn__5616.invoke(command.clj:508) at com.puppetlabs.puppetdb.command$wrap_with_exception_handling$fn__5601$fn__5602.invoke(command.clj:462) at com.puppetlabs.puppetdb.command.proxy$java.lang.Object$Callable$f8c5758f.call(Unknown Source) at com.yammer.metrics.core.Timer.time(Timer.java:91) at com.puppetlabs.puppetdb.command$wrap_with_exception_handling$fn__5601.invoke(command.clj:461) at com.puppetlabs.puppetdb.command$wrap_with_command_parser$fn__5611.invoke(command.clj:484) at com.puppetlabs.puppetdb.command$wrap_with_meter$fn__5591.invoke(command.clj:422) at com.puppetlabs.puppetdb.command$wrap_with_thread_name$fn__5625.invoke(command.clj:524) at clamq.jms$jms_consumer$fn__4661.invoke(jms.clj:38) at clamq.jms.proxy$java.lang.Object$MessageListener$ce893c05.onMessage(Unknown Source) at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:560) at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:498) at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:467) at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:325) at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:263) at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1058) at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1050) at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:947) at java.lang.Thread.run(Thread.java:744) {code}

    JIRA | 3 years ago | Tyler Parsons
    org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "catalogs_pkey"
  6. 0

    {{2015-08-06 14:05:37,551 INFO [o.e.j.u.log] Logging initialized @38444ms 2015-08-06 14:05:40,472 INFO [p.t.s.w.jetty9-service] Initializing web server(s). 2015-08-06 14:05:40,485 INFO [p.t.s.w.jetty9-service] Starting web server(s). 2015-08-06 14:05:40,734 INFO [p.t.s.w.jetty9-core] Starting web server. 2015-08-06 14:05:40,739 INFO [o.e.j.s.Server] jetty-9.2.z-SNAPSHOT 2015-08-06 14:05:40,822 INFO [o.e.j.s.ServerConnector] Started ServerConnector@64127516{HTTP/1.1}{localhost:8080} 2015-08-06 14:05:40,938 INFO [o.e.j.s.ServerConnector] Started ServerConnector@2c46492b{SSL-HTTP/1.1}{0.0.0.0:8081} 2015-08-06 14:05:40,938 INFO [o.e.j.s.Server] Started @41836ms 2015-08-06 14:05:40,942 WARN [c.p.p.config] The configuration item `url-prefix` in the [global] section is deprecated. It will be removed in the future. 2015-08-06 14:05:41,033 INFO [c.p.p.c.services] PuppetDB version 2.3.6 2015-08-06 14:05:41,184 WARN [c.p.p.s.storage] PostgreSQL DB versions 8.4 - 9.3 are deprecated and won't be supported in the future. 2015-08-06 14:05:41,288 INFO [c.p.p.s.migrate] There are no pending migrations 2015-08-06 14:05:41,290 WARN [c.p.p.s.migrate] Unable to install optimal indexing We are unable to create optimal indexes for your database. For maximum index performance, we recommend using PostgreSQL 9.3 or greater. 2015-08-06 14:05:41,302 INFO [c.p.p.c.services] Starting broker 2015-08-06 14:05:42,324 INFO [o.a.a.s.k.MessageDatabase] KahaDB is version 4 2015-08-06 14:05:42,391 INFO [o.a.a.s.k.MessageDatabase] Recovering from the journal ... 2015-08-06 14:05:42,392 INFO [o.a.a.s.k.MessageDatabase] Recovery replayed 1 operations from the journal in 0.053 seconds. 2015-08-06 14:05:43,021 WARN [o.a.a.b.BrokerService] Store limit is 100000 mb, whilst the data directory: /var/lib/puppetdb/mq/localhost/KahaDB only has 7791 mb of usable space 2015-08-06 14:05:43,022 ERROR [o.a.a.b.BrokerService] Temporary Store limit is 50000 mb, whilst the temporary data directory: /var/lib/puppetdb/mq/localhost/tmp_storage only has 7791 mb of usable space 2015-08-06 14:05:43,023 INFO [c.p.p.c.services] Starting 2 command processor threads 2015-08-06 14:05:43,072 INFO [c.p.p.c.services] Starting query server 2015-08-06 14:05:43,117 WARN [o.e.j.s.h.ContextHandler] Empty contextPath 2015-08-06 14:05:43,166 INFO [o.e.j.s.h.ContextHandler] Started o.e.j.s.h.ContextHandler@195edb4a{/,null,AVAILABLE} 2015-08-06 14:05:43,214 INFO [c.p.p.c.services] Starting sweep of stale nodes (threshold: 15 days) 2015-08-06 14:05:43,341 INFO [c.p.p.c.services] Finished sweep of stale nodes (threshold: 15 days) 2015-08-06 14:05:43,344 INFO [c.p.p.c.services] Starting purge deactivated nodes (threshold: 30 days) 2015-08-06 14:05:43,449 INFO [c.p.p.c.services] Finished purge deactivated nodes (threshold: 30 days) 2015-08-06 14:05:43,451 INFO [c.p.p.c.services] Starting sweep of stale reports (threshold: 14 days) 2015-08-06 14:05:43,624 INFO [c.p.p.c.services] Finished sweep of stale reports (threshold: 14 days) 2015-08-06 14:05:43,626 INFO [c.p.p.c.services] Starting database garbage collection 2015-08-06 14:05:43,762 INFO [c.p.p.c.services] Newer version 3.0.2 is available! Visit https://docs.puppetlabs.com/puppetdb/3.0/release_notes.html for details. 2015-08-06 14:05:43,807 INFO [c.p.p.c.services] Finished database garbage collection 2015-08-06 14:05:58,640 WARN [c.p.p.h.event-counts] The event-counts endpoint is experimental and may be altered or removed in the future. 2015-08-06 14:06:09,894 INFO [c.p.p.command] [fd6b2738-b606-496c-96f9-ff2a4062a366] [replace facts] dldggraem01.vml.lan 2015-08-06 14:06:14,513 ERROR [c.p.p.command] [5cc540f0-8589-4478-863a-3f41da7791ec] [store report] Retrying after attempt 8, due to: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "reports_pkey" Detail: Key (hash)=(6cb10ac4b4be82870db2a709a346fb4a132325cb) already exists. org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "reports_pkey" Detail: Key (hash)=(6cb10ac4b4be82870db2a709a346fb4a132325cb) already exists. 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:255) ~[puppetdb.jar:na] at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555) ~[puppetdb.jar:na] at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417) ~[puppetdb.jar:na] at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:363) ~[puppetdb.jar:na] at com.jolbox.bonecp.PreparedStatementHandle.executeUpdate(PreparedStatementHandle.java:203) ~[puppetdb.jar:na] at clojure.java.jdbc.internal$do_prepared_return_keys_STAR_$fn__5838.invoke(internal.clj:337) ~[na:na] at clojure.java.jdbc.internal$transaction_STAR_.invoke(internal.clj:223) ~[na:na] at clojure.java.jdbc.internal$do_prepared_return_keys_STAR_.invoke(internal.clj:337) ~[na:na] at clojure.lang.AFn.applyToHelper(AFn.java:156) ~[puppetdb.jar:na] at clojure.lang.AFn.applyTo(AFn.java:144) ~[puppetdb.jar:na] at clojure.core$apply.invoke(core.clj:626) ~[puppetdb.jar:na] at clojure.java.jdbc$insert_values.doInvoke(jdbc.clj:263) ~[na:na] at clojure.lang.RestFn.invoke(RestFn.java:442) ~[puppetdb.jar:na] at clojure.java.jdbc$insert_records$ins_v__5906.invoke(jdbc.clj:278) ~[na:na] at clojure.core$map$fn__4245.invoke(core.clj:2559) ~[puppetdb.jar:na] at clojure.lang.LazySeq.sval(LazySeq.java:40) ~[puppetdb.jar:na] at clojure.lang.LazySeq.seq(LazySeq.java:49) ~[puppetdb.jar:na] at clojure.lang.RT.seq(RT.java:484) ~[puppetdb.jar:na] at clojure.core$seq.invoke(core.clj:133) ~[puppetdb.jar:na] at clojure.core$dorun.invoke(core.clj:2855) ~[puppetdb.jar:na] at clojure.core$doall.invoke(core.clj:2871) ~[puppetdb.jar:na] at clojure.java.jdbc$insert_records.doInvoke(jdbc.clj:279) ~[na:na] at clojure.lang.RestFn.invoke(RestFn.java:423) ~[puppetdb.jar:na] at clojure.java.jdbc$insert_record.invoke(jdbc.clj:286) ~[na:na] at com.puppetlabs.puppetdb.scf.storage$add_report_BANG__STAR_$fn__9641$fn__9645.invoke(storage.clj:1104) ~[na:na] at clojure.java.jdbc.internal$transaction_STAR_.invoke(internal.clj:223) ~[na:na] at com.puppetlabs.puppetdb.scf.storage$add_report_BANG__STAR_$fn__9641.invoke(storage.clj:1094) ~[na:na] at com.puppetlabs.puppetdb.scf.storage.proxy$java.lang.Object$Callable$7da976d4.call(Unknown Source) ~[na:na] at com.yammer.metrics.core.Timer.time(Timer.java:91) ~[puppetdb.jar:na] at com.puppetlabs.puppetdb.scf.storage$add_report_BANG__STAR_.invoke(storage.clj:1088) ~[na:na] at com.puppetlabs.puppetdb.scf.storage$eval9812$add_report_BANG___9813$fn__9814.invoke(storage.clj:1221) ~[na:na] at com.puppetlabs.puppetdb.scf.storage$eval9812$add_report_BANG___9813.invoke(storage.clj:1217) ~[na:na] at com.puppetlabs.puppetdb.command$store_report_STAR_$fn__13416.invoke(command.clj:413) ~[na:na] at com.puppetlabs.jdbc$with_transacted_connection_fn$fn__6256$fn__6257$fn__6258.invoke(jdbc.clj:290) ~[na:na] at clojure.java.jdbc.internal$transaction_STAR_.invoke(internal.clj:204) ~[na:na] at com.puppetlabs.jdbc$with_transacted_connection_fn$fn__6256$fn__6257.invoke(jdbc.clj:290) ~[na:na] at clojure.java.jdbc.internal$with_connection_STAR_.invoke(internal.clj:186) ~[na:na] at com.puppetlabs.jdbc$with_transacted_connection_fn$fn__6256.invoke(jdbc.clj:287) ~[na:na] at com.puppetlabs.jdbc$eval6234$retry_sql_STAR___6235$fn__6236$fn__6237.invoke(jdbc.clj:259) ~[na:na] at com.puppetlabs.jdbc$eval6234$retry_sql_STAR___6235$fn__6236.invoke(jdbc.clj:258) ~[na:na] at com.puppetlabs.jdbc$eval6234$retry_sql_STAR___6235.invoke(jdbc.clj:250) ~[na:na] at com.puppetlabs.jdbc$with_transacted_connection_fn.invoke(jdbc.clj:286) ~[na:na] at com.puppetlabs.puppetdb.command$store_report_STAR_.invoke(command.clj:411) ~[na:na] at com.puppetlabs.puppetdb.command$eval13444$fn__13447.invoke(command.clj:434) ~[na:na] at clojure.lang.MultiFn.invoke(MultiFn.java:231) ~[puppetdb.jar:na] at com.puppetlabs.puppetdb.command$produce_message_handler$fn__13528.invoke(command.clj:647) ~[na:na] at com.puppetlabs.puppetdb.command$wrap_with_discard$fn__13477$fn__13481.invoke(command.clj:554) ~[na:na] at com.puppetlabs.puppetdb.command.proxy$java.lang.Object$Callable$7da976d4.call(Unknown Source) ~[na:na] at com.yammer.metrics.core.Timer.time(Timer.java:91) ~[puppetdb.jar:na] at com.puppetlabs.puppetdb.command$wrap_with_discard$fn__13477.invoke(command.clj:553) ~[na:na] at com.puppetlabs.puppetdb.command$wrap_with_exception_handling$fn__13462$fn__13463.invoke(command.clj:507) ~[na:na] at com.puppetlabs.puppetdb.command.proxy$java.lang.Object$Callable$7da976d4.call(Unknown Source) ~[na:na] at com.yammer.metrics.core.Timer.time(Timer.java:91) ~[puppetdb.jar:na] at com.puppetlabs.puppetdb.command$wrap_with_exception_handling$fn__13462.invoke(command.clj:506) ~[na:na] at com.puppetlabs.puppetdb.command$wrap_with_command_parser$fn__13472.invoke(command.clj:529) [na:na] at com.puppetlabs.puppetdb.command$wrap_with_meter$fn__13452.invoke(command.clj:467) [na:na] at com.puppetlabs.puppetdb.command$wrap_with_thread_name$fn__13486.invoke(command.clj:569) [na:na] at com.puppetlabs.mq$create_message_listener$reify__10371.onMessage(mq.clj:277) [na:na] at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:560) [puppetdb.jar:na] at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:498) [puppetdb.jar:na] at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:467) [puppetdb.jar:na] at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:325) [puppetdb.jar:na] at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:263) [puppetdb.jar:na] at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1058) [puppetdb.jar:na] at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1050) [puppetdb.jar:na] at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:947) [puppetdb.jar:na] at java.lang.Thread.run(Thread.java:745) [na:1.7.0_85] }}

    JIRA | 1 year ago | James Glenn
    org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "reports_pkey" Detail: Key (hash)=(6cb10ac4b4be82870db2a709a346fb4a132325cb) already exists.
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 "resource_params_cache_pkey" Detail: Key (resource)=(f324ac019bfc50c61785b3fa2646bf5047433010) already exists.

    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse()
  2. PostgreSQL JDBC Driver
    AbstractJdbc2Statement.executeUpdate
    1. org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2157)[puppetdb.jar:na]
    2. org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1886)[puppetdb.jar:na]
    3. org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)[puppetdb.jar:na]
    4. org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555)[puppetdb.jar:na]
    5. org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417)[puppetdb.jar:na]
    6. org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:363)[puppetdb.jar:na]
    6 frames
  3. BoneCP :: Core Library
    PreparedStatementHandle.executeUpdate
    1. com.jolbox.bonecp.PreparedStatementHandle.executeUpdate(PreparedStatementHandle.java:203)[puppetdb.jar:na]
    1 frame
  4. notificationagent
    internal$do_prepared_return_keys_STAR_.invoke
    1. clojure.java.jdbc.internal$do_prepared_return_keys_STAR_$fn__6343.invoke(internal.clj:337)[na:na]
    2. clojure.java.jdbc.internal$transaction_STAR_.invoke(internal.clj:223)[na:na]
    3. clojure.java.jdbc.internal$do_prepared_return_keys_STAR_.invoke(internal.clj:337)[na:na]
    3 frames
  5. Clojure
    core$apply.invoke
    1. clojure.lang.AFn.applyToHelper(AFn.java:156)[puppetdb.jar:na]
    2. clojure.lang.AFn.applyTo(AFn.java:144)[puppetdb.jar:na]
    3. clojure.core$apply.invoke(core.clj:626)[puppetdb.jar:na]
    4. clojure.java.jdbc$insert_values.doInvoke(jdbc.clj:263)[na:na]
    5. clojure.lang.RestFn.invoke(RestFn.java:442)[puppetdb.jar:na]
    6. clojure.java.jdbc$insert_records$ins_v__6411.invoke(jdbc.clj:278)[na:na]
    7. clojure.core$map$fn__4245.invoke(core.clj:2559)[puppetdb.jar:na]
    8. clojure.lang.LazySeq.sval(LazySeq.java:40)[puppetdb.jar:na]
    9. clojure.lang.LazySeq.seq(LazySeq.java:49)[puppetdb.jar:na]
    10. clojure.lang.Cons.next(Cons.java:39)[puppetdb.jar:na]
    11. clojure.lang.RT.next(RT.java:598)[puppetdb.jar:na]
    12. clojure.core$next.invoke(core.clj:64)[puppetdb.jar:na]
    13. clojure.core$dorun.invoke(core.clj:2856)[puppetdb.jar:na]
    14. clojure.core$doall.invoke(core.clj:2871)[puppetdb.jar:na]
    15. clojure.java.jdbc$insert_records.doInvoke(jdbc.clj:279)[na:na]
    16. clojure.lang.RestFn.applyTo(RestFn.java:139)[puppetdb.jar:na]
    17. clojure.core$apply.invoke(core.clj:626)[puppetdb.jar:na]
    17 frames
  6. com.puppetlabs.puppetdb
    storage$eval9401$add_resources_BANG___9402$fn__9403$fn__9404.invoke
    1. com.puppetlabs.puppetdb.scf.storage$eval9198$insert_records_STAR___9199$fn__9200.invoke(storage.clj:423)[na:na]
    2. com.puppetlabs.puppetdb.scf.storage$eval9198$insert_records_STAR___9199.invoke(storage.clj:418)[na:na]
    3. com.puppetlabs.puppetdb.scf.storage$eval9217$add_params_BANG___9218$fn__9219.invoke(storage.clj:438)[na:na]
    4. com.puppetlabs.puppetdb.scf.storage$eval9217$add_params_BANG___9218.invoke(storage.clj:425)[na:na]
    5. com.puppetlabs.puppetdb.scf.storage$eval9401$add_resources_BANG___9402$fn__9403$fn__9404.invoke(storage.clj:558)[na:na]
    5 frames
  7. notificationagent
    internal$transaction_STAR_.invoke
    1. clojure.java.jdbc.internal$transaction_STAR_.invoke(internal.clj:223)[na:na]
    1 frame
  8. com.puppetlabs.puppetdb
    Object$Callable$7da976d4.call
    1. com.puppetlabs.puppetdb.scf.storage$eval9401$add_resources_BANG___9402$fn__9403.invoke(storage.clj:557)[na:na]
    2. com.puppetlabs.puppetdb.scf.storage$eval9401$add_resources_BANG___9402.invoke(storage.clj:550)[na:na]
    3. com.puppetlabs.puppetdb.scf.storage$eval9571$update_catalog_associations_BANG___9572$fn__9576$fn__9578.invoke(storage.clj:656)[na:na]
    4. com.puppetlabs.puppetdb.scf.storage.proxy$java.lang.Object$Callable$7da976d4.call(Unknown Source)[na:na]
    4 frames
  9. Apache Giraph Core
    Timer.time
    1. com.yammer.metrics.core.Timer.time(Timer.java:91)[puppetdb.jar:na]
    1 frame
  10. com.puppetlabs.puppetdb
    Object$Callable$7da976d4.call
    1. com.puppetlabs.puppetdb.scf.storage$eval9571$update_catalog_associations_BANG___9572$fn__9576.invoke(storage.clj:655)[na:na]
    2. com.puppetlabs.puppetdb.scf.storage$eval9571$update_catalog_associations_BANG___9572.invoke(storage.clj:650)[na:na]
    3. com.puppetlabs.puppetdb.scf.storage$eval9628$add_new_catalog__9629$fn__9630$fn__9631.invoke(storage.clj:688)[na:na]
    4. com.puppetlabs.puppetdb.scf.storage.proxy$java.lang.Object$Callable$7da976d4.call(Unknown Source)[na:na]
    4 frames
  11. Apache Giraph Core
    Timer.time
    1. com.yammer.metrics.core.Timer.time(Timer.java:91)[puppetdb.jar:na]
    1 frame
  12. com.puppetlabs.puppetdb
    storage$eval9655$add_catalog_BANG___9656$fn__9662$fn__9671.invoke
    1. com.puppetlabs.puppetdb.scf.storage$eval9628$add_new_catalog__9629$fn__9630.invoke(storage.clj:686)[na:na]
    2. com.puppetlabs.puppetdb.scf.storage$eval9628$add_new_catalog__9629.invoke(storage.clj:679)[na:na]
    3. com.puppetlabs.puppetdb.scf.storage$eval9655$add_catalog_BANG___9656$fn__9662$fn__9671.invoke(storage.clj:712)[na:na]
    3 frames
  13. notificationagent
    internal$transaction_STAR_.invoke
    1. clojure.java.jdbc.internal$transaction_STAR_.invoke(internal.clj:223)[na:na]
    1 frame
  14. com.puppetlabs.puppetdb
    storage$eval10208$replace_catalog_BANG___10209$fn__10215$fn__10217$fn__10218.invoke
    1. com.puppetlabs.puppetdb.scf.storage$eval9655$add_catalog_BANG___9656$fn__9662.invoke(storage.clj:709)[na:na]
    2. com.puppetlabs.puppetdb.scf.storage$eval9655$add_catalog_BANG___9656.invoke(storage.clj:690)[na:na]
    3. com.puppetlabs.puppetdb.scf.storage$eval10208$replace_catalog_BANG___10209$fn__10215$fn__10217$fn__10218.invoke(storage.clj:1223)[na:na]
    3 frames
  15. notificationagent
    internal$transaction_STAR_.invoke
    1. clojure.java.jdbc.internal$transaction_STAR_.invoke(internal.clj:223)[na:na]
    1 frame
  16. com.puppetlabs.puppetdb
    Object$Callable$7da976d4.call
    1. com.puppetlabs.puppetdb.scf.storage$eval10208$replace_catalog_BANG___10209$fn__10215$fn__10217.invoke(storage.clj:1222)[na:na]
    2. com.puppetlabs.puppetdb.scf.storage.proxy$java.lang.Object$Callable$7da976d4.call(Unknown Source)[na:na]
    2 frames
  17. Apache Giraph Core
    Timer.time
    1. com.yammer.metrics.core.Timer.time(Timer.java:91)[puppetdb.jar:na]
    1 frame
  18. com.puppetlabs.puppetdb
    command$replace_catalog_STAR_$fn__11475.invoke
    1. com.puppetlabs.puppetdb.scf.storage$eval10208$replace_catalog_BANG___10209$fn__10215.invoke(storage.clj:1221)[na:na]
    2. com.puppetlabs.puppetdb.scf.storage$eval10208$replace_catalog_BANG___10209.invoke(storage.clj:1210)[na:na]
    3. com.puppetlabs.puppetdb.command$replace_catalog_STAR_$fn__11475.invoke(command.clj:313)[na:na]
    3 frames
  19. com.puppetlabs
    jdbc$with_transacted_connection_fn$fn__6761$fn__6762$fn__6763.invoke
    1. com.puppetlabs.jdbc$with_transacted_connection_fn$fn__6761$fn__6762$fn__6763.invoke(jdbc.clj:290)[na:na]
    1 frame
  20. notificationagent
    internal$transaction_STAR_.invoke
    1. clojure.java.jdbc.internal$transaction_STAR_.invoke(internal.clj:204)[na:na]
    1 frame
  21. com.puppetlabs
    jdbc$with_transacted_connection_fn$fn__6761$fn__6762.invoke
    1. com.puppetlabs.jdbc$with_transacted_connection_fn$fn__6761$fn__6762.invoke(jdbc.clj:290)[na:na]
    1 frame
  22. notificationagent
    internal$with_connection_STAR_.invoke
    1. clojure.java.jdbc.internal$with_connection_STAR_.invoke(internal.clj:186)[na:na]
    1 frame
  23. com.puppetlabs
    jdbc$with_transacted_connection_fn.invoke
    1. com.puppetlabs.jdbc$with_transacted_connection_fn$fn__6761.invoke(jdbc.clj:287)[na:na]
    2. com.puppetlabs.jdbc$eval6739$retry_sql_STAR___6740$fn__6741$fn__6742.invoke(jdbc.clj:259)[na:na]
    3. com.puppetlabs.jdbc$eval6739$retry_sql_STAR___6740$fn__6741.invoke(jdbc.clj:258)[na:na]
    4. com.puppetlabs.jdbc$eval6739$retry_sql_STAR___6740.invoke(jdbc.clj:250)[na:na]
    5. com.puppetlabs.jdbc$with_transacted_connection_fn.invoke(jdbc.clj:286)[na:na]
    5 frames
  24. com.puppetlabs.puppetdb
    command$eval11505$fn__11507.invoke
    1. com.puppetlabs.puppetdb.command$replace_catalog_STAR_.invoke(command.clj:309)[na:na]
    2. com.puppetlabs.puppetdb.command$eval11505$fn__11507.invoke(command.clj:347)[na:na]
    2 frames
  25. Clojure
    MultiFn.invoke
    1. clojure.lang.MultiFn.invoke(MultiFn.java:231)[puppetdb.jar:na]
    1 frame
  26. com.puppetlabs.puppetdb
    Object$Callable$7da976d4.call
    1. com.puppetlabs.puppetdb.command$produce_message_handler$fn__11715.invoke(command.clj:647)[na:na]
    2. com.puppetlabs.puppetdb.command$wrap_with_discard$fn__11664$fn__11668.invoke(command.clj:554)[na:na]
    3. com.puppetlabs.puppetdb.command.proxy$java.lang.Object$Callable$7da976d4.call(Unknown Source)[na:na]
    3 frames
  27. Apache Giraph Core
    Timer.time
    1. com.yammer.metrics.core.Timer.time(Timer.java:91)[puppetdb.jar:na]
    1 frame
  28. com.puppetlabs.puppetdb
    Object$Callable$7da976d4.call
    1. com.puppetlabs.puppetdb.command$wrap_with_discard$fn__11664.invoke(command.clj:553)[na:na]
    2. com.puppetlabs.puppetdb.command$wrap_with_exception_handling$fn__11649$fn__11650.invoke(command.clj:507)[na:na]
    3. com.puppetlabs.puppetdb.command.proxy$java.lang.Object$Callable$7da976d4.call(Unknown Source)[na:na]
    3 frames
  29. Apache Giraph Core
    Timer.time
    1. com.yammer.metrics.core.Timer.time(Timer.java:91)[puppetdb.jar:na]
    1 frame
  30. com.puppetlabs.puppetdb
    command$wrap_with_thread_name$fn__11673.invoke
    1. com.puppetlabs.puppetdb.command$wrap_with_exception_handling$fn__11649.invoke(command.clj:506)[na:na]
    2. com.puppetlabs.puppetdb.command$wrap_with_command_parser$fn__11659.invoke(command.clj:529)[na:na]
    3. com.puppetlabs.puppetdb.command$wrap_with_meter$fn__11639.invoke(command.clj:467)[na:na]
    4. com.puppetlabs.puppetdb.command$wrap_with_thread_name$fn__11673.invoke(command.clj:569)[na:na]
    4 frames
  31. com.puppetlabs
    mq$create_message_listener$reify__10820.onMessage
    1. com.puppetlabs.mq$create_message_listener$reify__10820.onMessage(mq.clj:270)[na:na]
    1 frame
  32. Spring Framework
    AbstractPollingMessageListenerContainer.receiveAndExecute
    1. org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:560)[puppetdb.jar:na]
    2. org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:498)[puppetdb.jar:na]
    3. org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:467)[puppetdb.jar:na]
    4. org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:325)[puppetdb.jar:na]
    5. org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:263)[puppetdb.jar:na]
    5 frames