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

ERROR: duplicate key value violates unique constraint

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: PDB 3.2.2
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      Ubuntu 14.04.3 LTS

    • Template:
    • Story Points:
      1
    • Sprint:
      PuppetDB 2015-12-16

      Description

      After upgrading from PuppetDB 2.3.7 to PuppetDB 3.2.2, I see the following errors in the PuppetDB log:

      {{Dec 4 20:11:32: [5dc7dc96-98ab-4a8b-8598-005f8ed197a7] [store report] puppet v4.3.1 - hydrogen.kvantel.no
      Dec 4 20:11:52: [204fc471-55e1-4b60-82b7-83a14429d270] [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)=()MA\242\314\277\211e\274"\204\325e'`A\336\202\245\220) already exists.
      Dec 4 20:11:56: [4d556974-1838-404a-b995-7647aa462d0a] [replace facts] Retrying after attempt 4, due to: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "fact_values_value_hash_key" Detail: Key (value_hash)=(\267\260\213w\013'~\311\004,"- \026u\030\231\3068\005) already exists.
      Dec 4 20:12:14: [fe8ebca2-8243-41c9-bd05-fd6ee9f5a84b] [replace facts] Retrying after attempt 5, due to: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "fact_values_value_hash_key" Detail: Key (value_hash)=(\267\260\213w\013'~\311\004,"- \026u\030\231\3068\005) already exists.
      Dec 4 20:12:31: [7fb13f08-55bc-4863-b9a0-9481b0614b79] [replace catalog] Retrying after attempt 5, due to: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "resource_params_cache_pkey" Detail: Key (resource)=()MA\242\314\277\211e\274"\204\325e'`A\336\202\245\220) already exists.
      Dec 4 20:13:20: [e5c87176-a3ab-46b4-b559-c6a8222173f7] [replace facts] Retrying after attempt 6, due to: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "fact_values_value_hash_key" Detail: Key (value_hash)=(\267\260\213w\013'~\311\004,"- \026u\030\231\3068\005) already exists.
      Dec 4 20:13:36: [744dd9a5-e202-4218-9039-98bacd18a36f] [replace catalog] Retrying after attempt 6, due to: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "resource_params_cache_pkey" Detail: Key (resource)=()MA\242\314\277\211e\274"\204\325e'`A\336\202\245\220) already exists.
      Dec 4 20:15:11: [f2a1e995-2045-47c8-b838-f66f6f2b0c29] [replace facts] Retrying after attempt 7, due to: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "fact_values_value_hash_key" Detail: Key (value_hash)=(\267\260\213w\013'~\311\004,"- \026u\030\231\3068\005) already exists.
      Dec 4 20:15:31: [b504ae16-2958-40ff-aea7-3d5b3e0bb2a3] [replace catalog] Retrying after attempt 7, due to: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "resource_params_cache_pkey" Detail: Key (resource)=()MA\242\314\277\211e\274"\204\325e'`A\336\202\245\220) already exists.}}

      ...and so on. I get this on two separate installations at two different companies. It happens even with an empty database (and queue), but then only on the second Puppet run. It also happens with an empty manifest. PuppetServer does not report any errors. I have tried upgrading from PuppetDB 2 to 3 multiple times over the past few months, with multiple PuppetDB 3 versions, and always had the same problem. This is with Puppetserver 2.2.0 and Puppet-agent 1.3.2, but it also happened with earlier versions.

      PuppetDB 2.3.7 works fine, so we are stuck on that for now. However, with PuppetDB 2 I get the following warning in the PuppetServer log for every run, which may or may not be related: Ignoring invalid UTF-8 byte sequences in data to be sent to PuppetDB

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              andrew.roetker AJ Roetker
              Reporter:
              erikgrinaker Erik Grinaker
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support