Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Getting a 502: The server encountered a temporary error and could not complete your request

Hello, I am just learning to use ApiGee (evaluation) and I lauched my first instance with a DNS and I try  to use the "hello-world" via https I am get this error:

Ardilom_0-1655160286468.png

If I try to access via http I get "The requested URL /hello-world was not found on this server."

Am I doing something worng? How can I Fix this?
Any of your help will be very appreciated

0 7 12.4K
7 REPLIES 7

Sorry but I had a really bad experience using your apigee platform, I wont use it anymore

I'm assuming the requests are not reaching Apigee in the first place. 

1. You have mentioned DNS, how was this setup?

2. In the Google Cloud Console, under Network > Load Balancers, what is the state of the load balancer backends (ie based on the health checks)

We are facing a similar problem where we are able to access the app via ?apikey= appended in the URL referencing Load Balancer DNS Name but when we are trying to generate accesstoken using OAUTH 2.0 then getting below error 

<html><head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>502 Server Error</title>
</head>
<body text=#000000 bgcolor=#ffffff>
<h1>Error: Server Error</h1>
<h2>The server encountered a temporary error and could not complete your request.<p>Please try again in 30 seconds.</h2>
<h2></h2>
</body></html>

 

DNS resolution is working fine, Please find output as mentioned below

 

Server: 169.254.169.254
Address: 169.254.169.254#53

Non-authoritative answer:
Name: a2k2.in
Address: 34.160.154.133

when we are trying to generate accesstoken using OAUTH 2.0 then getting below error

Let me clarify some details. Are you seeing that error consistently - every request of a particular type?  Are you observing it only when trying to generate an access token? And can you confirm that you see this error when invoking a specific Apigee proxy, and not when invoking other API proxies? And that the token-generation proxy is available at the same endpoint, the same DNS name as the other proxies?

This error

<h2>The server encountered a temporary error and could not complete your request.<p>Please try again in 30 seconds.</h2>

...seems to indicate a load balancer error. The load balancer is part of the Google Cloud networking setup, and is "in front of" Apigee in the data path.  If it is a load balancer error as I suspect, it likely means the request is not reaching Apigee. Another less likely possibility is that your Apigee proxy IS receiving the request, but is invoking something else within GCP, and is experiencing a load balancer error there, and the proxy is then relaying that error back to the requesting client. To determine which case it is, you can use the Apigee debugger/trace to understand whether your Apigee proxy has received and handled the request.

If your request is not reaching Apigee then you need to solve it at the load balancer. 

I'm assuming this is Apigee X. In that case you may want to stop & restart your router VMs.  This is the "managed instance group" that you have provisioned when you first set up Apigee X. 

Hi, We are facing problem only when we are trying to generate access token so that we can use OAUTH. 

Requests are routed through load balancer to APIGEE when we use APIKEYS

https://a2k2.in/demoauth-a2k2?apikey=<>

 

 

I'm not clear on what's going on for you.  I suggest you to contact Apigee support to get this resolved.