While taking Lesson 1 (Rewrite Target using JavaScript) of Part 5 in Create and Manage Api's, I’m getting “Classification failed for host gmanikandan-test.apigee.net” while trying to access http://gmanikandan-test.apigee.net/v1/humor/joke?apikey=1ymmcNLnGhPPa38DGTMuCpiKlVAyGSrt&jokeid=3229...
My Organization name is gmanikandan and It's successfully deployed in test environment. Please suggest on this.
Solved! Go to Solution.
Please check the base path for the API Proxy. If you send in a request to a base path that is not known, you will receive the "classification failed" message.
Example:
$ curl -i http://gmanikandan-test.apigee.net/v1/DOESNOTEXIST HTTP/1.1 404 Not Found Content-Type: application/json; charset=UTF-8 Content-Length: 128 { "fault": { "faultstring": "Classification failed for host gmanikandan-test.apigee.net", "detail": { "code": "CLASSIFICATION_FAILED" } } }
Hi Manikandan,
Your proxy base path appears to be /api. This means the base path of all APIs available from this proxy will be http://gmanikandan-test.apigee.net/api
You are trying to invoke the API by accessing http://gmanikandan-test.apigee.net/v1/humor/joke .
You can see that the two do not match. You must either invoke it as
http://gmanikandan-test.apigee.net/api/joke
or, convert your API proxy to use /v1/humor as the base path, instead of /api.
Does this make sense?
Did you try running a trace to see if the call hits the message processors. It might be failing at the Routers or the Message processors.
Can you share more details
Please check the base path for the API Proxy. If you send in a request to a base path that is not known, you will receive the "classification failed" message.
Example:
$ curl -i http://gmanikandan-test.apigee.net/v1/DOESNOTEXIST HTTP/1.1 404 Not Found Content-Type: application/json; charset=UTF-8 Content-Length: 128 { "fault": { "faultstring": "Classification failed for host gmanikandan-test.apigee.net", "detail": { "code": "CLASSIFICATION_FAILED" } } }
I tried in Trace as well. It just gives 404.
Let me know what other info you would require to help me fix this.
Please refer the below screenshot showing the base path for the API Proxy.
Let me know if you would require any more info to help me.
Hi Manikandan,
Your proxy base path appears to be /api. This means the base path of all APIs available from this proxy will be http://gmanikandan-test.apigee.net/api
You are trying to invoke the API by accessing http://gmanikandan-test.apigee.net/v1/humor/joke .
You can see that the two do not match. You must either invoke it as
http://gmanikandan-test.apigee.net/api/joke
or, convert your API proxy to use /v1/humor as the base path, instead of /api.
Does this make sense?
I tried changing the API proxy to use /v1/humor as the base path instead of /api, but still the same error 😞
I had the same problem and solve it, redeploying the service because it was the right path.
User | Count |
---|---|
5 | |
2 | |
1 | |
1 | |
1 |