Hi Simon, 

I only get oputput in logs with nginx debug, but it is way too much verbose and 
I can't determine why the connection times out. 

I get no useful messages in tomcat logs neither. 

I think I'll set up and HAProxy test environment and see how it works with my 
app and tomcat. 

I suspect I need the nginx+ payment options/support. I'm happy to pay but I've 
read about HAProxy vs nginx and it may be better fitting my needs; so it's 
worth the test. 


Giacomo 





Da: "Simon De Uvarow" <sdeuva...@gmail.com> 
A: "users" <users@tomcat.apache.org> 
Inviato: Mercoledì, 11 luglio 2018 17:29:02 
Oggetto: Re: nginx + Tomcat 9 

On Wed, Jul 11, 2018 at 10:41 AM Giacomo Arru - BETA Technologies 
<giac...@beta.srl> wrote: 

> I tried to enable debug logging for org.apache.tomcat.websocket but 
> without success 
> 
> here is my logging.properties 
> 
> 
> 
> handlers = java.util.logging.ConsoleHandler 
> 
> .handlers = 1catalina.org.apache.juli.AsyncFileHandler, 
> java.util.logging.ConsoleHandler 
> 
> java.util.logging.ConsoleHandler.level = ALL 
> java.util.logging.ConsoleHandler.formatter = 
> org.apache.juli.OneLineFormatter 
> 
> org.apache.coyote.http2.level = ALL 
> org.apache.tomcat.websocket.level = ALL 
> org.apache.coyote.http11.Http11AprProtocol = ALL 
> 
> 
> 
> 
> 
> Giacomo 
> 
> 
> 
> 
> 
> Da: "Mark Thomas" <ma...@apache.org> 
> A: "users" <users@tomcat.apache.org> 
> Inviato: Martedì, 10 luglio 2018 23:27:09 
> Oggetto: nginx + Tomcat 9 
> 
> On 10/07/18 17:59, Giacomo Arru - BETA Technologies wrote: 
> > Hi, 
> > we are using nginx as proxy for our web app deployed in Tomcat 9. 
> > 
> > The app uses websocket. The websocket connection dies after 30/40 
> seconds and we can't figure out why. 
> > 
> > Any suggestions? 
> 
> Turn on debug logging for the org.apache.tomcat.websocket package 
> Mark 
> 
> --------------------------------------------------------------------- 
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org 
> For additional commands, e-mail: users-h...@tomcat.apache.org 
> 
> 
> -- 
> Questo messaggio stato analizzato con Libra ESVA ed risultato non infetto. 
> Seguire il link qui sotto per segnalarlo come spam: 
> 


I had a similar problem. I could resolved it by sending a keep alive 
message from the browser. 
If you still get disconnections (backend or middlerware could disconnect), 
you need some logic in the frontend to restart the connection. 
I didn't have to change any tomcat configuration, or the websocket code. 

You can test connecting direct to tomcat websocket (without nginx) to check 
where is the problem. 
You can also read these nginx configs: 
proxy_connect_timeout 
proxy_read_timeout 

Hope it helps, 


"No olvides, no traiciones, lo que llevas bien dentro de ti. No olvides, no 
traiciones, lo que siempre te ha hecho vivir." 

-- 
Questo messaggio stato analizzato con Libra ESVA ed risultato non infetto. 
Seguire il link qui sotto per segnalarlo come spam: 

Reply via email to