Error message, cannot bind MySQL service to App - appfog

I get a problem when I try to bind MySQL service to my App (AppFog).
Message : name: VmcError, endpoint: POST:/services, statusCode: 502, code: 503, description: Unexpected response from service gateway
What is the issue?
Anthony

This looks like a problem on AppFog side. 502 is bad gateway, so one of the services server on AppFog is not answering.
Try to do the bind from the web UI, try a different infrastructure, or file a support ticket on AppFog.

Related

API Gateway is returning 403 Forbidden when being called from ECS

I have set up a API gateway in AWS, and when I am able to call it from an application running in my laptop without any issue. However, it's giving me 403 forbidden error when I deploy the app in ECS on Fargate and call the same URL of API gateway.
I've confirmed the API gateway has been deployed and I am passing the stage name correctly.
This is the error message I am getting with 403 HTTP status code.
header([Server:"Server", Content-Type:"application/json", Content-Length:"24", Connection:"keep-alive", x-amzn-RequestId:"7e198xx8-5386-4xx7-axxf-a38cf78618b7", x-amzn-ErrorType:"ForbiddenException", x-amz-apigw-id:"cWxx5GSWXXcFuVg="])
{
"message": "Forbidden"
}
And I am using this base endpoint URL
https://{api-id}.execute-api.(region-id}.amazonaws.com/{stage}
I have tried with various endpoint types (Regional, Edge, Private), but none of them were successful. I might have used wrong URL though.
Do you have any idea what could be wrong in this case?

Expo client run in phone communication with local backend

I'm trying out the communication between my backend / frontend. The application is developed in react native and my backend is based on spring boot. When I run my application in my phone through the Expo Go app I can't send http requests to my backend (it works with postman at: localhost:8080/user).
When I try to do the same requests in my application I have defined the following function:
export function signup(signupRequest) {
return fetch({
url: "192.168.10.152:8080" + "/user",
method: "POST",
body: JSON.stringify(signupRequest)
});
}
And then I get the following error:
[Unhandled promise rejection: TypeError: Network request failed]
at node_modules/whatwg-fetch/dist/fetch.umd.js:535:17 in setTimeout$argument_0
If it helps I run my backend on ubuntu 20.04 and I got my local ip with the command
ip a
Update, I have no updated my application.properties in my spring-boot project like this:
server.address=192.168.10.152
server.port=8080
I still get the same error when I try to make a post-request from my react native application however.
I tried to push my backend to the domain with https protocol and everything was ok. There's an application, ngrok that allows you to send requests to a server but using other link with https protocol.
For example, if you have your backend server on localhost:5000, then you need to open ngrok command line and integrate your server with ngrok http 5000 command. As the result you'll get a link that will look like this:
https://f971-31-128-76-233.eu.ngrok.io

Testing a Grafana dashboard with client error: 407

I'm using Grafana with Prometheus as DataSource. Those environments are behind a proxy, the communication was already open and I can test Telegram notification with success, but testing an alert in a dashboard I get the following error:
"tsdb.HandleRequest() error client_error: client error: 407"
Any ideia why is this happening?
HTTP 407 status code = Proxy Authentication Required, so it looks like your proxy doesn't like that request for some reason. I guess you can check proxy logs to see more details.

"500 Internal Server Error" returned when sending GET request using HTTP Client in idea

I am trying to test a Spring Boot project using HTTP Client of IDEA to send a GET request, but it return "500 Internal Server Error":
But under the same conditions, it is no problem to send by browser:
There's no problem using postman:
But using postwoman will cause a CORS problem. By default, postwoman run on port 3000, so I add #CrossOrigin(value = "http://localhost:3000") on the controller class. After that, there was no problem with the test:
At the same time, there is no problem sending GET request using VSCode's REST Client plug-in:
The controller class code is as follows:
It's confirmed that it's not a firewall problem, so is this a bug of HTTP Client?
Or does the HTTP client need to set some configuration?
It's a proxy problem. It is HTTP proxy set in IDEA. 500 is returned by the proxy server.

API Gateway WebSocket API postConnection timeout

I'm trying to set up a WebSocket API on API Gateway. I'm following the basic tutorial, and I have everything up and running -> Routes for $connect, $disconnect, "test", $default. I am able to connect to the API, store the connectionId in Redis, and retrieve it when accessing from the test route.
The problem is when I try to send back a message from my lambda (single lambda handling all routes). I'm using the following code
const apigwManagementApi = new AWS.ApiGatewayManagementApi({
apiVersion: '2018-11-29',
endpoint: `https://${event.requestContext.domainName}/${event.requestContext.stage}`
});
Then I call
await apigwManagementApi.postToConnection({
ConnectionId: connectionId,
Data: `Echo: ${data}`
}).promise()
This is only called on the "test" route.
All of this is as per their guide. I had to add a patch to be able to make postConnection work, again, as per their tutorial. The problem is when the above method is called I get a Internal Server Error message from the API Gateway and the lambda times out after 3 seconds.
There is very little info on this method. I'm not sure what is causing the internal server error. I have checked the endpoint and the connectionId, both are correct.
What am I doing wrong? Any suggestions?
So the problem wasn't the actual lambda but the fact that it wasn't set up in a VPC that had access to the Internet. So if you're lambda has VPC enabled, make sure you it has a NAT gateway and Internet gateway set up.

Resources