On 26/04/18 08:54, Johan Compagner wrote:
> Hi,
> 
> We have a tomcat on an amazon service with for now a ELB L4 (tcp
> loadbalancer, with ssl offloading) before it
> 
> That works for the most part just fine, except we don't know that we are in
> ssl mode or not
> Our application have support for that to look at the x-forwarded-proto
> header (and some other fallbacks) to see what is really the scheme the end
> users uses
> 
> So we switch to a ELB L7 load balancer which is the http load balancer that
> will add those x-forwarded-proto for us. And yes i checked they are on all
> the reques tthen.
> 
> This seems to work for all kind of connections to servlets/files/filters
> and so on except websockets....
> Suddenly if we switch that on then all the websocket connections are
> returning 404 (i see that in the browser and in the tomcat access log)
> Can't find any other thing in the log files that would give me a clue what
> is happening
> 
> Does anybody has an idea why suddenly the http upgrade stuff to websockets
> (wss protocol) are suddenly seen as 404/NOT_FOUND ?

Are you sure the L7 load balancer can handle HTTP upgrade? Looking at
the Amazon docs you want an "Application load balancer" rather than a
"Classic load balancer"

My guess is that the load balancer is removing one or more of the
headers Tomcat depends on to identify the request as a WebSocket
request. Can you use tcpdump to capture a request that returns a 404?
Looking at that trace should point us in the right direction.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to