Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-22690

Registering existing hdp version failed with sql exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 2.6.2
    • 2.6.2
    • ambari-server
    • None

    Description

      While trying to register existing HDP version below sql exception were noticed.

      STR:

      • Register HDP version 2.6.4 via manage versions screen of Ambari.
      • Try re-registering the same version again. Below exception is thrown.
      ERROR [ambari-client-thread-3696] AmbariJpaLocalTxnInterceptor:180 - [DETAILED ERROR] Rollback reason:
      Local Exception Stack:
      Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.2.v20151217-774c696): org.eclipse.persistence.exceptions.DatabaseException
      Internal Exception: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "uq_repo_version_stack_id"
      Error Code: 0
      Call: INSERT INTO repo_version (repo_version_id, display_name, hidden, legacy, repositories, resolved, repo_type, version, version_url, version_xml, version_xsd, parent_id, stack_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
              bind => [13 parameters bound]
              at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:340)
              at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.processExceptionForCommError(DatabaseAccessor.java:1620)
              at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:900)
              at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:964)
              at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:633)
              at org.eclipse.persistence.internal.databaseaccess.ParameterizedSQLBatchWritingMechanism.executeBatch(ParameterizedSQLBatchWritingMechanism.java:149)
      

      Attachments

        1. AMBARI-22690.branch-2.6.patch
          0.8 kB
          Dmytro Grinenko

        Issue Links

          Activity

            People

              hapylestat Dmytro Grinenko
              hapylestat Dmytro Grinenko
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: