Application Key Sync is failing after Portal upgrade from 5.2.3 to 5.3 .
{"package":"com.l7tech.external.assertions.portaldeployer.server.client.MessageProcessor","level":"INFO","log":{"message":"processing message with messageId(traceId)\u003d6109922103f920c7fcaa37ae783f823d"},"time":"2025-12-01T16:25:04.017+0000"}
{"package":"com.l7tech.server.jdbc.JdbcQueryingManagerImpl","level":"WARNING","log":{"service":"Portal API Key Storage Service [/portalman/api-keys/storage*]","user-id":"0000000000000000fffffffffffffffe:0cc1e2ecfc467ae8ed9832043b017611","client-ip":"127.0.0.1","request-id":"df317c77e63161fd-13d7848f184b8865","service-folder-path":"/API Portal Integration","message":"Failed to perform querying since Duplicate entry l7d3a4ed36093b470c9684664b4fab56ed for key oauth_client_key.PRIMARY","listen-port":"Default HTTPS (8443)"},"time":"2025-12-01T16:25:04.333+0000","otelId":"35f5937cab0018f6e261df3a34950a49-6f4aaadef9cd7d1e"}
API Developer Portal 5.3 (Kubernetes)
After Portal DB upgrade, some apikeys are missing which still exist in OTK, the customer tried to re-create the apikey in portal, the apikeys are created but with a new apikey_pk, which caused the apikey deployment failed. The apikey deployment requires that if the apikey already exists in OTK, both apikey and apikey_pk must match between Portal and OTK.
Delete duplicate apikeys from OTK and resync with Portal.
Steps to delete duplicate apikey:
ApiKey: l7d3a4ed36093b470c9684664b4fab56ed as example:

If there are more API keys with deployment errors, copy and paste all duplicate API keys—which can be queried from the OTK database—to obtain all the apikey_pk values. Then take a full backup of the OTK database, delete all entries from OTK.portal_apikey, and save the redeployment step for the end. Finally, trigger a bulk deployment all at once by switching the proxy key deployment type from On-Demand to Automatic.