Re: SocketTimeoutExceptions When Communicating with a Load Balancer

2020-02-12 Thread Alexey Panchenko
Evan, > I can do an ugly hack to look for a cause, and if it matches connection > timeout, pull it from the immediate cause; otherwise, grab the root cause > to handle others (there are other custom exceptions that are wrapped by > RestClientException, hence the reason). > I think just using

Re: SocketTimeoutExceptions When Communicating with a Load Balancer

2020-02-12 Thread Evan J
On Wed, Feb 12, 2020 at 9:33 AM Alexey Panchenko wrote: > Ah, it's actually much simpler than I thought. > ConnectTimeoutException wraps SocketTimeoutExceptions > but you use ExceptionUtils.getRootCause which retrieves the inner most > exception - which is SocketTimeoutException > > so > 1.

Re: SocketTimeoutExceptions When Communicating with a Load Balancer

2020-02-12 Thread Alexey Panchenko
Ah, it's actually much simpler than I thought. ConnectTimeoutException wraps SocketTimeoutExceptions but you use ExceptionUtils.getRootCause which retrieves the inner most exception - which is SocketTimeoutException so 1. logging or posting a full stackrace would make the reason obvious from the

Re: SocketTimeoutExceptions When Communicating with a Load Balancer

2020-02-11 Thread Evan J
On Tue, Feb 11, 2020 at 3:08 PM Alexey Panchenko wrote: > I guess, It can depends on which level load balancer operates. > if load balancer is layer 4 (TCP) then for the operating system it looks > like connection is made directly to the target application. In this case > exception should happen

Re: SocketTimeoutExceptions When Communicating with a Load Balancer

2020-02-11 Thread Alexey Panchenko
I guess, It can depends on which level load balancer operates. if load balancer is layer 4 (TCP) then for the operating system it looks like connection is made directly to the target application. In this case exception should happen during connect and be wrapped as ConnectTimeoutException but if

Re: SocketTimeoutExceptions When Communicating with a Load Balancer

2020-02-11 Thread Evan J
Thank you for your response. I'm trying to understand your statement. Are you saying when connection times out, SocketTimeoutException is thrown, and then the library captures it and rethrows ConnectTimeoutException? Bottom line, first, is what I explained the expected behavior, and second, how

Re: SocketTimeoutExceptions When Communicating with a Load Balancer

2020-02-11 Thread Oleg Kalnichevski
On Mon, 2020-02-10 at 23:25 -0500, Evan J wrote: > Hi, > > (looks like I'd sent this to a wrong user group originally) > > We deploy an application B (which is basically a backend application > serving a web application) to a cluster of application servers (JBoss > EAP > 7.2 -- 8 instances).

SocketTimeoutExceptions When Communicating with a Load Balancer

2020-02-10 Thread Evan J
Hi, (looks like I'd sent this to a wrong user group originally) We deploy an application B (which is basically a backend application serving a web application) to a cluster of application servers (JBoss EAP 7.2 -- 8 instances). These instances send HTTP requests to a set of gateway