Cluster Settings

Issue

Cause

Diagnosis

Resolution

Getting Internal server error: Violation of PRIMARY KEY constraint in Cluster
Situation.

This issue occurs when the sequence id for all the server in the cluster is set to "1".

We are getting below errors and the jobs which uses backend tables are failing.
Error Message1:
An exception occurred on executing process instance id 010240013192155811510242: Internal Server error: Violation of PRIMARY KEY constraint 'PK AC TRANS 3214EC27CC22A986'. Cannot insert duplicate key in object "dbo.AC TXN EXE LOG".
The duplicate key value is (11552510801188).

Error Message2:
[com.adeptia.connect2.log storage entities. TransactionExecutionLogger): SQL (insert into AC, TXN, EXE LOG (DESTINATION, DIRECTION, ENDTIME, EXECUTION RERUN, FILE SIZE, FLOW EXECUTION INFO HUB COMPANY ID HUB COMPANY NAME, JOB ID, LOG MESSAGE, MAIN EXECUTION RECORD MESSAGE TYPE, NETWORK, ID, NETWORK NAME, PARENT EXECUTION ID, PARTNER ID, PARTNER NAME PROCESS ID, PROCESS INSTANCE ID, RECORD TYPE, REFERENCE FIELD RERUN MODE, RUNTIME INFO, SOURCE SOURCE FILE LOCATION, SOURCE, FILE NAME, STARTTIME STATUS, TARGET FILE LOCATION, TARGET FILE NAME, TRANSACTION ID TRANSACTION NAME TRANSACTION TEMPLATE ID, TRANSACTION, TEMPLATE NAME TRANSACTION TYPE ID) values (7, 7, 7, ?????????????? 2.2.7. 7. 7. 7 constraint [null]; nested exception is org.hibernate.exception. ConstraintViolationException: could not insert /com.adeptia.connectzlog storage entities. Transaction ExecutionLogger): could not insert: jcom.adeptia connect2.log storage entities. Transaction ExecutionLogger); SQL [insert into AC TXN EXE LOG (DESTINATION, DIRECTION, ENDTIME, EXECUTION RERUN, FILE SIZE, FLOW EXECUTION, INFO HUB COMPANY ID, HUB COMPANY NAME, JOB ID, LOG MESSAGE, MAIN EXECUTION RECORD, MESSAGE, TYPE NETWORK ID, NETWORK NAME, PARENT EXECUTION ID PARTNER ID PARTNER, NAME, PROCESS ID, PROCESS INSTANCE ID, RECORD TYPE, REFERENCE FIELD, RERUN MODE, RUNTIME INFO SOURCE SOURCE FILE LOCATION, SOURCE FILE NAME, STARTTIME, STATUS, TARGET FILE LOCATION, TARGET FILE NAME, TRANSACTION ID, TRANSACTION NAME, TRANSACTION TEMPLATE ID, TRANSACTION TEMPLATE NAME, TRANSACTION TYPE ID) values (?, ?,?????????????? 2 2 2 2 2 2 2 2 2 7, 7, 7, 7)); constraint (null); nested exception is org.hibernate.exception Constraint ViolationException: could not insert: fcom.adeptia.connect2.log storage.entities. Transaction ExecutionLogger)

To resolve the issue, we need to set the value of the sequence id to 2 and 3 for other nodes in a cluster. Following are the steps to be performed on each cluster server:-

Goto the location "\ConnectServer\AdeptiaServer\ServerKernel\etc" and open the server-configure.properties file in an edit mode.
Search for property "abpm.config.sequence.id" and set its value to 2. Ensure that this value is unique for each node.
After making the above changes, kindly restart the servers.

One of the nodes of our clustered instance keeps going down

This error is thrown when the primary node cannot connect to the secondary node.
The following may be the reasons:

  • The date and time of the servers in the clusters are different

  • The heartbeat period is too low

  • A large number of jobs is causing the secondary node to go down

The following error is found in the Kernal Logs:

"Error while detecting node "192.168.193.145" from database :: Last time stamp value not updated by cluster node since last "45" seconds
com.adeptia.indigo.cluster.failure.detection.ClusterDBFailureDetection.run(ClusterDBFailureDetection.java:45) "

  1. Ensure the times of all the nodes in the cluster are the same - http://support.adeptia.com/entries/25012448-Secondary-Server-is-down-

  1. Increase the heartbeat period of the cluster. This is the "abpm.node.heartbeat.period" property in the server-configure.properties file (ServerKernel/etc)

  1. Turn on the Queue Processor and setting a limit on how many concurrent process flows can be executed by the server at the same time. Please refer to the developer's guide for more information on the Record Queue Processor.