I have Kibana and Elasticsearch installed on AWS instance. Elasticsearch seems to work fine. However when I try to perform some action (PUT and DELETE requests) using Kibana dashboard it gives me error 501 (Not Implemented). It works in case of GET requests .I access Kibana from my local system using http://aws-ip:5601/. Below is the error trace that I get
Failed to load resource: the server responded with a status of 501 (Not Implemented)
commons.bundle.js?v=15104:38 Error: Not Implemented
at respond (kibana.bundle.js?v=15104:13)
at checkRespForFailure (kibana.bundle.js?v=15104:13)
at kibana.bundle.js?v=15104:1
at processQueue (commons.bundle.js?v=15104:38)
at commons.bundle.js?v=15104:38
at Scope.$eval (commons.bundle.js?v=15104:39)
at Scope.$digest (commons.bundle.js?v=15104:39)
at Scope.$apply (commons.bundle.js?v=15104:39)
at done (commons.bundle.js?v=15104:37)
at completeRequest (commons.bundle.js?v=15104:37)
(anonymous) # commons.bundle.js?v=15104:38
Also if I copy the request payload from network tab of Chrome developer tools and perform the same request (PUT/DELETE) using CURL from AWS terminal, it works fine.
Please help!!!
Thanks in advance .
I am posting my findings in case somebody else is also stuck in similar type of situation. In my case , corporate proxy was just blocking PUT and DELETE requests resulting in 501 (Not implemented) error.
Related
I have an API that I host using Lambda (nodejs), with API-gateway. I'm using serverless to deploy.
Generally things have been fine, but while I was working on a specific function today, I started to receive HTTP 500 errors when hitting the endpoint. However, while there were still API-Gateway access logs for the end point, there were no Cloudwatch logs for the lambda functions getting hit. I was able to verify that the Authorizer was getting hit successfully, and not returning any issue (if it was, it would have been a 401). After using CLI tools to invoke the function from the command line, the 500 error went away and I was able to successfully hit the endpoints again.
Has anyone ever ran into this before? If I'm missing a debug step, I would really like to know. It was really concerning that my API could be generating 500 errors with no paper trail to help me understand what was happening.
You can check your role and permissions ,this link could help you https://aws.amazon.com/premiumsupport/knowledge-center/api-gateway-lambda-stage-variable-500/
Also you can debug further with X-ray : https://docs.aws.amazon.com/lambda/latest/dg/services-xray.html
This is a really strange one as it started throwing errors over night - it's been working fine up until yesterday - this morning it's been playing all day.
I'm using illuminate/filesystem in my project and for the endpoint I was using:
https://s3.eu-west-2.amazonaws.com
This morning we started getting errors saying:
Error executing "ListObjects" on "bucket-01.https://s3.eu-west-2.amazonaws.com"; AWS HTTP error: cURL error 1: Protocol "bucket-01.https" not supported or disabled in libcurl (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)
File: .../vendor/aws/aws-sdk-php/src/WrappedHttpHandler.php
Line: 195
Seeing that it tries to prepend bucket name before the protocol of the endpoint I've decided to remove protocol from the endpoint - making it
s3.eu-west-2.amazonaws.com
Now I'm getting error saying
Error executing "ListObjects" on "//bucket-01.s3.eu-west-2.amazonaws.com/bucket-01.s3.eu-west-2.amazonaws.com";
AWS HTTP error: Client error: GET http://bucket-01.s3.eu-west-2.amazonaws.com/bucket-01.s3.eu-west-2.amazonaws.com resulted in a 404 Not Found response
NoSuchKey The specified key does not exist.
As you can see now it appends endpoint after the initial endpoint.
Does anyone know what might have happened?
After hours of searching for the solution I've came across this issue on laravel/framework repository https://github.com/laravel/framework/issues/36694
I'm using AWS Media Tailor to test an ad inserting demo. The demo page is this one: https://github.com/aws-samples/aws-media-services-simple-vod-workflow/tree/master/12-AdMarkerInsertion.
When I place my manifest into a TheoPlayer I always get an 504 error. My manifes page is: https://ebf348c58b834d189af82777f4f742a6.mediatailor.us-west-2.amazonaws.com/v1/master/3c879a81c14534e13d0b39aac4479d6d57e7c462/MyTestCampaign/llama.m3u8.
I have also tried with: https://ebf348c58b834d189af82777f4f742a6.mediatailor.us-west-2.amazonaws.com/v1/master/3c879a81c14534e13d0b39aac4479d6d57e7c462/MyTestCampaign/llama_with_slates.m3u8.
The specific error is:
{"message":"failed to generate manifest: Unable to obtain template playlist. sessionId:[c915d529-3527-4e37-89e0-087e393e75de]"}
I have read about this error: https://docs.aws.amazon.com/mediatailor/latest/ug/playback-errors-examples.html
But don't know how to fix it.
Maybe I did something wrong or do I need a quote in AWS?
Any idea?
Thanks for the inquiry!
The following example shows the result when a timeout occurs between AWS Elemental MediaTailor and either the ad decision server (ADS) or the origin server.
An HTTP 504 error is known as a Gateway Timeout meaning that a resource was unresponsive and prevented the request from completing successfully. In this case since MediaTailor is returning an HTTP 504 this means that either the ADS or Origin failed to respond within the timeout period.
To troubleshoot this you will need to determine which dependency is failing to respond to MediaTailor and correct it. Typically the issue is the ADS failing to respond to a VAST request performed by MediaTailor which you can confirm by reviewing your CloudWatch logs.
https://docs.aws.amazon.com/mediatailor/latest/ug/monitor-cloudwatch-ads-logs.html
Make sure that your ADS follows the guidelines listed below for integrating with MediaTailor.
https://docs.aws.amazon.com/mediatailor/latest/ug/vast-integration.html
RESPONSE HEADER
Why am I receiving a network error? Does anyone have a clue what layer this is occurring / how I can resolve this issue?
What I've Tried
(1) Checked CORS... everything seems to be ok.
(2) Tried to add timeouts in YAML file as annotations in my LB.
(Note) The request seems to be timing out after 60 seconds
Process:
(1) Axios POST request triggered from front via button click.
(2) Flask server (back) receives POST request and begins to process.
[ERROR OCCURS HERE] (3) Flask server is still processing request on the back; however the client receives a 504 timeout, and there is also some CORS origin mention (don't think this is the issue though, as I've set my CORS settings properly, and this doesn't pop up for any other requests...).
(4) Server responds with a 200 and successfully sets data.
Current stack:
(1) AWS EKS / Kubernetes for deployment (relevant config shown).
(2) Flask backend.
(3) React frontend.
My initial thoughts are that this has to do with the deployment... works perfectly fine in a local context, but I think that there is some timeout setting; however, I'm unsure where this is / how I can increase the timeout. For additional context, this doesn't seem to happen with short-lived requests... just this one particular that takes more time.
If it's failing specifically for long running calls then you may have to adjust your ELB idle timeout. It's 60 seconds by default. Check out the following resource for reference:
https://aws.amazon.com/blogs/aws/elb-idle-timeout-control/
Some troubleshooting tips here.
We have 2 React Native app are using AWS Cognito for authentication. We use library react-native-aws-cognito-js in our code. The apps are working fine until these 2 days. Apps are experiencing intermittent "Internal Server Error".
How can I find more information about this error? Any tool can help us pinpoint the cause?
Update
From CloudTrail, each API call has an event "CreateNetworkInterface". Many of such API calls have error code "Client.NetworkInterfaceLimitExceeded". What is the cause and solution to this?
According to this AWS Doc (in Chinese), CloudWatch will not write to log when error is due to insufficient IP/ENI. That explains the increase in error number but no logs in CloudWatch.
Upate 2
We have found a scheduled Lambda job which may exhausted IP addresses. We stopped the batch job. But still can't have too many user login to server due to "Client.NetworkInterfaceLimitExceeded" error. I realized that there are many "CreateNetworkInterface" event and few "DeleteNetworkInterface" event. How can I "clean up / reset" all network interface in VPC?
Short answer: Cloud Trail.
Long answer with a suggestion
Assuming your application code is fine, most likely the cause of your 500 error is based on Cognito's initial limitations (e.g., number of calls per user): https://docs.aws.amazon.com/cognito/latest/developerguide/limits.html.
AWS suggests to use Cloud Trail, for logging Api calls.
However I would suggest, to prove the limitations first, add some logs around the api call yourself, and in development you could call your app/api with a high number of calls; and most likely you will see the 500 error due to the limitations.
You could do the following in the terminal:
for i in `seq 1 1000`; do curl --cookie SecureCookie=TokenValueFromAWS http://localhost:desirablePort/SecuredPath; done