Fastly 400 error "exceeding_max_backends" when creating Fastly Service through pulumi - pulumi

I sometimes get a 400 error when creating my Fastly Service through pulumi. The error message is below.
error: 1 error occurred:
* updating urn:my:cdn: 400 - Bad Request:
Title: Bad request
Detail: Exceeding max_backends: 5
I've had more than 5 backends in other Fastly services, and if I retry the deployment the 400 error goes away. Has anyone else encountered this error?

I found out I have to raise the limits on our fastly account https://docs.fastly.com/en/guides/resource-limits

Related

Error: Request failed with status code 400 Error Call Stack createError node_modules/axios/lib/core/createError.js (16:0)

When I run yarn dev for an NFT website I created I get the error:
Error: Request failed with status code 400
Call Stack
createError
node_modules/axios/lib/core/createError.js (16:0)
settle
node_modules/axios/lib/core/settle.js (17:0)
onloadend
node_modules/axios/lib/adapters/xhr.js (66:0)
What's weird is that the website worked a few days ago and I can`t remember doing anything.
Image of the error

Serverless error UPDATE_FAILED - AWS::IAM::Role - IamRoleLambdaExecution

When deploying a lambda using serverless I am getting the following error when running sls deploy -s dev -v:
UPDATE_FAILED - AWS::IAM::Role - IamRoleLambdaExecution
Serverless Error ----------------------------------------
An error occurred: IamRoleLambdaExecution - The policy failed legacy parsing (Service: AmazonIdentityManagement; Status Code: 400; Error Code: MalformedPolicyDocument; Request ID: b80c863c-1a49-43ae-887c-9611c869e08c; Proxy: null)
This error was caused by a resource incorrectly written.
I had a resource as:
arn:aws:sqs:us-west-2:982028098624/bigtier-dev-sqs
and it had to be:
arn:aws:sqs:us-west-2:982028098624:bigtier-dev-sqs
It took me hours to find it (the error message didn't help), that's why I wanted to share it. If you get this error, read every resource char by char!

Rancher can not access the cluster

I use Rancher to access the cluster , but the access failed and an error was reported:
Cluster health check failed: Failed to communicate with API server: Get "https://172.20.0.1:443/api/v1/namespaces/kube-system?timeout=45s": context deadline exceeded.
Error Get "https://172.20.0.1:443/api/v1/namespaces?timeout=45s": waiting for cluster [c-9dbht] agent to connect.
I located that cattle-cluster-agent is in crashLoopBackOff state and reported the following error:
error msg="failed to unmarshal https://releases.rancher.com/index.yaml: error unmarshaling JSON: while decoding JSON: json: cannot unmarshal string into Go value of type repo.IndexFile".
level=error msg="error syncing 'rancher-latest': handler helm-clusterrepo-download: failed to parse response from https://releases.rancher.com/index.yaml, requeuing".
Observed a panic: runtime.boundsError{x:3, y:0, signed:true, code:0x2} (runtime error: slice bounds out of range [:3] with capacity 0).
The cattle-cluster-agent's container is constantly being restarted.
Anyone knows how to solve it?

Why is Swift Kitura Server Not Terminating Some Threads?

I am having a somewhat reproducible problem on a Swift server I'm running. This is a multi-threaded server, using Kitura. The basics are: After the server has been running for a period of time, download requests start needing retries from the client (usually three retries). The attempts from the client result in the server thread not terminating. On the server, the download problem shows up like this in the log:
[INFO] REQUEST /DownloadFile: ABOUT TO END ...
And then the request never terminates.
The relevant fragment code in my server looks like this:
// <snip>
Log.info(message: "REQUEST \(request.urlURL.path): ABOUT TO END ...")
do {
try self.response.end()
Log.info(message: "REQUEST \(request.urlURL.path): STATUS CODE: \(response.statusCode)")
} catch (let error) {
Log.error(message: "Failed on `end` in failWithError: \(error.localizedDescription); HTTP status code: \(response.statusCode)")
}
Log.info(message: "REQUEST \(request.urlURL.path): COMPLETED")
// <snip>
That is, the server clearly seems to hang on the call to end (a Kitura method). See also https://github.com/crspybits/SyncServerII/blob/master/Sources/Server/Setup/RequestHandler.swift#L105
Immediately before this issue came up last time, I observed the following in my server log:
[2017-07-12T15:31:23.302Z] [ERROR] [HTTPServer.swift:194 listen(listenSocket:socketManager:)] Error accepting client connection: Error code: 5(0x5), ERROR: SSL_accept, code: 5, reason: DH lib
[2017-07-12T15:31:23.604Z] [ERROR] [HTTPServer.swift:194 listen(listenSocket:socketManager:)] Error accepting client connection: Error code: 1(0x1), ERROR: SSL_accept, code: 1, reason: Could not determine error reason.
[2017-07-12T15:31:23.995Z] [ERROR] [HTTPServer.swift:194 listen(listenSocket:socketManager:)] Error accepting client connection: Error code: 1(0x1), ERROR: SSL_accept, code: 1, reason: Could not determine error reason.
[2017-07-12T15:40:32.941Z] [ERROR] [HTTPServer.swift:194 listen(listenSocket:socketManager:)] Error accepting client connection: Error code: 1(0x1), ERROR: SSL_accept, code: 1, reason: Could not determine error reason.
[2017-07-12T15:42:43.000Z] [VERBOSE] [HTTPServerRequest.swift:215 parsingCompleted()] HTTP request from=139.162.78.135; proto=https;
[INFO] REQUEST RECEIVED: /
[2017-07-12T16:32:38.479Z] [ERROR] [HTTPServer.swift:194 listen(listenSocket:socketManager:)] Error accepting client connection: Error code: 1(0x1), ERROR: SSL_accept, code: 1, reason: Could not determine error reason.
I am not sure where this is coming from in the sense that I'm not sure if one of my client's is generating this. I do not explicitly make requests to my server with "/". (I do occasionally see requests made to my server from clients that are not mine-- it is possible this is one of these). Note that all except one of these log messages are coming from Kitura, not directly from my code. My log message is [INFO] REQUEST RECEIVED: /.
If I was a betting man, I'd say the above errors put my server into a state where afterwards, I see this download/retry behavior.
My only solution at this point is to restart the server. From which point the issue doesn't immediately happen.
Thoughts?
I'm not sure if this addresses the root problem, or if it's just a work-around, but it appears to be working. With the server as stated in the question, I had been using Kitura's built-in SSL support. I have now switched to using NGINX as a front-end, and no longer use Kitura's built-in SSL support. NGINX takes care of all the HTTPS/SSL details. Since doing this (about a month ago), and with the server running for all of that intervening time, I have not experience the not terminating issue reported in this question. See also https://github.com/crspybits/SyncServerII/issues/28

Show stacktrace on 500 error when calling tomcat via REST

How can I configure tomcat to show the actual stacktrace during a 500 error on a REST call? Currently I only get a "System error occurred - 500" type of message. Is there a plugin/configuration setting that will allow me to add more detail in the returned error?
I see a similar question: Tomcat not showing full stack trace in Error Report for Http status 500 error but this suggests going to the server logs. I would like (at least in development mode) to see the error at the client side.