IBM Domino 502 Bad Gateway on redirect - lotus-notes

In our application we have a REST integration with another service
It worked fine untill recently, however, sometimes we are returned with 502 Bad Gateway in the application
We send HTTP requests through curl and it seems that to be working but then we are presented with the error I described above
The client is believed to have a firewall installed
Whenever we face the problem, I usually ask the administrator to turn this thing off and it does the trick but I'm not sure whether it has something to do with the code?
My question is what causes such behaviour and how to avoid it in the future?

Related

502 Exception - Azure Virtual Machine

I have azure virtual machine, hosted angular application which is having NodeJs as a backend.
Sometimes it is throwing 502 exception.
If we refresh the page and try to hit the api then we get response. But, sometimes it throws 502 and tells nothing other than this. We tried capturing IIS logs, there also no info about this exception.
Please help me to resolve this issue.
It is Server Side Problem. Kindly check the proxy or ip you're hitting. 502 Bad Gateway Error, which indicates that a server somewhere within the server stack — specifically, one which is acting as a gateway or proxy itself — received an invalid response from a different server.

Debugging all HTTP[S] on node.js

I'm having fits accomplishing something and after scouring google & SO, throwing my hands up after a few days. Trying to do something that I think is pretty common: debug / examine all HTTP traffic while developing a node.js app.
In Windows it is as simple as firing up Fiddler and I can see all HTTP & HTTPS traffic from all processes. But I've switched platforms over to OSX and trying to make the same work.
I've tried using Charles & MITMPROXY, but all I'm seeing is the traffic to, with the response, my node.js app. My node.js app is calling external services, some using the popular request package (which I have seen how to set that up) but also using other packages, like azure-storage. What's troubling me is I can't get any of the debugging proxies to show me at the azure-storage package is sending / receiving to the endpoints they are calling.
Conceptually I think I get it... I have to tell these different things (like node.js, request & azure-storage) to go through the proxy each of these tools uses... but how can you do that without modifying their source? Can't, like how Fiddler works on Windows, you do something to "all traffic goes through this proxy"?
I'd use Fiddler on OSX but it is currently not working with no ETA in sight after talking to Telerik.
So the problem I was having is what I thought... in my specific instance the module that I was using to access Azure storage was not using the default proxy. I found a package (**global-tunnel that hijacked everything that used the request package to control it going through a proxy. Now I saw stuff show up in the HTTP debuggers I was using.
The problem now is when I am trying to reach an HTTPS endpoint... using something like Charles, it used it's own SSL cert which wasn't trusted by Azure so the connections were refused. Back to the drawing board...

Azure web sites - 500 internal server error (The specified network name is no longer available)

I am running a service on Azure web sites using PHP. From times to times, the server completely stops responding with a 500 HTTP message. So far, I could get these relevant details on the error:
ModuleName: FastCgiModule
Notification: EXECUTE_REQUEST_HANDLER
HttpStatus: 500
HttpReason: Internal Server Error
HttpSubStatus: 0
ErrorCode: The specified network name is no longer available. (0x80070040)
ConfigExceptionInfo:
The only info I was able to find was that this might be a prevention of DoS attack when the server stops executing the scripts (for some limited time?). I solve this now by restarting the server which is not good at all.
As I am unable to find an exact cause of this, I am looking for a better solution than manual restarting or even a hint on how to debug the problem. Thanks

Realtime API self signed certificate

I'm having a problem using the foursquare realtime API and a self signed certificate. Every time I make a test push I get back "Your Server returned: 502 Bad Gateway" but I'm 90% sure it's not actually reaching my server (I have it set to watch get & post at any address and nothing comes through, if I get/post to any address on the server it works. Local and remote.) Is there some kind of issue with self signed certs and the push api?
The 502 error makes it sound like it could be a configuration error on your side, unrelated to your actual code, or foursquare. Generally speaking, running self-signed certs should be fine for our Push API's, so I doubt that's your issue.
If you're not already familiar with 502 errors, you can read up on them a bit here: http://www.checkupdown.com/status/E502.html
I know you said it was working for general remote connections, but it's possible there's something your host doesn't like about requests originating from foursquare? We use Amazon Web Services, so the originating IPs come from a large pool of IP addresses that sometimes end up on block lists (if say, someone wrote a misbehaving app also on Amazon Web Services).

HTTP 502 Server Hangup. What are the causes?

We are querying a node.js based server in our company and of the servers every so often throws a http status 502 after exactly 2 minutes saying "Server Hangup". I saw a lot of questions being asked on stackoverflow but I couldn't find a definitive answer. The way to reproduce this issue is doing an HTTP POST request to the server. The GET requests are fine.
I try the exact same requests to other similar servers and I've never got a 502. I have read everything about what 502 means but I am not sure what could be wrong with the server? Maybe a tcpdump on that server can be helpful? Could it be the server has too many connections and its not freeing them up? I would like to get some context before I email the other team with the problem.
Any feedback is appreciated.
Thanks,
KA

Resources