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:
<Path>{dynamicPath}</Path>
I dont know who is the error.
Thanks
Regads.
Solved! Go to Solution.
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
Please provide more details (eg: policy code, JS code etc) so that the community can provide you with suggestions.
Hi Cladius,
My connections are:
Service
https://apigee-developer-trainin-64fea.firebaseio.com
Proxy conection
HTTPProxyConnection>
<BasePath>/db</BasePath>
<Properties/>
<VirtualHost>default</VirtualHost>
<VirtualHost>secure</VirtualHost>
</HTTPProxyConnection>
<RouteRule name="default">
<TargetEndpoint>default</TargetEndpoint>
</RouteRule>
TargetConnection
<HTTPTargetConnection>
<Properties/>
<LoadBalancer>
<Server name="edge-developer-training-backend"/>
</LoadBalancer>
<Path>{dynamicPath}</Path>
</HTTPTargetConnection>
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
<RouteRule name="default">
<TargetEndpoint>default</TargetEndpoint>
</RouteRule>
Thanks 😃
@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>
<BasePath>/db</BasePath>
<Properties/>
<VirtualHost>default</VirtualHost>
<VirtualHost>secure</VirtualHost>
</HTTPProxyConnection>
<RouteRule name="default">
<TargetEndpoint>default</TargetEndpoint>
</RouteRule>
TargetConnection
<HTTPTargetConnection>
<Properties/>
<LoadBalancer>
<Server name="edge-developer-training-backend"/>
</LoadBalancer>
<Path>{dynamicPath}</Path>
</HTTPTargetConnection>
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
Hi @Sai Saran Vaidyanathan Yes the TargetServer is configurated
Now it works because the TargetServer had
https://apigee-developer-trainin-64fea.firebaseio.com
and i changed for this
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
User | Count |
---|---|
7 | |
2 | |
2 | |
2 | |
1 |