Re: nginx + Tomcat 9
You should go with HAProxy. I have used it in the infra of one of Payment Gateway.. It works really good. Let me know.. if I can help you in setting up HAProxy. Best, Harpreet Sandhu On Fri 13 Jul, 2018, 7:43 PM Giacomo Arru - BETA Technologies, wrote: > 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" > A: "users" > 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 > 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" > > A: "users" > > 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: >
Re: nginx + Tomcat 9
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" A: "users" 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 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" > A: "users" > 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:
Re: Getting the Manager app running on localhost.. Please help
Thx everyone for the great replies. I decided to take Konstantin Kolinko's advice and start a new installation from scratch using tomcat-8.5.32. I have had some success, but still can't deploy WARS. Here is what I did: == Step 1: Installing Tomcat per se == I used the instructions on this page: https://wolfpaulus.com/mac/tomcat/ * Download the zip file and unzip it on your HD under /usr/local/apache-tomcat-N.N.N (where N.N.N is the version number). ** Note: In the rest of this document, that directory will be referred to [CATALINA_HOME]. * Create a symlink /Library/Tomcat to make managing future versions easier: sudo rm -f /Library/Tomcat sudo ln -s [CATALINA_HOME] /Library/Tomcat * Change ownership of /Library/Tomcat sudo chown -R /Library/Tomcat * Make all scripts executable sudo chmod +x /Library/Tomcat/bin/*.sh * Now, I can start/stop tomcat as follows: /Library/Tomcat/bin/startup.sh /Library/Tomcat/bin/shutdown.sh ** IMPORTANT: DON’T RUN THOSE SCRIPTS WITH SUDO!!! Especially ‘startup.sh’, as this will end up creating a bunch of temporay dirs and files that will be owned by ROOT, and cannot be written unless you start Tomcat as ROOT. * Test the installation by: ** Starting Tomcat with startup.sh ** Pointing my browser at http://localhost:8080/. ** I see the Tomcat home page no problem == Step 2: Configuring the Tomcat Manager Apps == * Edit the file /Library/Tomcat/conf/tomcat-users.xml, and add the following lines inside the tag pair: * Shutdown and re-start Tomcat * At this point, I can click on any of the following buttons: 'Server Status', 'Manager' App, 'Host Manager' and once I enter the user and passwords I specified in , I get to see the corresponding page. ** On 'Manager App', I was able to start, stop, re-deploy EXISTING apps. ** BUT *** When I tried to deploy a new WAR file, I got: This site can’t be reached The connection was reset. Try: Checking the connection Checking the proxy and the firewall ERR_CONNECTION_RESET After a bit of reading, it seems that this is because the WAR file I was deploying was larger than the maximum size allowed. I fixed that by editing /Library/Tomcat/webapps/manager/WEB-INF/web.xml, and changing the size in the following tags: 5000 5000 0 And now, all seem to work fine. Again, thanks to everyone who pitched in with some advice. It was really helpful. Alain