Stai visualizzando la documentazione di Apigee e Apigee hybrid.
Visualizza la documentazione di
Apigee Edge.
InvalidTimeout
Messaggio di errore
Il deployment del proxy API tramite l'API o la UI di Apigee non va a buon fine e genera questo messaggio di errore:
Error Saving Revision revision_number CacheLookupTimeoutInSeconds value value should be greater than zero.
Esempio di messaggio di errore
Error Saving Revision 2
CacheLookupTimeoutInSeconds -1 value should be greater than zero.
Screenshot di errore di esempio
Causa
Se l'elemento <CacheLookupTimeoutInSeconds>
di un criterio LookupCache è impostato su un numero negativo, il deployment del proxy API ha esito negativo.
Ad esempio, se l'elemento <CacheLookupTimeoutInSeconds>
è -1
, il deployment del proxy API non va a buon fine.
Diagnosi
Identifica il valore non valido specificato per l'elemento
<CacheLookupTimeoutInSeconds>
nel criterio LookupCache. Puoi trovare queste informazioni nel messaggio di errore. Ad esempio, nel seguente errore, il valore non valido utilizzato per l'elemento<CacheLookupTimeoutInSeconds>
è-1
:CacheLookupTimeoutInSeconds -1 value should be greater than zero.
Esamina tutti i criteri LookupCache nello specifico proxy API in cui si è verificato l'errore. Potrebbero essere presenti uno o più criteri LookupCache in cui viene specificato l'elemento
<CacheLookupTimeoutInSeconds>
. Identifica il criterio LookUpCache in cui viene specificato il valore non valido (identificato nel passaggio #1 sopra) per l'elemento<CacheLookupTimeoutInSeconds>
.Ad esempio, la seguente configurazione di criteri specifica il valore di
<CacheLookupTimeoutInSeconds>
di-1
, che corrisponde al messaggio di errore:<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <LookupCache async="false" continueOnError="false" enabled="true" name="LookupCache-Token"> <DisplayName>LookupCache-Token</DisplayName> <Properties/> <CacheKey> <Prefix/> <KeyFragment ref="request.queryparam.client_id"/> </CacheKey> <CacheLookupTimeoutInSeconds>-1</CacheLookupTimeoutInSeconds> <Scope>Exclusive</Scope> <ExpirySettings> <TimeoutInSec>3600</TimeoutInSec> </ExpirySettings> <AssignTo>usertoken</AssignTo> </LookupCache>
Se
<CacheLookupTimeoutInSeconds>
è specificato come numero intero negativo, è questo alla causa dell'errore.
Risoluzione
Assicurati che il valore dell'elemento <CacheLookupTimeoutInSeconds>
del criterio LookupCache venga sempre specificato come un numero intero non negativo.
Per correggere il criterio LookupCache di esempio mostrato sopra, puoi modificare l'elemento <CacheLookupTimeoutInSeconds>
in 30
.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<LookupCache async="false" continueOnError="false" enabled="true" name="LookupCache-Token">
<DisplayName>LookupCache-Token</DisplayName>
<Properties/>
<CacheKey>
<Prefix/>
<KeyFragment ref="request.queryparam.client_id"/>
</CacheKey>
<CacheResource>tokencache</CacheResource>
<CacheLookupTimeoutInSeconds>30</CacheLookupTimeoutInSeconds>
<Scope>Exclusive</Scope>
<ExpirySettings>
<TimeoutInSec>3600</TimeoutInSec>
</ExpirySettings>
<AssignTo>usertoken</AssignTo>
</LookupCache>
InvalidCacheResourceReference
Messaggio di errore
Il deployment del proxy API tramite l'API o la UI di Apigee non va a buon fine e genera questo messaggio di errore:
Error Deploying Revision revision_number to environment Invalid cache resource reference [cache_resource] in Step definition [populate_cache_policy_name]. Context Revision:[revision_number];APIProxy:ResponseCache;Organization:[organization];Environment:[environment]
Esempio di messaggio di errore
Error Deploying Revision 2 to test
Invalid cache resource reference tokencache in Step definition LookupCache-Token. Context Revision:2;APIProxy:TestCache;Organization:kkalckstein-eval;Environment:test
Screenshot di errore di esempio
Causa
Questo errore si verifica se l'elemento <CacheResource>
è impostato su un nome che non esiste nell'ambiente in cui viene eseguito il deployment del proxy API.
Diagnosi
Identifica la cache non valida utilizzata nell'elemento
<CacheResource>
del criterio LookupCache e l'ambiente in cui si è verificato l'errore. Puoi trovare entrambi gli elementi nel messaggio di errore. Ad esempio, nell'errore seguente, il nome della cache non valida ètokencache
, mentre il nome dell'ambiente ètest
.Invalid cache resource reference tokencache in Step definition LookupCache-Token. Context Revision:2;APIProxy:TestCache;Organization:kkalckstein-eval;Environment:test
Esamina tutti i criteri LookupCache nello specifico proxy API in cui si è verificato l'errore. Identifica il criterio LookupCache specifico in cui è specificato la cache non valida (identificata nel passaggio #1) nell'elemento
<CacheResource>
.Ad esempio, il seguente criterio specifica il valore di
<CacheResource>
cometokencache
, che corrisponde al messaggio di errore:<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <LookupCache async="false" continueOnError="false" enabled="true" name="LookupCache-Token"> <DisplayName>LookupCache-Token</DisplayName> <Properties/> <CacheKey> <Prefix/> <KeyFragment ref="request.queryparam.client_id"/> </CacheKey> <CacheResource>tokencache</CacheResource> <CacheLookupTimeoutInSeconds/> <Scope>Exclusive</Scope> <ExpirySettings> <TimeoutInSec>3600</TimeoutInSec> </ExpirySettings> <AssignTo>usertoken</AssignTo> </LookupCache>
Verifica se la cache (determinata nel passaggio 1) è stata definita nell'ambiente specifico (identificato nel passaggio 1).
Nell'interfaccia utente di Apigee, vai ad AMMINISTRAZIONE > Ambiente > test e verifica se la cache esiste nella scheda Cache di Configurazione dell'ambiente. Se la cache non esiste, è questa la causa dell'errore.
Ad esempio, nello screenshot seguente puoi notare che la cache denominata
tokencache
non esiste.Poiché la cache denominata
tokencache
non è definita nell'ambientetest
, viene visualizzato il seguente errore:Invalid cache resource reference tokencache in Step definition LookupCache-Token. Context Revision:2;APIProxy:TestCache;Organization:kkalckstein-eval;Environment:test
Risoluzione
Assicurati che il nome della cache specificato nell'elemento <CacheResource>
sia stato creato nell'ambiente in cui vuoi eseguire il deployment del proxy API.
CacheNotFound
Messaggio di errore
Il deployment del proxy API tramite l'interfaccia utente o l'API Apigee genera un messaggio di errore simile a questo e lo stato di deployment del proxy API è contrassegnato come deployment parziale:
Error: Cache : cache_resource, not found in organization : organization__environment.
Esempio di messaggio di errore
Error Cache : configCache, not found in organization : kkalckstein-eval__test
Causa
Questo errore si verifica se la cache specifica menzionata nel messaggio di errore non è stata creata su un componente specifico del processore di messaggi.
Risoluzione
Contatta l'assistenza Apigee per ricevere supporto.