Enterprise Service Manager (ESM): Error when migrating policies - "(name) must be unique"
search cancel

Enterprise Service Manager (ESM): Error when migrating policies - "(name) must be unique"


Article ID: 42834


Updated On:


STARTER PACK-7 CA Rapid App Security CA API Gateway


Note: This article does not apply to API Gateways on version 7 or lower! For version 7 or lower, please refer to the related article applicable to version 7 and older.

While using the ESM to migrate policies between environments, the following error occurs due to a naming / GUID problem:

Migration failed: Import failed when processing entity: POLICY, <name> (#<GOID>) due to: (name) must be unique ().

This error occurs as the policy GOID's for the same service do not match between the two environments. A typical cause of this problem is when a policy is manually created in the destination environment which will assign a new GOID. At this point the two environments services cannot be matched by the ESM.


Component: APIESM


To correct this error, you can follow the instructions below:

  1. Drop to a command prompt. (Option # 3 of the ssgconfig menu), then run the following command: # service ssem stop

  2. Wait for Shutting down Enterprise Manager: [ OK ]

  3. Change directory to /opt/SecureSpan/EnterpriseManager/bin

  4. Edit the enterprisemanager.sh file with this command: vi enterprisemanager.sh

  5. Replace this line:
    EM_JAVA_OPTS="-XX:MaxPermSize=256m -Xmx512m -Djava.security.egd=file:/dev/./urandom"

    ...with this one...
    EM_JAVA_OPTS="-XX:MaxPermSize=256m -Xmx512m -Djava.security.egd=file:/dev/./urandom -Dcom.l7tech.ems.mapServices=true"

    ...or simply add -Dcom.l7tech.ems.mapServices=true to the end of the original line (and close the speech marks).

  6. Hit escape and then type the following: wq! <enter>

  7. Then run the following command: # service ssem start

  8. Wait for Starting Enterprise Manager: [ OK ]

Once you've done that you'll need to follow these steps to successfully migrate your services.
  1. Select the service from source gateway, select the same root folder of target gateway again with "Overwrite existing service" selected?

  2. Click on Resolve dependency ! sign

  3. Highlight the service needs to be migrated from source gateway

  4. Click on Search button

  5. Select existing service on target gateway

  6. Ensure each dependency is mapped for successful migration.

  7. Proceed migration -> migration successful, result confirms the existing service on target gateway is overwritten\created