응답 캐시 정책 배포 오류 문제 해결

ApigeeApigee Hybrid 문서입니다.
Apigee Edge 문서 보기

InvalidTimeout

오류 메시지

다음 오류 메시지와 함께 Apigee UI 또는 API를 통한 API 프록시의 배포가 실패합니다.

Error Saving Revision revision_number
CacheLookupTimeoutInSeconds value value should be greater than zero.

오류 메시지 예시

Error Saving Revision 2
CacheLookupTimeoutInSeconds -1 value should be greater than zero.

오류 스크린샷 예시

버전 2를 저장하는 중에 오류가 발생했습니다.

원인

ResponseCache 정책<CacheLookupTimeoutInSeconds> 요소가 음수로 설정되면 API 프록시 배포가 실패합니다.

예를 들어 <CacheLookupTimeoutInSeconds>-1이면 API 프록시 배포가 실패합니다.

진단

  1. ResponseCache 정책의 <CacheLookupTimeoutInSeconds> 요소에 사용된 잘못된 값을 확인합니다. 이 정보는 오류 메시지에서 확인할 수 있습니다. 예를 들어 다음 오류에서 <CacheLookupTimeoutInSeconds> 요소에 사용된 잘못된 값은 -1입니다.

    CacheLookupTimeoutInSeconds -1 value should be greater than zero.
    
  2. 오류가 발생한 특정 API 프록시의 모든 ResponseCache 정책을 검사합니다. <CacheLookupTimeoutInSeconds> 요소가 지정된 하나 이상의 ResponseCache 정책이 있을 수 있습니다.

    예를 들어 다음 정책 구성은 <CacheLookupTimeoutInSeconds>-1로 설정하며 이는 오류 메시지의 내용과 일치합니다.

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <ResponseCache async="false" continueOnError="false" enabled="true" name="Response-Cache-1">
        <DisplayName>Response Cache-1</DisplayName>
        <Properties/>
        <CacheKey>
            <Prefix/>
            <KeyFragment ref="request.uri" type="string"/>
        </CacheKey>
        <Scope>Exclusive</Scope>
        <ExpirySettings>
            <ExpiryDate/>
            <TimeOfDay/>
            <TimeoutInSec ref="">3600</TimeoutInSec>
        </ExpirySettings>
        <CacheLookupTimeoutInSeconds>-1</CacheLookupTimeoutInSeconds>
    </ResponseCache>
    
  3. <CacheLookupTimeoutInSeconds>가 음의 정수로 지정되면 오류가 발생합니다.

해결 방법

ResponseCache 정책의 <CacheLookupTimeoutInSeconds> 요소 값이 항상 음수가 아닌 정수로 지정되었는지 확인합니다.

위에 표시된 ResponseCache 정책 예시를 수정하려면 <CacheLookupTimeoutInSeconds> element30으로 수정합니다.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ResponseCache async="false" continueOnError="false" enabled="true" name="Response-Cache-1">
    <DisplayName>Response Cache-1</DisplayName>
    <Properties/>
    <CacheKey>
        <Prefix/>
        <KeyFragment ref="request.uri" type="string"/>
    </CacheKey>
    <Scope>Exclusive</Scope>
    <ExpirySettings>
        <ExpiryDate/>
        <TimeOfDay/>
        <TimeoutInSec ref="">3600</TimeoutInSec>
    </ExpirySettings>
    <CacheLookupTimeoutInSeconds>30</CacheLookupTimeoutInSeconds>
</ResponseCache>

InvalidCacheResourceReference

오류 메시지

다음 오류 메시지와 함께 Apigee UI 또는 API를 통한 API 프록시의 배포가 실패합니다.

Error Deploying Revision revision_number to environment
Invalid cache resource reference cache_resource in Step definition response_cache_policy_name. Context Revision:revision_number;APIProxy:ResponseCache;Organization:organization;Environment:environment

오류 메시지 예시

Error Deploying Revision 2 to prod
Invalid cache resource reference itemscache in Step definition ItemsResponseCache. Context Revision:2;APIProxy:StoresInventory;Organization:kkalckstein-eval;Environment:prod

오류 스크린샷 예시

버전 2를 prod에 배포하는 중에 오류가 발생했습니다.

원인

이 오류는 ResponseCache 정책<CacheResource> 요소가 API 프록시가 배포되는 환경에 존재하지 않는 이름으로 설정되는 경우에 발생합니다.

진단

  1. Response Cache 정책의 <CacheResource> 요소와 오류가 발생한 환경에서 사용된 잘못된 캐시를 식별합니다. 오류 메시지에서 이러한 항목을 모두 확인할 수 있습니다. 예를 들어 다음 오류에서 잘못된 캐시의 이름은 itemscache이며 환경 이름은 prod입니다.

    Invalid cache resource reference itemscache in Step definition ItemsResponseCache. Context Revision:2;APIProxy:StoresInventory;Organization:kkalckstein-eval;Environment:prod
    
  2. 오류가 발생한 특정 API 프록시의 모든 ResponseCache 정책을 검사합니다. 1단계에서 확인된 잘못된 캐시가 <CacheResource> 요소에 지정된 특정 ResponseCache 정책을 식별합니다.

    예를 들어 다음 정책은 <CacheResource> 값을 itemscache로 지정하며, 이는 오류 메시지의 내용과 일치합니다.

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <ResponseCache async="false" continueOnError="false" enabled="true" name="ItemsResponseCache">
      <DisplayName>ItemsResponseCache</DisplayName>
      <Properties/>
      <CacheKey>
          <Prefix/>
          <KeyFragment ref="request.uri" type="string"/>
      </CacheKey>
      <CacheResource>itemscache</CacheResource>
      <Scope>Exclusive</Scope>
      <ExpirySettings>
          <ExpiryDate/>
          <TimeOfDay/>
          <TimeoutInSec ref="">3600</TimeoutInSec>
      </ExpirySettings>
      <SkipCacheLookup/>
      <SkipCachePopulation/>
    </ResponseCache>
    
  3. 특정 환경(1단계에서 식별됨)에서 캐시(2단계에서 결정됨)가 정의되었는지 확인합니다.

    Apigee UI에서 API > 환경 구성으로 이동하여 특정 환경의 캐시 탭에 캐시가 있는지 확인합니다. 캐시가 없으면 오류가 발생합니다.

    예를 들어 다음 스크린샷에는 itemscache라는 캐시가 없습니다.

    환경 구성 캐시 탭

    itemscache라는 캐시는 prod 환경에 정의되어 있지 않으므로 다음과 같은 오류가 발생합니다.

    Invalid cache resource reference does_not_exist in Step definition Response-Cache-1. Context Revision:2;APIProxy:ResponseCache;Organization:kkalckstein-eval;Environment:prod
    

해결 방법

<CacheResource> 요소에 지정된 캐시 이름이 API 프록시를 배포하려는 환경에 생성되었는지 확인합니다.

ResponseCacheStepAttachmentNotAllowedReq

오류 메시지

다음 오류 메시지와 함께 Apigee UI 또는 API를 통한 API 프록시의 배포가 실패합니다.

Error Deploying Revision revision_number to environment
Response cache step definition response_cache_policy_name can not be attached more than once in the request path.

오류 메시지 예시

Error Deploying Revision 2 to test
Response cache step definition Response-Cache-1 can not be attached more than once in the request path.

오류 스크린샷 예시

테스트할 버전 2를 배포하는 중에 오류가 발생했습니다.

원인

이 오류는 동일한 ResponseCache 정책이 API 프록시의 흐름 내에서 여러 요청 경로에 연결된 경우 발생합니다.

예를 들어 프록시와 대상 엔드포인트의 요청 Preflow에 동일한 ResponseCache 정책이 연결되어 있으면 이 오류가 발생합니다.

진단

  1. 두 번 이상 연결된 ResponseCache 정책의 이름을 식별합니다. 이 정보는 오류 메시지에서 확인할 수 있습니다. 예를 들어 다음 오류에서 ResponseCache 정책의 이름은 Response‑Cache‑1입니다.

    Error Deploying Revision 2 to test
    Response cache step definition Response-Cache-1 can not be attached more than once in the request path.
    
  2. 오류가 발생한 API 프록시의 프록시 및 대상 엔드포인트에서 모든 요청 흐름을 검토합니다. 두 개 이상의 요청 흐름에 동일한 ResponseCache 정책이 연결되어 있는 경우 이는 오류의 원인이 됩니다.

    다음 예시에서 동일한 ResponseCache 정책 Response-Cache-1은 기본 프록시 엔드포인트 PreFlow의 요청 경로와 기본 대상 엔드포인트 PreFlow에서 구성됩니다.

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <ProxyEndpoint name="default">
        <Description/>
        <FaultRules/>
        <PreFlow name="PreFlow">
            <Request>
                <Step>
                    <Name>Response-Cache-1</Name>
                </Step>
            </Request>
        ...
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <TargetEndpoint name="default">
        <Description/>
        <FaultRules/>
        <PreFlow name="PreFlow">
            <Request/>
            <Response/>
        </PreFlow>
        <PostFlow name="PostFlow">
            <Request>
                <Step>
                    <Name>Response-Cache-1</Name>
                </Step>
            </Request>
        ...
    

해결 방법

ResponseCache 정책이 API 프록시의 모든 흐름에서 하나의 요청 경로에만 연결되어 있는지 확인합니다.

위에 표시된 예시를 수정하려면 두 요청 흐름 중 하나에서 ResponseCache 정책 Response-Cache-1을 삭제합니다.

ResponseCacheStepAttachmentNotAllowedResp

오류 메시지

다음 오류 메시지와 함께 Apigee UI 또는 API를 통한 API 프록시의 배포가 실패합니다.

Error Deploying Revision revision_number to environment
Response cache step definition response_cache_policy_name can not be attached more than once in the response path.

오류 메시지 예시

Error Deploying Revision 2 to test
Response cache step definition Response-Cache-1 can not be attached more than once in the response path.

오류 스크린샷 예시

테스트할 버전 2를 배포하는 중에 오류가 발생했습니다.

원인

이 오류는 동일한 ResponseCache 정책이 API 프록시의 흐름 내에서 여러 응답 경로에 연결된 경우 발생합니다.

예를 들어 프록시와 대상 엔드포인트의 응답 Preflow에 동일한 ResponseCache 정책이 연결되어 있으면 이 오류가 발생합니다.

진단

  1. 두 번 이상 연결된 ResponseCache 정책의 이름을 식별합니다. 이 정보는 오류 메시지에서 확인할 수 있습니다. 예를 들어 다음 오류에서 ResponseCache 정책의 이름은 Response-Cache-1입니다.

    Error Deploying Revision 2 to test
    Response cache step definition Response-Cache-1 can not be attached more than once in the response path.
    
  2. 오류가 발생한 API 프록시의 프록시 및 대상 엔드포인트에서 모든 요청 흐름을 검토합니다. 두 개 이상의 응답 흐름에 동일한 ResponseCache 정책이 연결되어 있는 경우 이는 오류의 원인이 됩니다.

    다음 예시에서 동일한 ResponseCache 정책 Response-Cache-1은 기본 프록시 엔드포인트 PreFlow의 응답 경로와 기본 대상 엔드포인트 PreFlow에서 구성됩니다.

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <ProxyEndpoint name="default">
        <Description/>
        <FaultRules/>
        <PreFlow name="PreFlow">
            <Request>
                <Step>
                    <Name>Response-Cache</Name>
                </Step>
            </Request>
            <Response>
                <Step>
                    <Name>Response-Cache-1</Name>
                </Step>
            </Response>
        </PreFlow>
        ...
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <TargetEndpoint name="default">
        <Description/>
        <FaultRules/>
        <PreFlow name="PreFlow">
            <Request/>
            <Response/>
        </PreFlow>
        <PostFlow name="PostFlow">
            <Request/>
            <Response>
                <Step>
                    <Name>Response-Cache-1</Name>
                </Step>
            </Response>
        </PostFlow>
        ...
    

해결 방법

ResponseCache 정책이 API 프록시의 모든 흐름에서 하나의 응답 경로에만 연결되어 있는지 확인합니다.

위에 표시된 예시를 수정하려면 두 응답 경로 중 하나에서 ResponseCache 정책 Response-Cache-1을 삭제합니다.

InvalidMessagePatternForErrorCode

오류 메시지

다음 오류 메시지 중 하나와 함께 Apigee UI 또는 API를 통한 API 프록시의 배포가 실패합니다.

Error Deploying Revision revision_number to environment
Invalid message pattern found for error code steps.cache.InvalidSkipCacheLookUpCondition.

OR

Error Deploying Revision revision_number to environment
Invalid message pattern found for error code steps.cache.InvalidSkipCachePopulationCondition.

오류 메시지 예시

Error Deploying Revision 2 to prod
Invalid message pattern found for error code steps.cache.InvalidSkipCacheLookUpCondition.

OR

Error Deploying Revision 2 to prod
Invalid message pattern found for error code steps.cache.InvalidSkipCachePopulationCondition.

오류 스크린샷 예시

버전 2를 prod - LookUp에 배포하는 중에 오류가 발생했습니다.

OR

버전 2를 prod - Population에 배포하는 중에 오류가 발생했습니다.

원인

이 오류는 ResponseCache 정책에서 <SkipCacheLookup> 또는 <SkipCachePopulation> 요소에 잘못된 조건이 포함된 경우에 발생합니다.

진단

  1. 오류가 발생한 API 프록시의 모든 ResponseCache 정책을 검토하고 <SkipCacheLookup> 또는 <SkipCachePopulation> 요소에 지정된 조건이 있는 정책이 있는지 확인합니다.

  2. <SkipCacheLookup> 또는 <SkipCachePopulation> 요소에 지정된 조건이 유효하지 않은지 확인합니다. 그렇다면 이는 오류의 원인이 됩니다.

    다음 예시에서 <SkipCachePopulation> 요소는 자바스크립트 연산자 ===을(를) 사용하여 잘못된 동일 값 및 동일 유형을 확인합니다.

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <ResponseCache async="false" continueOnError="false" enabled="true" name="Response-Cache-1">
        <DisplayName>Response Cache-1</DisplayName>
        <Properties/>
        <CacheKey>
            <Prefix/>
            <KeyFragment ref="request.uri" type="string"/>
        </CacheKey>
        <Scope>Exclusive</Scope>
        <ExpirySettings>
            <ExpiryDate/>
            <TimeOfDay/>
            <TimeoutInSec ref="">3600</TimeoutInSec>
        </ExpirySettings>
        <CacheLookupTimeoutInSeconds>2</CacheLookupTimeoutInSeconds>
        <SkipCacheLookup>request.header.bypass-cache === "true"</SkipCacheLookup>
    </ResponseCache>
    

    연산자 ===가 유효하지 않으므로 다음 오류가 발생합니다.

    Invalid message pattern found for error code steps.cache.InvalidSkipCacheLookUpCondition.
    

해결 방법

<SkipCacheLookup> 또는 <SkipCachePopulation> 요소에 지정된 조건이 항상 유효한지 확인합니다.

위에 표시된 ResponseCache 정책 예시를 수정하려면 = 연산자를 사용할 수 있도록 <SkipCacheLookup>을 수정합니다.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ResponseCache async="false" continueOnError="false" enabled="true" name="Response-Cache-1">
    <DisplayName>Response Cache-1</DisplayName>
    <Properties/>
    <CacheKey>
        <Prefix/>
        <KeyFragment ref="request.uri" type="string"/>
    </CacheKey>
    <Scope>Exclusive</Scope>
    <ExpirySettings>
        <ExpiryDate/>
        <TimeOfDay/>
        <TimeoutInSec ref="">3600</TimeoutInSec>
    </ExpirySettings>
    <CacheLookupTimeoutInSeconds>2</CacheLookupTimeoutInSeconds>
    <SkipCacheLookup>request.header.bypass-cache = "true"</SkipCacheLookup>
</ResponseCache>

CacheNotFound

오류 메시지

Apigee UI 또는 API를 통해 API 프록시를 배포하면 다음과 같은 오류 메시지가 표시되고 API 프록시의 배포 상태가 부분적으로 배포된 것으로 표시됩니다.

Error: Cache : cache_resource, not found in organization : organization__environment.

오류 메시지 예시

Error Cache : Response-Cache-1, not found in organization : kkalckstein-eval__prod

원인

이 오류는 오류 메시지에 언급된 특정 캐시가 특정 메시지 프로세서 구성요소에 생성되지 않으면 발생합니다.

해결 방법

도움이 필요하면 Apigee 지원팀에 문의하세요.