ServiceUnavailable Issue - Proxying a PCF App with Apigee Edge

Not applicable

Trying to integrate apigee microgateway with cloud foundry app. Followed all the instruction as given in https://docs.pivotal.io/partners/apigee/proxying.html

Cloudfoundry is on my local workstation, setup as PCF Dev .

CF app works fine when is it not binded to apigee service. That is before establishing the route using bind command "cf bind-route-service local.pcfdev.io myapigee --hostname sample-api-apigee" i was able to access the api https://sample-api-apigee.local.pcfdev.io/ and got response as expected.

Once the bind is established https://sample-api-apigee.local.pcfdev.io/ give below error

{

  • faultstring: "The Service is temporarily unavailable",
  • detail: {
    • errorcode: "messaging.adaptors.http.flow.ServiceUnavailable"

    }

}

Looks like route service is not able to access the target app. And i know target app works fine.

What could be the problem?

I do not see any error logs in apigee-cf-service-broker app.

Thanks,

Bindiya

Solved Solved
0 9 537
1 ACCEPTED SOLUTION

The instructions on the Pivotal site are for using the service broker with hosted Apigee not microgateway. Did you install microgateway as a PCF app? If not, the request is likely failing when hosted Apigee tries to route back down to your local workstation.

View solution in original post

9 REPLIES 9

The instructions on the Pivotal site are for using the service broker with hosted Apigee not microgateway. Did you install microgateway as a PCF app? If not, the request is likely failing when hosted Apigee tries to route back down to your local workstation.

Now that i have microgateway and sample api app running on CF.

The proxy api created based on instruction given in page https://github.com/apigee/pivotal-cf-apigee/tree/master/apigee-cf-service-broker#microgateway.

The request to https://edgemicro-app.local.pcfdev.io/sample fails with unauthorized error

{"error":"access_denied","error_description":"Unauthorized"}

/sample is base path configured in apigee edge proxy. Any clue where the authorization fails? SInce it is 403 error and not 401 i assume apikey provided is correct.

Are you using a trial org? Is it newer, or older? At a point in time we had restrictions on trial orgs that prevented the microgateway from getting configured correctly. @Srinandan Sridhar is this still the case?

Yes i am using trial org. When you say newer, does it mean 'new' account and org, then yes it is.

Also i have tested edgemicro app locally on my laptop (outside cloudfoundry) and proxy seems to work fine. The problem seems to be when edgemicro app run inside cloudfoundry.

Sorry Bindiya I was traveling. Since it works outside pcf I think we need to check the logs in CF for the microgateway app. It will spit logs out standard so the cf command should work. If you can share what you see I think that help us get it sorted. If this gets too slow over the forum let's switch to email or set up a hangout.

Let me know!!

Thanks

Logs in

2017-07-09T22:10:30.77+0100 [RTR/0] OUT edgemicro-app.local.pcfdev.io - [2017-07-09T21:10:30.262+0000] "GET /sample HTTP/1.1" 403 0 60 "-" "curl/7.51.0" "192.168.11.1:63478" "10.0.2.15:60028" x_forwarded_for:"192.168.11.1" x_forwarded_proto:"https" vcap_request_id:"ee21abcb-d80a-4f34-613f-96ed0c7e66b0" response_time:0.510141077 app_id:"29fa9884-b956-4912-805d-cdebf12b9571" app_index:"0" 2017-07-09T22:10:30.77+0100 [RTR/0] OUT

The difference in "API product" configuration between edgemicro running locally and on CF is as below.

Edgemicro App running locally

API Proxy
edgemicro-auth
edgemicro_hello
Edgemicro App running on CF
API Proxy
edgemicro_cf-sample-api-apigee.local.pcfdev.io

Yes, would prefer a hangout call please.

@Bindiya Jinnappa were you able to resolve the unauthorized issue? I am seeing a similar problem with a customer. Curious to learn what went wrong.