Unable to identify proxy for host and more...

I developed a proxy for my company a few months back and havn't had any issues until this week where I started receiving an odd error message posting to a platform that wasn't part of my proxy. I reached out to support and we discovered that it was an issue where I am posting to http://company-prod.apigee.net/my-api/create?api_key=1234 but somehow a different proxy (http://company-prod.apigee.net/my-other-api) was receiving the posts instead which confused me. So I archived and removed the proxy (http://company-prod.apigee.net/my-other-api) and now I receive the following error instead.

{
    "fault": {
        "faultstring": "Unable to identify proxy for host: default and url: /my-api/create",
        "detail": {
            "errorcode": "messaging.adaptors.http.flow.ApplicationNotFound"
        }
    }
}

I've tested this with multiple clients (ARC, Postman, and our internal CRM) and the posts will successfully post from time to time but every now and again we will receive this error. I did a little research and I found a few threads saying about there being issues with the revision so I saved as a new one and tried to redeploy (dev/prod/test) but I now I additionally receive this error when I try to deploy.

Error in deployment for environment dev.
The revision is deployed and traffic can flow, but flow may be impaired. com.apigee.kernel.exceptions.spi.UncheckedException{ code = application.bootstrap.FailedToConfigure, message = Configuration failed, associated contexts = []}

I'm not sure what is going on, I requested access to the support portal but haven't received anything yet so the next thing is to ask the community. Has anyone else had this issue? How was it resolved?

Thank you,

Solved Solved
1 7 2,538
1 ACCEPTED SOLUTION

@jgrace,

Thanks for sharing the org, env and API Proxy names via email.

  1. I checked in the Message Processor logs and found the cause for Deployment failure was the following error :
    2018-02-27 14:14:50,318  Apigee-Main-6 ERROR MESSAGING.RUNTIME - AbstractConfigurator.handleUpdate() : Fatal error deploying proxy: {}
    com.apigee.keyvaluemap.KeyValueMapApiException: KeyValueMap name is invalid
            at com.apigee.keyvaluemap.service.legacy.KeyValueMapServiceImpl.validateMapName(KeyValueMapServiceImpl.java:125) ~[keyvaluemap-1.0.0.jar:na]
            at com.apigee.keyvaluemap.service.legacy.KeyValueMapServiceImpl.createOrUpdateKeyValueMap(KeyValueMapServiceImpl.java:185) ~[keyvaluemap-1.0.0.jar:na]
            at com.apigee.steps.keyvaluemapoperations.KeyValueMapOperationsStepDefinition.digest(KeyValueMapOperationsStepDefinition.java:180) ~[keyvaluemap-operations-1.0.0.jar:na]
            at com.apigee.steps.keyvaluemapoperations.KeyValueMapOperationsStepDefinition.handleAdd(KeyValueMapOperationsStepDefinition.java:197) ~[keyvaluemap-operations-1.0.0.jar:na]
            at com.apigee.entities.AbstractConfigurator.handleUpdate(AbstractConfigurator.java:130) [config-entities-1.0.0.jar:na]
            at com.apigee.messaging.runtime.Application.handleUpdate(Application.java:229) [message-processor-1.0.0.jar:na]
    ...<snipped>
  2. The above error indicated that KeyValueMap name used is invalid in one of the KeyValueMapOperations policy in your API Proxy
  3. In the API Proxy, there was only one KeyValueMapOperations policy that had an empty string for mapIdentifier as shown below:
    <KeyValueMapOperations async="false" continueOnError="false" enabled="true" name="LEADAD-KVM-Pulling-Keys" mapIdentifier="">
  4. As per the documentation of KeyValueMapOperations policy, it says that mapIdentifier attribute is optional. That is, if you don't have this attribute, then a default name "kvmap" will be used. However, if you have this attribute, you need to have a valid name (non empty string).

Solution:

  1. I set the name as MyKeyValueMap as shown below:
    <KeyValueMapOperations async="false" continueOnError="false" enabled="true" name="LEADAD-KVM-Pulling-Keys" mapIdentifier="MyKeyValueMap">
  2. Saved the changes and redeployed the API Proxy in my local org. The API Proxy got deployed without any issues.

Please make the above changes and redeploy the API Proxy in your org.

View solution in original post

7 REPLIES 7

@jgrace,

If you are on Public Cloud, please email me the org, env and API Proxy names to me. I will investigate the issue and get back to you.

If you are on Private Cloud, please check the Message Processor logs and see if there are any errors. Share the error along with stack trace.

@AMAR DEVEGOWDA

Org: level
Env: Prod (however the deployment issue is happening with dev/prod/test)
Proxy: The-Level-API

Thank you for looking into this.

@jgrace,

Thanks for sharing the org, env and API Proxy names via email.

  1. I checked in the Message Processor logs and found the cause for Deployment failure was the following error :
    2018-02-27 14:14:50,318  Apigee-Main-6 ERROR MESSAGING.RUNTIME - AbstractConfigurator.handleUpdate() : Fatal error deploying proxy: {}
    com.apigee.keyvaluemap.KeyValueMapApiException: KeyValueMap name is invalid
            at com.apigee.keyvaluemap.service.legacy.KeyValueMapServiceImpl.validateMapName(KeyValueMapServiceImpl.java:125) ~[keyvaluemap-1.0.0.jar:na]
            at com.apigee.keyvaluemap.service.legacy.KeyValueMapServiceImpl.createOrUpdateKeyValueMap(KeyValueMapServiceImpl.java:185) ~[keyvaluemap-1.0.0.jar:na]
            at com.apigee.steps.keyvaluemapoperations.KeyValueMapOperationsStepDefinition.digest(KeyValueMapOperationsStepDefinition.java:180) ~[keyvaluemap-operations-1.0.0.jar:na]
            at com.apigee.steps.keyvaluemapoperations.KeyValueMapOperationsStepDefinition.handleAdd(KeyValueMapOperationsStepDefinition.java:197) ~[keyvaluemap-operations-1.0.0.jar:na]
            at com.apigee.entities.AbstractConfigurator.handleUpdate(AbstractConfigurator.java:130) [config-entities-1.0.0.jar:na]
            at com.apigee.messaging.runtime.Application.handleUpdate(Application.java:229) [message-processor-1.0.0.jar:na]
    ...<snipped>
  2. The above error indicated that KeyValueMap name used is invalid in one of the KeyValueMapOperations policy in your API Proxy
  3. In the API Proxy, there was only one KeyValueMapOperations policy that had an empty string for mapIdentifier as shown below:
    <KeyValueMapOperations async="false" continueOnError="false" enabled="true" name="LEADAD-KVM-Pulling-Keys" mapIdentifier="">
  4. As per the documentation of KeyValueMapOperations policy, it says that mapIdentifier attribute is optional. That is, if you don't have this attribute, then a default name "kvmap" will be used. However, if you have this attribute, you need to have a valid name (non empty string).

Solution:

  1. I set the name as MyKeyValueMap as shown below:
    <KeyValueMapOperations async="false" continueOnError="false" enabled="true" name="LEADAD-KVM-Pulling-Keys" mapIdentifier="MyKeyValueMap">
  2. Saved the changes and redeployed the API Proxy in my local org. The API Proxy got deployed without any issues.

Please make the above changes and redeploy the API Proxy in your org.

@AMAR DEVEGOWDA, I actually just discovered this issue after rebuilding and removing individual policies until it would finally deploy.

Why would this effect the proxy even if it wasn't attached to a flow and sitting on the side lines?

Did this fix my original issue where it was posting to a different proxy and after removing that proxy it not being able to find a proxy to post to? If so, why would a kvm policy do this much damage?

@jgrace,

The way it works is everything in the Proxy bundle gets validated during deployment, irrespective of whether a Policy is attached to a flow or not. Hence, in your case, though the KVM policy not attached it still got validated and an error was thrown as the name was an empty string.

With regard to your other issue, let's handle it in a different post, if you are still observing the issue.

@AMAR DEVEGOWDA, I understand that but why would it work when I deployed revision 19 to 23?

@jgrace,

I tried to deploy the revisions 19 and 23 of your API in my org and got the exact same error "KeyValueMap name is invalid" with both these revisions. I see consistent behaviour.