Question

I wanted to have simple session management at ApiGee side so I decided to keep session state in a cache. I used PopulateCache, LookupCache and InvalidateCache policies to implement that. The problem is when this specific policy is attached to the flow (no matter pre-flow, post-flow or any specific flow) then the revision cannot be deployed properly although ApiGee UI says it was successfully deployed (the green circle next to environment name on Deployment button). When I try to throw request at the proxy I got

{
    fault: {
        faultstring: "Internal server error APIProxy revision 1 of myapp does not exist in environment test of     organization marcinklopotek",
        detail: {
            errorcode: "messaging.adaptors.http.ServerError"
        }
    }
}

Redeploying doesn't help either.


I managed to isolate the case to reproduce the problem.

Steps to reproduce:

  1. Create a new proxy with No Target Starting Point Type.
  2. Go to Develop view.
  3. Choose Invalidate Cache policy form the New Policy list.
  4. Attach the policy to the PostFlow and the Response segment.
  5. Remove <CacheResource>default</CacheResource> line from the policy file (to use built in cache)
  6. Save the revision using Save button.

Expected results:

  • ability to serve requests to the proxy
  • ability to start trace session

Actual results:

-- sending request to the proxy causes error

{
    fault: {
        faultstring: "Internal server error APIProxy revision 1 of No-Target does not exist in environment test of organization marcinklopotek",
        detail: {
           errorcode: "messaging.adaptors.http.ServerError"
        }
    }
}

-- starting trace session causes an error

Error creating trace session for API proxy No-Target, revision 1, environment test.
Failed to create DebugSession 1406889941313

Additional Info:

-- detaching and removing the policy doesn't help either and is causing the same errors

-- detaching and removing the policy and saving new revision causes

Error Deploying
Path /no-target conflicts with existing deployment path for revision 1 of the APIProxy No-Target in organization marcinklopotek
Was it helpful?

Solution

This is a product issue with Apigee. When using an InvalidateCache policy without a cache resource, there are problems deploying the proxy. The workaround is to create a cache resource in the environment and refer to that in the policy:

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top