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.
To correct this error, you can follow the instructions below:
Drop to a command prompt. (Option # 3 of the ssgconfig menu), then run the following command: # service ssem stop
Wait for Shutting down Enterprise Manager: [ OK ]
Change directory to /opt/SecureSpan/EnterpriseManager/bin
Edit the enterprisemanager.sh file with this command: vi enterprisemanager.sh
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).
Hit escape and then type the following: wq! <enter>
Then run the following command: # service ssem start
Wait for Starting Enterprise Manager: [ OK ]
Select the service from source gateway, select the same root folder of target gateway again with "Overwrite existing service" selected?
Click on Resolve dependency ! sign
Highlight the service needs to be migrated from source gateway
Click on Search button
Select existing service on target gateway
Ensure each dependency is mapped for successful migration.
Proceed migration -> migration successful, result confirms the existing service on target gateway is overwritten\created