Jersey server is disconnecting the client after 2 minutes - rest

Jersey REST API is disconcerting client after exact 2 mins however client is not configured for any kind of timeout.
To avoid the issue i am using Jersey Async API that helps me.
But my problem is why jersey is disconnecting the client. Does Jersey has 2 mins timeout configured in it, that i don't know and couldn't find that on Google.
I tried via cURL, postman etc, everywhere client is disconnecting.

I got the fix of my problem.
The issue was due to DoS (Denial of Service) filter configuration. That was configured with 2 mins timeout. I changed that to extended value and so my REST API is working for long run processes.

Related

PUT requests in Wildfly respond with 500

I have an app with a backend and a frontend that communicate with each other, and is developed on Wildfly.
When I make a PUT request from the backend to the frontend, these requests do not arrive and they return a 500 error. However, POST requests work correctly and do not generate problems.
I have checked the configuration of the wildfly, ficher or configuration server (standalone.xml), but I do not fall where the problem may be.
How can I fix this?
So you say when the backend sends a PUT request the response has status 500, while when the backend sends a POST request to the same URL the response has status 2XX?
That does not smell like a connectivity issue. It seems more that your PUT request gets blocked somewhere. Try to find out where that error 500 is coming from. It could be a proxy or firewall inbetween client and server, it could be even that Wildfly or the application are not configured to respond to PUT.

Can my Web Server Issue a Client Rest Request to another REST Server

I have a web server that handles configuration set-up for various IO devices. I need to get some data from a REST server that is running on a different server. Can that web server code issue a client REST GET command to a REST server running on a different server? I tried it but I get a http 500 error. The server code is failing on the REST server request code.
I am closing out this question. Yes, your server can issue http requests to other services. I was having another problem with a self-signed certificate and the error made it look like their was a problem with my http request service.

Increasing GWT Timeout on JBoss Server

We are working on a GWT based web application hosted on JBoss 5.2.0.1. We are using Java/Spring on the server side.
One of the Async services takes more than 5 minutes to return the response from the server, and this leads to error (on production environment):
com.google.gwt.user.client.rpc.StatusCodeException: 504
Gateway Time-out
The gateway did not receive a timely response from the upstream server or application.
The issue doesn't occur when the JBoss is hosted on my local machine. I am suspecting this is some server side setting on production environment which is causing the timeout.
I referred to a couple of questions on SO and the solutions are related to setting timeout with RequestBuilder.setTimeoutMillis(). However, I am not completely convinced that this is related to changes on client side (since the code works fine on my local, where only JBoss configuration may differ from the production)
Any pointers are appreciated. TIA.
It turned out that the there was a timeout set on the gateway. The gateway would return HTTP 504 error in case there is no response returned by the server withing the set timeout (which was 5 minutes)

HTTPS requests sent with ASIHTTPRequest return a NULL response

I am developing an iPad application and using the ASIHTTPRequest library (https://github.com/pokeb/asi-http-request) to make requests to my web server, which runs CentOS 6.2 and is equipped with Apache 2.2 and mod_ssl enabled.
When I make an HTTPS request to the server, sometimes I get a null response. Absolutely nothing. As if the server were completely dead. Sometimes it works just fine, returning the expected response. There is no rhyme or reason to when the response is null and when it's fine.
The server uses a dummy security certificate
I am setting validatesSecurityCertificate to NO
I am setting SSLVerifyClient to none in httpd.conf
Note, HTTPS requests sent through a web browser work fine (after you tell it to proceed without a security certificate). But, all HTTPS requests sent through HTTP Client: ((Zero-length response returned from the server.))
The trick to using ASIHTTPRequest well is that you dont use it. Its deprecated by its author allseeing-i.com/ASIHTTPRequest . I suggest using AFNetworking, RESTKit or even NSURLConnection.
As it is we have no code of yours to see, but when experiencing random issues with a library that hasn't been worked on in years I would say to start by using a different library.

504 Gateway timeout when using Azure Service Bus relay

I'm using Windows Azure Service Bus relay to expose a WCF service that lives on premises using basicHttpRelayBinding.
For every request, the web service will just get some data out of a SQL Database using entity framework, then convert the results to an IEnumerable and finally send the response to the client.
Everything works just fine and I'm able to consume this web service from our web and worker roles hosted in the cloud, but every once in a while I'm getting the 504 Gateway timeout error while waiting for a response from the service, Typically this only happens with queries that take more than 30 - 40 seconds to execute.
Been doing some research and I've find out that this might be due to slow communication between a server acting as a gateway/proxy and some server upstream in the chain, but I'm not sure if there's any way to increase the timeout value so we don't get the 504 error.
Any help would be really appreciated.