newman running on gitlab timed out with 503 - gitlab

I have made a newman collection for some calls. One of those call is to call a flask server, I also have a .gitlab-ci file to configure all the tests, all of them run perfectly until today. It wasn't able to call the flask server from gitlab, instead it takes around 1 min and timed out with status code 503. Locally seems working fine. I also try to make curl calls directly to the ip address and it returns the response. Any ideas on why this could happen? What could be changed either from newman side or gitlab side? Don't know if this is related to the proxy issue.

I would search on the receptor side. Because you are geting a valid response code (503) as a response. So the connection to your flask server seems to exist in principle. If you are using your flask server as a gateway, you must check the connection between flask an the other service.

Related

Server is running but getting "could not proxy request from localhost to localhost" error on react

So I am in a very weird situation.
I have a react app with node js backend which was working just fine a couple of days ago.
I don't know what happened but the client stopped connecting to the server by returning a message "Proxy error: Could not proxy request".
I then tried testing just the server side and sent a few different requests via postman. I had these requests saved in my postman as I used them a thousand times before and they all worked fine. But then postman comes back with "Client sent an HTTP request to an HTTPS server".
I checked hundred times my server is running, I can see in the console "Listening on port 5001...".
Furthermore, I tried running the app on another machine, my laptop, and it works all good.
I have spent two days on this issue and I have no clue what's going on.
Things I tried:
all proxy related suggestions on stackoverflow such as changing localhost to 127.0.0.1 or adding a "/", etc.
deleted node modules, and reinstalled
deleted the repo and recloned
tried running on node instead of nodemon
I have no clue what happened to my desktop machine that it literally stopped connecting to the server.
I don't know if you'd need to see any piece of code but I am happy to share anything you need, I just don't know what would help to show.

Localhost to EC2, GET request works but POST request not working AWS

I created a node js app with an express server, after that, I dockerize it and deployed it on AWS ECS, one EC2 instance is also running with good health and in the security group, all traffic is allowed in inbound rules. I have one issue I am sending requests from the frontend to the backend only the GET request works but when I am trying a POST request it didn't work. Below is a screenshot of the Axios error I got when I POST the request -:
I also added a CORS header in the node js backend app -:
Where is the issue can someone guide me? Thanks
This doesn’t look like EC2 issue but mostly your code.
Please have a look at this: Axios sending network error while status is 200 ok

Proxy module doesn't work when serving nuxt app statically

So, Iv'e been trying to setup a small example of a server with 2 factor authentication features. I'm using nuxt as the frontend and flask as the backend.
While developing locally (using npm run dev) I was able to get the chain of communication to work:
The webpage sends a request to server/<some_request>/<some_param>
The proxy module redirects it to http://localhost:5000/<some_request>/<some_param>
The request is sent by the axios module
flask receives the request, processes it and answers.
When trying to deploy this application to a dreamhost server, I used npm run build and npm run generate to serve the website statically. I was able to receive my webpage when browsing.
But when trying to login, the chain described above broke, and requests to server/<some_request>/<some_param> were answered with 404. In the server's command line I saw that flask didn't receive any request, so I assume that this is some issue with the proxy module.
I'm not really sure how to debug this problem, so any help or ideas will be appreciated.
Okay, so I got everything working, and here are my conclusions:
The proxy module, makes the redirection in the client side, meaning that I would be trying to access my own machine when redirecting to localhost:5000, rather than to the server.
The proxy module can't be used when using npm run generate (there's a warning that says it's disabled).
Since I wanted to redirect to flask from the client side (browser), I couldn't just run it as is. I had to register another subdomain and use Passenger to deploy my app (A guide to enabling passenger, getting started with python in passenger and A great guide to deploying flask over passenger).

Calling to api.vineapp.com always fails on server with 504 error

I have a node app using vineapple to pull in vine posts. On my local machine all pulls in fine but for some reason whenever I call out to api.vineapp.com on my server, it always fails.
I have tried also just using wget to see if I can access it but it is always returning back a 504 Gateway Timeout Error.
I also manually setup the hosts file so it uses the same ip that my local machine was hitting but all requests simply never get a response back.
Has anyone ever had this experience before with vineapple? My server is simply a cloud server at rackspace and I know port 80 and 443 can be reached out on so not sure really where else to look.

java.net.ConnectException: Connection timed out error on ubuntu 10.04

While trying to execute an http get, I keep getting the connection time out error. The same code runs perfectly fine when I run it on my system, but this problem occurs when I try to run it on my server. The same url when tried with curl returns response consistently. Both the systems have ubuntu 10.04, and are using open-jdk. Both use commons-httpclient-3.1.jar, and no multi-threading, multiple connections are involved. While I understand there has to be something different somewhere which is causing the difference in behaviour, I am not able to figure out where to start looking. Any pointers?
Is your server sitting behind a proxy? We've had to make all our apps making remote calls (outside our datacenter) proxy aware, otherwise the calls will be blocked by the proxy server. Another thing to try is take java out of the picture and make some basic calls with curl.

Resources