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
Duplicate User IDs 95Number of Views Review result throwing Exception while executing filter query due to ORA-00904 in RSA Governance & Lifecycle 50Number of Views Source variable and target variable are showing duplicate values when adding a new value on Next Value node in RSA Via Lif… 34Number of Views An initial successful Authenticate tokencode authentication generates an error in RSA Authentication Manager authenticatio… 26Number of Views AIX Libc fix for AIX dup message issue 5Number of Views
Trending Articles
Downloading RSA Authentication Manager license files or RSA Software token seed records RSA MFA Agent 2.3.6 for Microsoft Windows Installation and Administration Guide Quick Setup Guide - Passwordless Authentication in Windows MFA Agent for Active Directory Mandatory Certificate Upgrade Required by 6th October 2025 for RSA MFA Agent for PAM, RSA MFA Agent for Apache, and Third … RSA Authentication Manager 8.9 Release Notes (January 2026)
Don't see what you're looking for?