Creating New Database Fails with "Duplicate Entry"

Document ID : KB000117411
Last Modified Date : 11/10/2018
Show Technical Document Details
When the SSG database is first created, there shouldn't be any conflicts with existing data. If there is a preexisting database, the ssgconfig menu will prevent you from creating a duplicate and won't let you proceed. If the ssgconfig menu options allow you to continue and you still run into a conflict with existing data, this means an external resource is accessing your local mysql instance.

For example:

"An Error Occurred during Configuration.

Error creating database when saving configuration 'Cannot create database: 'Migation failed for change set ssg-base.xml::1408665452836-150::gateway:

Reason: liqubase.exception.DatabaseException: Error executing SQL ALTER TABLE ssg.replication _status ADD PRIMARY KEY (objectid): Duplicate entry '1' for key 'PRIMARY'' [code:5, ERROR]' "

Ensure there aren't any existing API Gateway servers and/or mysql instances referencing the node you are configuring. If you had a previous API Gateway environment where the same host names were used, please ensure clustering and mysql replication isn't still configured. If you aren't able to locate the source of interference, you may need to update the IP tables on the local API gateway to block incoming traffic from port 3306 and 3307.