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 publishing APIs on the Gateway, they are not syncing on portal. Scheduler tasks says scheduled but the portal proxy shows an error message:

 

 

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

API Gateway 11.0 CR1
API Portal 5.2

Cause

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

Resolution

Login to the MySQL portal database and 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 resetting the GWAPI_SYNC_READINESS value to 'READY',  rerun the task and sync will run correctly. 

 

Additional Information

The sync process will set GWAPI_SYNC_READINESS to BUSY when  the process starts and set it to READY after sync is done.  It could be that a task has been killed in the middle of the process which left the status as BUSY, preventing other sync tasks to run properly.