SaaS Portal Application API Keys sync error 500: "json can not be null or empty"
search cancel

SaaS Portal Application API Keys sync error 500: "json can not be null or empty"

book

Article ID: 371194

calendar_today

Updated On:

Products

CA API Developer Portal

Issue/Introduction

Portal application API Key sync error show in the screen.  

Log has error:

2024-06-08T00:49:37.248-0400 INFO    1153  com.l7tech.external.assertions.portaldeployer.server.client.PortalDeployerClient: PortalDeployerLogging: Message Arrived - ID: 7, Topic: console/application/command/deploy/tenantGatewayUuid/5475fb13-4a50-478d-a949-5ca15dc1d21f
2024-06-08T00:49:37.249-0400 INFO    1153  com.l7tech.external.assertions.portaldeployer.server.client.PortalDeployerClient: PortalDeployerLogging: Node is master, continuing to process message 7
2024-06-08T00:49:37.249-0400 INFO    1153  com.l7tech.external.assertions.portaldeployer.server.client.MessageProcessor: processing message with messageId(traceId)=97ac9f90baae456d9108049b0ca8f3a8
2024-06-08T00:49:37.610-0400 INFO    963  com.l7tech.server.policy.assertion.ServerAuditDetailAssertion: -4: username: CN=portalman.xxxxxxxxxx
2024-06-08T00:49:42.655-0400 SEVERE  963  com.l7tech.server.SoapMessageProcessingServlet: json can not be null or empty
2024-06-08T00:49:42.657-0400 INFO    1153  com.l7tech.external.assertions.portaldeployer.server.client.MessageProcessor: Target request to https://localhost:8443/portalman/api-keys/storage failed. Response code: 500, response body: <?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Body>
        <soapenv:Fault>
            <faultcode>soapenv:Server</faultcode>
            <faultstring>Error in assertion processing</faultstring>
            <faultactor>https://localhost:8443/portalman/api-keys/storage</faultactor>
            <detail>
                <l7:policyResult status="json can not be null or empty" xmlns:l7="http://www.layer7tech.com/ws/policy/fault"/>
            </detail>
        </soapenv:Fault>
    </soapenv:Body>
</soapenv:Envelope>
, status: ERROR

 

 

Environment

SaaS Portal 5.2.3,  Ssg 11.1

Cause

API Key data issue. 

Resolution

Steps used to resolve the sync issue: 

  1. Upgrade to PortalDeployerAssertion-1.0.18-SNAPSHOT.saar
  2. Make sure authentications are successful at Restman for updating API Plans, Rate and Quotas.
  3. Create a new API Plan, Rate and Quota Plan or modify any of existing one.
  4. Reset and sync API Keys via below curl commands (make sure to capture headers from PAPI calls through developer tools and replace the url as below).
    curl 'https://apim-ssg-apim-trial1-xxxx2.layer7.saas.<company>.com/*****/deployments/0.1/proxies/*****/reset-api-key-bulk-deployment-status' -v -X POST 
    curl 'https://apim-ssg-apim-xxxx-prod.layer7.saas.<.company>.com/*****/deployments/1.0/proxies/*******/api-keys' -vk -X POST 
  5. Trigger Bulk API Sync
    curl 'https:// apim-ssg-apim-xxxx-prod.layer7.saas.<company>.com /****/deployments/internal/proxies/*******/apis' -vk -X POST