The sync scheduler stopped processing without pushing data to the Portal.
search cancel

The sync scheduler stopped processing without pushing data to the Portal.

book

Article ID: 278191

calendar_today

Updated On:

Products

CA API Gateway CA API Developer Portal

Issue/Introduction

When we publish APIs on Gateway, they are not syncing on portal . Scheduler tasks says scheduled.  But portal proxy shows an error message as below.

 

 

Gateway log is showing:

2024-01-17T15:42:00.122-0600 WARNING 763 com.l7tech.server: Executing background policy for scheduled task Portal Sync Application
2024-01-17T15:42:00.150-0600 INFO    762 com.l7tech.server.policy.assertion.ServerAuditDetailAssertion: -4: Tenant Policy Template Sync completed
2024-01-17T15:42:00.169-0600 WARNING 761 com.l7tech.server.policy.assertion.ServerAuditDetailAssertion: -5: [Gateway Published APIs Sync - 20240117214200013] The sync scheduler stopped processing without pushing data to the Portal.
Expected: API Sync Type = AUTOMATIC, Sync Readiness = READY, Use New Auto Sync = true
Actual: API Sync Type = AUTOMATIC, Sync Readiness = BUSY, Use New Auto Sync = true
2024-01-17T15:42:00.169-0600 WARNING 761 com.l7tech.server: Executing background policy for scheduled task Portal Sync Gateway Published API 

Further tracing the log, found that the gateway Sync task call the PAPI to get the proxy status: 

https://${outputHost}:${outputPort}/${gateway.portal.config.name}/deployments/0.1/proxies/${gateway.portal.config.node.id}/details

https://apim-ssg.example.com:9443/developer/deployments/0.1/proxies/<PROXY_ID>/details

{"uuid":"<PROXY_ID>","name":"<PROXY_NAME>","enrollmentStatus":"ACTIVE","bulkDeploymentStatus":"DONE","apiKeyBulkDeploymentStatus":"DONE","config":{"useNewAutoSync":true},

"deploymentTypes":{"api":"AUTOMATIC","application":"AUTOMATIC"},

"gwApiSyncStatus":{"lastSyncTime":1702332011941,"lastSyncStatus":"DEPLOYED","lastSyncMd5":"","syncReadiness":"BUSY","portalApiCount":0},"messageQueueDetails":{},"deployedApiKeyCount":29}

 

 

 

Environment

ssg 11 CR1, Portal 5.2

Cause

There is a check in the policy for the sync task that if syncReadiness is “BUSY” then abort the sync process.

Resolution

Login to mysql portal database,  update the table TENANT_GATEWAY in the portal database:  

update TENANT_GATEWAY set GWAPI_SYNC_READINESS = 'READY' where tenant_id='developer' and uuid='<PROXY_ID>';  

Note the uuid should match the returned uuid or the query uuid in the PAPI call. 

After reset the GWAPI_SYNC_READINESS value to 'READY',  rerun the task and sync will run correctly and no more error is showing in the screen. 

 

Additional Information

The sync process will set GWAPI_SYNC_READINESS to BUSY when process starts and set it to READY after sync is done.   It could be a task has been killed in the middle of the process so leaving the status as BUSY to prevent other sync task to run properly.