Unable to attach a replica instance to primary due to duplicate key value in RSA Authentication Manager 8.7 SP1 or later
Originally Published: 2024-03-09
Article Number
Applies To
RSA Product/Service Type: Authentication Manager
RSA Version/Condition: 8.7 SP1 or later
Operating System: SUSE Linux
OS Version: SUSE Linux Enterprise Server 15 SP3
Issue
Note that the replica is freshly deployed and performed a Quick Setup with valid network details.
Cause
Download and examine the appliance_setuplogs.zip to see any exceptions and found the below in config.sh_Appliance_configureReplica_yyyymmddhhmmss.log file:
473078 2024-03-07 03:32:20,611 INFO: Executing pg_restore. Log output will be found here: /opt/rsa/am/install_logs/dbscripts/pg_restore-yyyymmddhhmmss.log 473082 2024-03-07 03:32:20,615 INFO: Executing /opt/rsa/am/pgsql/bin/pg_restore Exception in thread "main" : exec returned: 1 at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:646) at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:672) at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:498) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at Utils.exec(Utils.groovy:325) at Utils$exec$6.call(Unknown Source) at SetupReplica.loadPrimaryDatabase(SetupReplica.groovy:298) at SetupReplica.configureReplicaDatabaseAndPrepareForReplication(SetupReplica.groovy:476) at SetupReplica.configureReplica(SetupReplica.groovy:67) at SetupReplica$configureReplica$0.call(Unknown Source) at Appliance.configureReplica(Appliance.groovy:45) at com.rsa.plugins.install.GroovyInstallEngine.invokeScript(GroovyInstallEngine.groovy:68) at com.rsa.plugins.install.GroovyInstallEngine$_runTask_closure2.doCall(GroovyInstallEngine.groovy:57) at com.rsa.plugins.install.GroovyInstallEngine.runTask(GroovyInstallEngine.groovy:56) at com.rsa.plugins.install.GroovyInstallEngine$_runTasks_closure3.doCall(GroovyInstallEngine.groovy:106) at com.rsa.plugins.install.GroovyInstallEngine.runTasks(GroovyInstallEngine.groovy:105) at com.rsa.plugins.install.GroovyInstallEngine$runTasks.call(Unknown Source) at com.rsa.plugins.install.CommandLineInstallEngine.main(CommandLineInstallEngine.groovy:40) Configuration step Appliance:configureReplica [FAILED]
The database log in install_logs/dbscripts/pg_restore-yyyymmddhhmmss.log captured the error below:
pg_restore: while PROCESSING TOC:
pg_restore: from TOC entry 8022; 0 18157 TABLE DATA am_host rsa_dba
pg_restore: error: COPY failed for table "am_host": ERROR: duplicate key value violates unique constraint "uk_am_host_name"
DETAIL: Key (name)=(ocio-17058t3.example.com) already exists.
CONTEXT: COPY am_host, line 79274
pg_restore: warning: errors ignored on restore: 1
Resolution
After upgrading to hotfix 1, you need to verify if the reindexing is successful.
To verify, do the following:
1. Download the hotfix upgrade log “update-8.7.1.1.1-xxx.log” from /opt/rsa/am/server/logs.
2. Search for Executing SQL script /opt/rsa/am/utils/tools/dbrestore/reindex_database_db.sql.
3. Confirm whether the reindex script is executed successfully.
For example,
INFO: Executing SQL script /opt/rsa/am/utils/tools/dbrestore/reindex_database_db.sql [copy] Copying 1 file to /tmp/rsa-install-2023-11-24-09-37-51 [copy] Copying /opt/rsa/am/utils/tools/dbrestore/reindex_database_db.sql to /tmp/rsa-install-2023-11-24-09-37-51/reindex_ database_db.sql [exec] REINDEX [delete] Deleting: /tmp/rsa-install-2023-11-24-09-37-51/reindex_database_db.sqlA successful execution of the script indicates that the PostgresSQL server has been reindexed successfully and no further action is required.
If the script fails to execute with an <error> , contact RSA Customer Support.
Workaround
1. Add a report with "List all Authentication Agent Records" template and run the report.
2. Download and examine the report with your preferred spreadsheet to see if there are any duplicate agent records.
3. In Microsoft Excel, highlight the column A and click Conditional Formatting > Highlight Cells Rules > Duplicate Values
4. If required, use filter by color to locate the fields.
5. Search the agent records in Security Console > Access > Authentication Agents > Manage Existing and delete them manually
Related Articles
Replica is not synchronizing with primary on RSA Authentication Manager 8.1 1.09KNumber of Views RSA Authentication Manager Replica Attach Fails with SystemFingerprintException 1.44KNumber of Views Promotion for maintenance fails: Unable to apply the data updates from the primary instance 324Number of Views Cisco ASA authenticates to the RSA Authentication Manager 8.x primary but not to the replica 550Number of Views RSA Authentication Manager 8.1 primary instance fails to upgrade to 8.2 with error: Replication flush failed 1.1KNumber of Views
Trending Articles
How to replace the RSA Authentication Manager self signed console certificate with a signed certificate from Microsoft Act… How to manipulate imported RSA SecurID Software Token(s) on an iPhone or iPad device RSA Authentication Manager Upgrade Process RSA Release Notes for RSA Authentication Manager 8.8 RSA Authentication Manager Patch Updates
Don't see what you're looking for?