Cannot insert duplicate key in object 'dbo.ARWFAUTHTOKENS'
search cancel

Cannot insert duplicate key in object 'dbo.ARWFAUTHTOKENS'

book

Article ID: 204698

calendar_today

Updated On:

Products

CA Advanced Authentication - Strong Authentication (AuthMinder / WebFort) CA Strong Authentication CA Rapid App Security CA Risk Authentication CA Advanced Authentication

Issue/Introduction

We are facing issue for OTP authentication. Here is the log of that error message.

12/02/20 11:47:38.810 DEBUG TXN_NATIVE   00000137 00000155 - ArDBM::Executing Query[AuthTokens_Insert]
12/02/20 11:47:38.811 INFO  TXN_NATIVE   00000137 00000155 - Dbm::SQL State:23000, Native Code: 7F0F00000A43, ODBC code: [CA Advanced Auth][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]Violation of PRIMARY KEY constraint 'PK_ARWFAUTHTOKENS'. Cannot insert duplicate key in object 'dbo.ARWFAUTHTOKENS'. The duplicate key value is (1:155).SQL State:HY008, Native Code: 7F0F00000E25, ODBC code: [CA Advanced Auth][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]The statement has been terminated.

Environment

Release : 9.1

Component : AuthMinder(Arcot WebFort)

Cause

This issue started after Strong Auth version 9.0 and there were fixed provided to address the issue. In this version we introduced the Sequence exhaustion at per Instance level where previously all Instances were sharing the same Max sequence number. There were some tables like ARWFAUTHTOKENS which missed the InstanceID to make the transaction unique and to address that a code level fix was provided.

Resolution

With 9.1 version the code fix is already part of the product if you are on 9.0 or 9.0.02 version please reach out to support for the fix. Along with the fix the important steps is to follow the below steps.

1. Go to ARCOT_HOME/conf directory and open arcotcommon.ini file

2. Under section

[arcot/system]

InstanceId=1

Please make sure that all the Instances have unique values and this is a number, e.g. If you have 10 Instances then this value should be 1 for Instance1, 2 for Instance2 and so on.

3. This will need a restart of the Application server and Strong Authentication service.

 

Additional Information

None.