Loading

API returns 503 Service Unavailable

Дата публикации: Mar 2, 2024
Решение

SYMPTOM

You receive the 503 error. In the logs you can find occurrences of the following

 

[WrapperListener_start_runner] INFO  com.mulesoft.module.policies.lifecyle.GateKeeper - API groupId:'<GROUPID>:assetId:<ASSETID>',version='<VERSION>:<INSTANCEID>' is blocked (unavailable).
 

but you cannot find the log entry where the API becomes unblocked. For your reference, such entry is similar to

 

[agw-policy-notifier.01] INFO  com.mulesoft.module.policies.lifecyle.GateKeeper - API API {name='groupId:'<GROUPID>:assetId:<ASSET_ID>', version='<VERSION>:<INSTANCEID>'} is now unblocked (available)
 




CAUSE

This is because the runtime cannot establish the relationship with that API instance because it's being used somewhere else.

SOLUTION

Make sure you use a unique instance ID for each of your deployments. It's not possible to use the same instance ID in 2 different auto-discovery elements, as the relationship is 1:1.

In case you are using an API that's reused amongst your other applications, for example, a health check API, you need to create one instance per application that will be using it.

If you're running the project in Anypoint Studio and on your Standalone or Cloudhub runtime at the same time, make sure that you are using a different instance ID or that you've modified the gatekeeper configuration according to your needs as explained here
Номер статьи базы знаний

001120547

 
Загрузка
Salesforce Help | Article