Coursera Lab Test your proxy ( resolved)

Hi everyone!!

After to exec the command node js this create a proxy in my environment (Cloud) that this proxy call to fire base. After i created a proxy Products that call at first proxy but it have error.

The error is

{"fault":{"faultstring":"The Service is temporarily unavailable","detail":{"errorcode":"messaging.adaptors.http.flow.NoActiveTargets"}}} 

Request Products.

The default target in proxy is:

{dynamicPath}

I dont know who is the error.

Thanks

Regads.

Please provide more details (eg: policy code, JS code etc) so that the community can provide you with suggestions.

@Josh iQu - Can you confirm the backend service you are hitting from this proxy works ? I can partially see your target URL in the trace, can you see if you get a response when you hit it

Yes my back service is active.

https://apigee-developer-trainin-64fea.firebaseio.com

I try change Targetconnection with static Url and it works but i dont know why dont works when try it

Proxy conection

HTTPProxyConnection>

/db

default

secure

default

TargetConnection

{dynamicPath}

Thanks.

Hi Cladius,

My connections are:

Service

https://apigee-developer-trainin-64fea.firebaseio.com

Proxy conection

HTTPProxyConnection>

/db

default

secure

default

TargetConnection

{dynamicPath}

And my js is

realPathSuffix = context.getVariable('proxy.pathsuffix');
pathSuffix = context.getVariable('pathSuffix');
basepath = context.getVariable('proxy.basepath');
context.setVariable('dynamicPath', basepath + pathSuffix + '.json');

I try change Targetconnection with static Url and it works but i dont know why dont works when i use the target server

and other thing that i dont undestand is the Route rule in Proxy

default

Thanks =)

the proxy code looks correct, can you please check if the TargetServer is configured correctly pointing to the URL you mentioned. Navigate to Admin β†’ Environment from the left menu. Make sure you select the appropriate environment, click the Target Servers tab. Please check if the config within that is correct.

Make sure the value of the host points to your backend host: apigee-developer-trainin-64fea.firebaseio.com

1 Like

Hi @Sai Saran Vaidyanathan Yes the TargetServer is configurated

Hi @Sai Saran Vaidyanathan

Now it works because the TargetServer had

 [https://apigee-developer-trainin-64fea.firebaseio.com](https://apigee-developer-trainin-64fea.firebaseio.com)

and i changed for this


[apigee-developer-trainin-64fea.firebaseio.com](https://apigee-developer-trainin-64fea.firebaseio.com/) 

But why is the reason that with https:// is incorrect ?

Thanks and Regards =)

Glad that worked. Thats how Apigee configures Target Servers, its just the server configuration, you don’t have to mention the protocol. The platform includes that according to the configuration (with the port and other attributes). For more info, check this link about target servers

Please accept the answer so that this post is closed. You will find the accept link below. If you have any questions, please reach out to us.

Good luck with the course

1 Like