Madhuvanthi Radhakrishnan created AMBARI-21808:
--------------------------------------------------

             Summary: Create registry failing with unique constraint violation 
after a failed registry request
                 Key: AMBARI-21808
                 URL: https://issues.apache.org/jira/browse/AMBARI-21808
             Project: Ambari
          Issue Type: Bug
          Components: ambari-server
            Reporter: Madhuvanthi Radhakrishnan
            Assignee: Madhuvanthi Radhakrishnan
             Fix For: 3.0.0


 Aug 2017 20:59:12,903 ERROR [ambari-client-thread-131] ContainerResponse:419 - 
The RuntimeException could not be mapped to a response, re-throwing to the HTTP 
container
javax.persistence.RollbackException: 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_registry_name"
Error Code: 0
Call: INSERT INTO registries (id, registry_name, registry_type, registry_uri) 
VALUES (?, ?, ?, ?)
        bind => [4 parameters bound]

Issue - Database entry is made before validating the url for its existence.
Fix - Add url validation check before calling addRegistries functionality



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to