After an upgrade or a DB restore, you may see these error messages in the Gateway logs:
SEVERE 57 org.hibernate.util.JDBCExceptionReporter: Duplicate entry '5f231948877647cab87eb827ba6876e3-\x00\x00\x00\x00\x00\x00\x00\x0' for key 'nodeid'
INFO 57 com.l7tech.server.service.ServiceMetricsServicesImpl: Failed to save a MetricsBin due to constraint violation
Restoring DB by using SSGBACKUP and SSGRESTORE may add additional or duplicate information to the cluster_info table.
Release : 9.4 and above
Component : API GATEWAY
If you see the above error in SSG logs, then run the following query to check the cluster_info table:
NOTE: Make sure to stop the Gateway service in all nodes of the cluster before running this query
- Log in to the Gateway server acting as primary DB node
- Select option #3 and log in to the privileged shell
- Run mysql and get into MySQL mode
- Run "select * from cluster_info;"
Things to look for in this table that points to a possible issue:
- Same nodeid present in multiple rows
- Same mac (maybe with different nodeid) in multiple rows
- NULL as multicast_address in one or more rows
If you identify any of the above issues, then run the following command to remove the data from cluster_info table:
delete from cluster_info;
Running this delete query will only remove the date from this table and it is ok to remove this information. This will not affect the Gateway service in any way. Once the delete query is done, you can run the select query to verify the table is empty. After confirming the table is empty, start the first/primary node in the cluster. Once the node is up, you can start the other nodes by making sure each node is up and running before starting another one.