Observing intermittent 404 Errors when running the API calls

When running our API calls, we are seeing 404 errors intermittently. We have checked the API is deployed on the relevant environments.

< HTTP/1.1 404 Not Found
< Date: Sat, 30 Jul 2016 10:37:28 GMT
< Content-Type: text/html
< Content-Length: 344
< Connection: keep-alive
< ETag: "574dd5a3-158"* Server Apigee Router is not blacklisted
< Server: Apigee Router
<
<!DOCTYPE html>
<html>
<head><title>Error</title>
<style>
   body {
       width: 35em;
       margin: 0 auto;
       font-family: Tahoma, Verdana, Arial, sans-serif;
   }
</style>
</head>
<body>
<h1>An error occurred.</h1>
<p>Sorry, the page you are looking for is currently unavailable.<br/>
Please try again later.</p>
</body>
</html>

Can you please help on this issue ?

Solved Solved
0 3 2,805
1 ACCEPTED SOLUTION

  1. Enabled the trace in the UI and ran the API calls. But could not see any trace for the API.
  2. Checked the MP logs, did not see anything there either.
  3. Ran the dig command on the host alias (for ex: www.myhost.com) used in the URL and got the ELB information.
  4. Found that there were about 6 routers associated with the ELB for this host alias
  5. Checked the ports on which each of the routers were listening.
  6. Found that 2 of the routers were listening on port XXXX which matched with the port # specified in the virtual host
  7. However, the remaining 4 routers were listening on a different port YYYY
  8. Checked the list of routers associated with the specific org/environment combination and found that only the 2 routers (refer to point #6) belonged to this org/environment
  9. This explained why the problem was intermittent. Whenever the API calls hit these 2 routers, we got successful response. When the API calls hit the other 4 routers, we got 404 NOT Found.
  10. Removed the 4 routers which did not belong to this org/environment from the ELB.

With this change, we started seeing successful responses for all the API calls.

View solution in original post

3 REPLIES 3

  1. Enabled the trace in the UI and ran the API calls. But could not see any trace for the API.
  2. Checked the MP logs, did not see anything there either.
  3. Ran the dig command on the host alias (for ex: www.myhost.com) used in the URL and got the ELB information.
  4. Found that there were about 6 routers associated with the ELB for this host alias
  5. Checked the ports on which each of the routers were listening.
  6. Found that 2 of the routers were listening on port XXXX which matched with the port # specified in the virtual host
  7. However, the remaining 4 routers were listening on a different port YYYY
  8. Checked the list of routers associated with the specific org/environment combination and found that only the 2 routers (refer to point #6) belonged to this org/environment
  9. This explained why the problem was intermittent. Whenever the API calls hit these 2 routers, we got successful response. When the API calls hit the other 4 routers, we got 404 NOT Found.
  10. Removed the 4 routers which did not belong to this org/environment from the ELB.

With this change, we started seeing successful responses for all the API calls.

@AMAR DEVEGOWDA , Is above issue related to Private Cloud / Public Cloud ? Above issue affected free orgs / paid orgs ? I have seen some community members similar issues. Any details is appreciated.

@Anil Sagar,

This issue was seen in Public cloud. I shared this info as it might help Private Cloud users as well if they Load Balancers in front of their routers.