Layer 7 API Management

Expand all | Collapse all

GMU Import Failed , Reason migrate in failed : Conflict

Jump to Best Answer
  • 1.  GMU Import Failed , Reason migrate in failed : Conflict

    Posted 09-29-2016 09:01 AM

    Hello,

     

    I am having error while Migrating API Policy from one host to another using GMU.

     

    I have successfully exported both apiproxy.properties and apiproxy.xml files from 781 server and try to importing on 874 server using the below command.

     

    /opt/SecureSpan/gmu/GatewayMigrationUtility.sh migrateIn --argFile /opt/SecureSpan/gmu/commonargs.props --bundle $TARGET_FILE.xml --template $TARGET_FILE.properties --results results.xml 

    where TARGET_FILE is the name of proxy

    Execution failed. Reason: Migrate in failed: Conflict
    Below is the Migrate result file i am getting. 
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
        <l7:Name>Bundle mappings</l7:Name>
        <l7:Type>BUNDLE MAPPINGS</l7:Type>
        <l7:TimeStamp>2016-09-29T13:59:42.306+02:00</l7:TimeStamp>
        <l7:Link rel="self" uri="https://ese0874.<mydomain.com>:8443/restman/1.0/bundle?test=false&amp;activate=true"/>
        <l7:Resource>
            <l7:Mappings>
                <l7:Mapping action="NewOrExisting" actionTaken="CreatedNew" srcId="78ba1a30fcca23c5ce92243efa7c207d" srcUri="https://ese0781.<mydomain.com>:8443/restman/1.0/clusterProperties/78ba1a30fcca23c5ce92243efa7c207d" targetId="78ba1a30fcca23c5ce92243efa7c207d" targetUri="https://ese0874.<mydomain.com>:8443/restman/1.0/clusterProperties/78ba1a30fcca23c5ce92243efa7c207d" type="CLUSTER_PROPERTY">
                    <l7:Properties>
                        <l7:Property key="MapBy">
                            <l7:StringValue>name</l7:StringValue>
                        </l7:Property>
                    </l7:Properties>
                </l7:Mapping>
                <l7:Mapping action="NewOrExisting" actionTaken="CreatedNew" srcId="00000000000000000000000000000002:dev-with aleternative subject name" srcUri="https://ese0781.<mydomain.com>:8443/restman/1.0/privateKeys/00000000000000000000000000000002:dev-with%20aleternative%20subject%20name" targetId="00000000000000000000000000000002:dev-with aleternative subject name" targetUri="https://ese0874.<mydomain.com>:8443/restman/1.0/privateKeys/00000000000000000000000000000002:dev-with%20aleternative%20subject%20name" type="SSG_KEY_ENTRY"/>
                <l7:Mapping action="NewOrExisting" errorType="TargetNotFound" srcId="72fbfd7ad86d62e647a4a41049611892" srcUri="https://ese0781.<mydomain.com>:8443/restman/1.0/folders/72fbfd7ad86d62e647a4a41049611892" type="FOLDER">
                    <l7:Properties>
                        <l7:Property key="ErrorMessage">
                            <l7:StringValue>Could not locate entity: Fail on new specified and could not locate existing target. Source Entity: EntityHeader. Name=null, id=72fbfd7ad86d62e647a4a41049611892, description=null, type = FOLDER</l7:StringValue>
                        </l7:Property>
                        <l7:Property key="FailOnNew">
                            <l7:BooleanValue>true</l7:BooleanValue>
                        </l7:Property>
                    </l7:Properties>
                </l7:Mapping>
                <l7:Mapping action="NewOrUpdate" errorType="InvalidResource" srcId="e4afc47dd0044445bd5343eece929ec7" srcUri="https://ese0781.<mydomain.com>:8443/restman/1.0/services/e4afc47dd0044445bd5343eece929ec7" type="SERVICE">
                    <l7:Properties>
                        <l7:Property key="ErrorMessage">
                            <l7:StringValue>Cannot add or update a child row: a foreign key constraint fails (`ssg`.`published_service`, CONSTRAINT `published_service_folder` FOREIGN KEY (`folder_goid`) REFERENCES `folder` (`goid`) ON DELETE NO ACTION ON UPDATE NO ACTION)</l7:StringValue>
                        </l7:Property>
                    </l7:Properties>
                </l7:Mapping>
            </l7:Mappings>
        </l7:Resource>
    </l7:Item>


  • 2.  Re: GMU Import Failed , Reason migrate in failed : Conflict
    Best Answer

    Posted 09-29-2016 11:06 AM

    If you didnt do a 'migrateOut --all' on the source gateway, then you will need to specify a --destFolder on the migrateIn...

     

    i.e. --destFolder / ( this will place the contents of your bundle in root )

     

    keep in mind that as of right now, the --destFolder value has to exist on the destination, the import will not create the folder structure for you as of the current release.

     

    hope this helps