search cancel

After apply CR02 on API Gateway 10, the gateway cannot startup due to invalid json schema

book

Article ID: 203268

calendar_today

Updated On:

Products

CA API Gateway API SECURITY CA API Gateway Precision API Monitoring Module for API Gateway (Layer 7) CA API Gateway Enterprise Service Manager (Layer 7) STARTER PACK-7 CA Microgateway

Issue/Introduction

The gateway is upgraded from 9.x to 10, and then apply CR02 patch, and reboot the gateway server, it hangs on loading the published service to the cache,

...

2020-11-04T11:44:30.520+0800 INFO    378 com.l7tech.server.service.ServiceCache: Created/Updated/Deleted: [c4deb499d5003b1b8c0c759f0a79f66c]

2020-11-04T11:44:30.537+0800 INFO    378 com.l7tech.server.service.ServiceCache: Created/Updated/Deleted: [c4deb499d5003b1b8c0c759f0a7a0037]

 

On gateway 9.x, or gateway 10 base version, it has no problem.

 

 

 

Environment

Release : 10.0

Component : API GATEWAY

Cause

As per the document,

https://techdocs.broadcom.com/us/en/ca-enterprise-software/layer7-api-management/api-gateway/10-0/policy-assertions/assertion-palette/message-validation-transformation-assertions/validate-json-schema-assertion-message-validation-transformation.html

It says, "Beginning with Gateway version 10.0 CR1, JSON Schema v2 has been deprecated due to a library upgrade. Users should upgrade their JSON Schema to v4."

 

The problematic service has invalid json schema cannot be parsed by the new v4 library, when startup the gateway, it loads the services into cache, and try to parse the json schema, then hangs.

This can also be reproduced on policy manager, add Validate JSON Schema assertion, input following example of json, click "OK" button, it hangs.

(on gateway 9.4, select v2, click "OK", it's fine, select v4, click "OK", it hangs too)

{
    "type": "object" ,
    "id": "http://jsonschema.net",
    "required": "true",
    "properties": {
    "mfp" :
    {
        "id": "http://jsonschema.net/mfp",
        "required": false,
        "type": "string" 
    },
    "orgname" :
    {
        "id": "http://jsonschema.net/orgname",
        "required": false,
        "type": "string" 
    },
    "password" :
    {
        "id": "http://jsonschema.net/password",
        "required": false,
        "type": "string" 
    },
    "username" :
    {
        "id": "http://jsonschema.net/username",
        "required": false,
        "type": "string" 
    }
    } 

}

 

Resolution

Upgrade the json schema before apply the patch