API Developer Portal: Container portal_apim fails to start up. See "Error adding new record to TENANT_GATEWAY" error.
search cancel

API Developer Portal: Container portal_apim fails to start up. See "Error adding new record to TENANT_GATEWAY" error.

book

Article ID: 139030

calendar_today

Updated On:

Products

CA API Developer Portal

Issue/Introduction

This article will address the issue of duplicate entries for the tenant UUID, which is known by seeing the following logs in the portal_portal-enterprise container:

portal_apim.0.obgkrdiykwya@hostname | ingress: Updating existing TENANT_GATEWAY record: 000

portal_apim.0.obgkrdiykwya@hostname | ingress: Error adding new record to TENANT_GATEWAY

portal_apim.0.obgkrdiykwya@hostname | ERROR - Failed executing the script: /opt/docker/rc.d/zzz_init-tenant-enrollment.sh

Environment

This article applies to all supported versions of the API Developer Portal.

Cause

This issue is caused by duplicate entries for apim from TENANT_GATEWAY table.

Resolution

To resolve this issue, you must remove the duplicate entries for apim from tenant_gateway table, cleared docker portal stack and restart the appliance to fix. The commands below should be run in order (be sure to substitute the variables as needed):

docker exec -it <portaldbContainerID> psql -U admin portal --command "delete from tenant_gateway where uuid='<UUID>';"
docker stack rm portal
docker rm -f $(docker ps -qa)
reboot

Additional Information

If unsure how to find the portaldb container ID, run the following command:

docker container ls