Replication errors during API Portal synchronization.
search cancel

Replication errors during API Portal synchronization.

book

Article ID: 391361

calendar_today

Updated On:

Products

CA API Developer Portal

Issue/Introduction

After each API update in portal the replication is failing on the proxy gateway cluster nodes .

Last_Error: Error 'Cannot add or update a child row: a foreign key constraint fails (`ssg`.`rbac_permission`, CONSTRAINT `rbac_permission_ibfk_1` FOREIGN KEY (`role_goid`) REFERENCES `rbac_role` (`goid`) ON DELETE CASCADE)' on query. Default database: 'ssg'. Query: 'insert into rbac_permission (entity_type, operation_type, other_operation, role_goid, version, goid) values ('JDBC_CONNECTION',

Resolution

This will occur when both nodes in the cluster believe they are the master and apply the same config update to the local database. 

To resolve this make sure that the gateway cluster is configured correctly . 

Check the node.properties file on all cluster members and verify that the master and slave are configured correctly .

The node.db.config.main.host and node.db.config.failover.host should be set to the same hosts on all cluster nodes.

Example :

node.db.config.main.host = primary-mysql-server-gw1

node.db.config.failover.host=secondary-mysql-server-gw2

https://techdocs.broadcom.com/us/en/ca-enterprise-software/layer7-api-management/api-gateway/11-1/install-configure-upgrade/configure-a-gateway-cluster.html