Re: 21 second pause that randomly happens
If all else fails you might want to enable Garbage Colletion (GC) logging to make sure it isn't Full GCs causing the delay. David Cleary wrote: > We have a customer who is experiencing a random, 21 second pause when using > out Tomcat based application server. We believe this may be during a TCP > connect and timeout. Logging indicates the pause happens before the request > makes it to our back end. It mostly happens when we create an initial logical > connection, but we have also seen it elsewhere where we believe the TCP Keep > alive was expired and a new socket had to be established. However, I do not > know this and am hoping there is some logging I can turn on in the NIO > connector to collect more data. I tried turning on logging in the Endpoint > class, but that did not provide anything useful. There is a NAT firewall > between the client and server, so I'm looking for some TCP level logging that > could point me in the proper direction. > > Thanks > David Cleary > Progress > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: 21 second pause that randomly happens
On 16.07.2018 16:35, David Cleary wrote: > 2018-07-16 15:55 GMT+03:00 David Cleary : >>> We have a customer who is experiencing a random, 21 second pause when using >>> out Tomcat > based application server. We believe this may be during a TCP connect and > timeout. Logging > indicates the pause happens before the request makes it to our back end. > Logging where then ? Sorry for any formatting issues. I have a digest subscription which doesn't lend well to interactivity. Clients are running on Windows machines. Server is running on AWS and Linux. There is a cloud firewall in between (pfSense). Do not have the details if they are running the cloud version available on AWS. Client logging shows this: [18/05/16@12:12:48.822+1000] P-006760 T-002372 1 4GL REV Trying Connection [18/05/16@12:13:09.925+1000] P-006760 T-002372 1 4GL REV Connect Complete 21102 [18/05/16@12:13:09.925+1000] P-006760 T-002372 1 4GL REV WARNING: LONG CONNECTION [18/05/16@12:13:09.925+1000] P-006760 T-002372 1 4GL REV A4DC513EA548E24508E1E90AA9EA61DD9386DDB475AD.clintons connected 21102 Localhost access log shows this localhost_access_log.2018-05-16.txt:10.255.11.250 - - [16/May/2018:12:13:16 +1000] "POST /apsv?CONNHDL=A4DC513EA548E24508E1E90AA9EA61DD9386DDB475AD.clintons HTT P/1.1" 200 253 1 And our back end agent log shows this: clintons.agent.log:[18/05/16@12:13:16.294+1000] P-019364 T-2819262208 2 AS-19 AS Application Server connected with connection id: A4DC513EA548E24508E1E90AA9EA61 DD9386DDB475AD.clintons. (8358) clintons.agent.log:[18/05/16@12:13:16.299+1000] P-019364 T-3688318720 2 AS-19 AS Application Server disconnected with connection id: A4DC513EA548E24508E1E90AA9E A61DD9386DDB475AD.clintons. (8359) Customer had some weird reconnection logic that was part of their application. After removing the code so the logical connection would be kept open, we saw this pause happen on a standard request. I do not know how long this logical connection was idle before running. I also do not know if Tomcat closed the underlying socket either due to resources or a keep-alive timeout. I was hoping logging could tell me when Tomcat binds to an incoming socket and releases it. I was hoping to show in the above example, as far as Tomcat is concerned, the 21 second delay happened outside of the server. Scouring the source code and trying some experimentation, it does not appear there is logging available at the socket level. It mostly happens > when we create an initial logical connection, but we have also seen it > elsewhere where we > believe the TCP Keep alive was expired and a new socket had to be > established. However, I > do not know this and am hoping there is some logging I can turn on in the NIO > connector to > collect more data. I tried turning on logging in the Endpoint class, but that > did not provide > anything useful. > If the connection request does not even reach the Tomcat back-end, that is > also unlikely > to provide much information. (Not being facetious here, just stating a fact). > Can you do a "netstat" command on your Tomcat server when this happens ? > If yes, maybe some part of the output would provide some information from the > TCP level > (such as a high number of connections, to the Tomcat NIO port, in some > specific TCP state e.g.) Customer did some probing with Wireshark and said they were seeing a TCP retransmission (sorry, I do not have many more details). In investigating this, we discovered this info on TCP timeouts: " There's probably a million reasons why the client may never receive a SYN-ACK. The one I've seen more often is packet loss, which in turn can have lots of reasons, for example a malfunctioning or misconfigured network switch. However, you can immediately spot if your timeout/hang problems are caused by TCP retransmission because they happen to cause response times that are unusually frequently distributed around 3, 9 and 21 seconds (and on, of course). In fact, the TCP retransmission timeout starts at 3 seconds, but if the client tries to resend after a timeout and still receives no answer, it doubles the wait to 6 s, so the total response time will be 9 seconds, assuming that the client now finally receives the SYN-ACK. Otherwise, 3 + 6 + 12 = 21, then 3 + 6 + 12 + 24 = 45 s and so on and so forth." This is why we are focusing on the TCP layer. > There is a NAT firewall between the client and server, so I'm looking for > some TCP level logging that could point me in the proper direction. > >> Tomcat version = ? > > Sorry. Tomcat 8.5.27. > > And on which kind of O.S. is this happening ? > Also maybe another question : is this happening on a Tomcat server which is > dedicated to > that particular customer ? or is the Tomcat server shared between different > customers, and > only that particular customer experiences these delays ? We sell an application server that customers
Re: Can't start Tomcat in debug mode
On 2018-07-16, 9:28 AM, "Konstantin Kolinko" wrote: > >>ps: a HTTP request against the debug port will print this message in the > >>catalina.out Debugger failed to attach: handshake failed - received >GET / > >>HTTP/1.1< - expected >JDWP-Handshake< > > > > Yep, I get that message when running with jpda > > You have that message = You have started in debug mode = You tried > connecting with a wrong client. > > I have impression that you have successfully started Tomcat in debug mode. > The problem is that you cannot connect to it. > > Have you tried to connect with a proper debug client (IDE)? Duh... I thought both the IDE AND the browser had to use port 8000. I now realize that port 8000 is just for the IDE to connect to the server and request a debugging session. The browser should still connect through 8080. Now that I do that, everything works file. Thx for the help everybody. Alain You may try using explicit IPv4 address, http://127.0.0.1:8000/ I wonder whether address=8000 can be used to specify IP address as well as port. Also > /Library/Tomcat What version is that? Is it ours? > I have a file /Library/Tomcat/bin/setenv You tried many ways. I wonder which one wins. All those environment variables are used to build the command line for Java. I wonder whether java sees several copies of those options. For example, if you start with suspend=y then Java will start, but it will stop (like being on a breakpoint) at Tomcat startup sequence. Have you looked into Tomcat log files? Look for output from VersionLoggerListener. http://tomcat.apache.org/tomcat-9.0-doc/config/listeners.html#Version_Logging_Lifecycle_Listener_-_org.apache.catalina.startup.VersionLoggerListener Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: 21 second pause that randomly happens
On 16.07.2018 16:35, David Cleary wrote: 2018-07-16 15:55 GMT+03:00 David Cleary : We have a customer who is experiencing a random, 21 second pause when using out Tomcat based application server. We believe this may be during a TCP connect and timeout. Logging indicates the pause happens before the request makes it to our back end. Logging where then ? It mostly happens when we create an initial logical connection, but we have also seen it elsewhere where we believe the TCP Keep alive was expired and a new socket had to be established. However, I do not know this and am hoping there is some logging I can turn on in the NIO connector to collect more data. I tried turning on logging in the Endpoint class, but that did not provide anything useful. If the connection request does not even reach the Tomcat back-end, that is also unlikely to provide much information. (Not being facetious here, just stating a fact). Can you do a "netstat" command on your Tomcat server when this happens ? If yes, maybe some part of the output would provide some information from the TCP level (such as a high number of connections, to the Tomcat NIO port, in some specific TCP state e.g.) There is a NAT firewall between the client and server, so I'm looking for some TCP level logging that could point me in the proper direction. Tomcat version = ? Sorry. Tomcat 8.5.27. And on which kind of O.S. is this happening ? Also maybe another question : is this happening on a Tomcat server which is dedicated to that particular customer ? or is the Tomcat server shared between different customers, and only that particular customer experiences these delays ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: 21 second pause that randomly happens
2018-07-16 15:55 GMT+03:00 David Cleary : >> We have a customer who is experiencing a random, 21 second pause when using >> out Tomcat based application server. We believe this may be during a TCP connect and timeout. Logging indicates the pause happens before the request makes it to our back end. It mostly happens when we create an initial logical connection, but we have also seen it elsewhere where we believe the TCP Keep alive was expired and a new socket had to be established. However, I do not know this and am hoping there is some logging I can turn on in the NIO connector to collect more data. I tried turning on logging in the Endpoint class, but that did not provide anything useful. There is a NAT firewall between the client and server, so I'm looking for some TCP level logging that could point me in the proper direction. >Tomcat version = ? Sorry. Tomcat 8.5.27. Dave -
Re: 21 second pause that randomly happens
2018-07-16 15:55 GMT+03:00 David Cleary : > We have a customer who is experiencing a random, 21 second pause when using > out Tomcat based application server. We believe this may be during a TCP > connect and timeout. Logging indicates the pause happens before the request > makes it to our back end. It mostly happens when we create an initial logical > connection, but we have also seen it elsewhere where we believe the TCP Keep > alive was expired and a new socket had to be established. However, I do not > know this and am hoping there is some logging I can turn on in the NIO > connector to collect more data. I tried turning on logging in the Endpoint > class, but that did not provide anything useful. There is a NAT firewall > between the client and server, so I'm looking for some TCP level logging that > could point me in the proper direction. Tomcat version = ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Can't start Tomcat in debug mode
-Original Message- From: Désilets, Alain Sent: Monday, July 16, 2018 1:45 PM To: Tomcat Users List Subject: Can't start Tomcat in debug mode > I am unable to start Tomcat in debug mode. I have searched and see that lots > of people are having similar issues. I tried all the fixes that were proposed > and none of them seem to work. > Here is what I have at the moment. > I have a file /Library/Tomcat/bin/setenv with the following content > # Trying to start Tomcat in debug mode... > # > # > CATALINA_OPTS="-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n" > JPDA_ADDRESS=8000 > JPDA_TRANSPORT=dtsocket > JPDA_SUSPEND=n Shouldn't it be "JDPA_TRANSPORT=dt_socket" - with the underscore? Regards Sebastian [snip]
Re: Can't start Tomcat in debug mode
2018-07-16 15:56 GMT+03:00 Désilets, Alain : >>lurodrig@:tomcat-9-0-5-installation$ lsof -i:8000 >>COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME >>java13522 lurodrig4u IPv4 450991 0t0 TCP localhost:8000 >>(LISTEN) > > Gives me this > > java2323 desilets5u IPv4 0xad510ad86ad41671 0t0 TCP > *:irdmi (LISTEN) > > which seems to indicate that Tomcat is NOT listening on locahost, but on > something called *:irdmi. Not sure that this matters, because from what I can > read on the net, *:irdmi corresponds to port 8000. > Note that the above lsof output for port 8000 says "IPv4",but the one below for port 8080 says "IPv6". >>lurodrig@:tomcat-9-0-5-installation$ lsof -i:8080 >>COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME >>java13522 lurodrig 51u IPv6 450993 0t0 TCP *:http-alt >> (LISTEN) > > Gives me this: > > java2323 desilets 61u IPv6 0xad510ad8630f7d61 0t0 TCP > *:http-alt (LISTEN) > > Again, I believe *:http-alt is just an alias for 8080, so it doesn't seem to > matter. > > Note that if I start with 'catalina.sh start' (i.e. no jpda), I get *:http-al > for 'lsof -8080' and nothing for 'lsof -8000'. > >>Hope it helps, > > So far, no. But I appreciate the effort. Any other ideas? > >>ps: a HTTP request against the debug port will print this message in the >>catalina.out Debugger failed to attach: handshake failed - received >GET / >>HTTP/1.1< - expected >JDWP-Handshake< > > Yep, I get that message when running with jpda You have that message = You have started in debug mode = You tried connecting with a wrong client. I have impression that you have successfully started Tomcat in debug mode. The problem is that you cannot connect to it. Have you tried to connect with a proper debug client (IDE)? You may try using explicit IPv4 address, http://127.0.0.1:8000/ I wonder whether address=8000 can be used to specify IP address as well as port. Also > /Library/Tomcat What version is that? Is it ours? > I have a file /Library/Tomcat/bin/setenv You tried many ways. I wonder which one wins. All those environment variables are used to build the command line for Java. I wonder whether java sees several copies of those options. For example, if you start with suspend=y then Java will start, but it will stop (like being on a breakpoint) at Tomcat startup sequence. Have you looked into Tomcat log files? Look for output from VersionLoggerListener. http://tomcat.apache.org/tomcat-9.0-doc/config/listeners.html#Version_Logging_Lifecycle_Listener_-_org.apache.catalina.startup.VersionLoggerListener Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Can't start Tomcat in debug mode
Thx Luis, > /Library/Tomcat/bin/catalina.sh jpda start should be good enough. If you > have a look at the tomcat command line process are the JPDA options > enabled? E.g.: > >$ $CATALINA_HOME/bin/catalina.sh jpda start > >$ ps -ef | grep --color dt_socket >lurodrig 13522 2883 6 13:58 pts/500:00:04 >.../jdk1.8.0_162/bin/java... > > -agentlib:jdwp=transport=dt_socket,address=localhost:8000,server=y,suspend=n >... org.apache.catalina.startup.Bootstrap start This is what I get: 501 2323 1 0 8:31am ttys0010:25.08 /Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home/bin/java [...] -agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n [...] org.apache.catalina.startup.Bootstrap start >In the catalina.out you should see something like: Listening for transport >dt_socket at address: 8000 Yep, I get it. >lurodrig@:tomcat-9-0-5-installation$ lsof -i:8000 >COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME >java13522 lurodrig4u IPv4 450991 0t0 TCP localhost:8000 >(LISTEN) Gives me this java2323 desilets5u IPv4 0xad510ad86ad41671 0t0 TCP *:irdmi (LISTEN) which seems to indicate that Tomcat is NOT listening on locahost, but on something called *:irdmi. Not sure that this matters, because from what I can read on the net, *:irdmi corresponds to port 8000. >lurodrig@:tomcat-9-0-5-installation$ lsof -i:8080 >COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME >java13522 lurodrig 51u IPv6 450993 0t0 TCP *:http-alt (LISTEN) Gives me this: java2323 desilets 61u IPv6 0xad510ad8630f7d61 0t0 TCP *:http-alt (LISTEN) Again, I believe *:http-alt is just an alias for 8080, so it doesn't seem to matter. Note that if I start with 'catalina.sh start' (i.e. no jpda), I get *:http-al for 'lsof -8080' and nothing for 'lsof -8000'. >Hope it helps, So far, no. But I appreciate the effort. Any other ideas? >ps: a HTTP request against the debug port will print this message in the >catalina.out Debugger failed to attach: handshake failed - received >GET / >HTTP/1.1< - expected >JDWP-Handshake< Yep, I get that message when running with jpda Alain
21 second pause that randomly happens
We have a customer who is experiencing a random, 21 second pause when using out Tomcat based application server. We believe this may be during a TCP connect and timeout. Logging indicates the pause happens before the request makes it to our back end. It mostly happens when we create an initial logical connection, but we have also seen it elsewhere where we believe the TCP Keep alive was expired and a new socket had to be established. However, I do not know this and am hoping there is some logging I can turn on in the NIO connector to collect more data. I tried turning on logging in the Endpoint class, but that did not provide anything useful. There is a NAT firewall between the client and server, so I'm looking for some TCP level logging that could point me in the proper direction. Thanks David Cleary Progress
Re: Can't start Tomcat in debug mode
Hello Alain, /Library/Tomcat/bin/catalina.sh jpda start should be good enough. If you have a look at the tomcat command line process are the JPDA options enabled? E.g.: $ $CATALINA_HOME/bin/catalina.sh jpda start $ ps -ef | grep --color dt_socket lurodrig 13522 2883 6 13:58 pts/500:00:04 .../jdk1.8.0_162/bin/java... -agentlib:jdwp=transport=dt_socket,address=localhost:8000,server=y,suspend=n ... org.apache.catalina.startup.Bootstrap start In the catalina.out you should see something like: Listening for transport dt_socket at address: 8000 Asking for the debug and http ports: lurodrig@:tomcat-9-0-5-installation$ lsof -i:8000 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME java13522 lurodrig4u IPv4 450991 0t0 TCP localhost:8000 (LISTEN) lurodrig@:tomcat-9-0-5-installation$ lsof -i:8080 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME java13522 lurodrig 51u IPv6 450993 0t0 TCP *:http-alt (LISTEN) Hope it helps, Luis ps: a HTTP request against the debug port will print this message in the catalina.out Debugger failed to attach: handshake failed - received >GET / HTTP/1.1< - expected >JDWP-Handshake< 2018-07-16 13:45 GMT+02:00 Désilets, Alain : > I am unable to start Tomcat in debug mode. I have searched and see that > lots of people are having similar issues. I tried all the fixes that were > proposed and none of them seem to work. > > Here is what I have at the moment. > > I have a file /Library/Tomcat/bin/setenv with the following content > # Trying to start Tomcat in debug mode... > # > # CATALINA_OPTS="-agentlib:jdwp=transport=dt_socket,address= > 8000,server=y,suspend=n" > JPDA_ADDRESS=8000 > JPDA_TRANSPORT=dtsocket > JPDA_SUSPEND=n > > Note that I tried setting the JPDA environment both ways (using > CATALINA_OPTS and JPDA_* vars) and the result is the same. > > To restart tomcat, I do the following command: > > > echo "" > /Library/Tomcat/logs/catalina.out ; > /Library/Tomcat/bin/shutdown.sh; sleep 2; /Library/Tomcat/bin/catalina.sh > jpda start; echo "Restarted tomcat, catalina.out is:"; cat > /Library/Tomcat/logs/catalina.out > > This produces the following output: > > > Using CATALINA_BASE: /Library/Tomcat > > Using CATALINA_HOME: /Library/Tomcat > > Using CATALINA_TMPDIR: /Library/Tomcat/temp > > Using JRE_HOME:/Library/Java/JavaVirtualMachines/jdk1.8.0_ > 102.jdk/Contents/Home > > Using CLASSPATH: /Library/Tomcat/bin/bootstrap. > jar:/Library/Tomcat/bin/tomcat-juli.jar > > Using CATALINA_BASE: /Library/Tomcat > > Using CATALINA_HOME: /Library/Tomcat > > Using CATALINA_TMPDIR: /Library/Tomcat/temp > > Using JRE_HOME:/Library/Java/JavaVirtualMachines/jdk1.8.0_ > 102.jdk/Contents/Home > > Using CLASSPATH: /Library/Tomcat/bin/bootstrap. > jar:/Library/Tomcat/bin/tomcat-juli.jar > > Tomcat started. > > Restarted tomcat, catalina.out is: > > > > 16-Jul-2018 07:35:12.366 INFO [main] > org.apache.catalina.core.StandardServer.await > A valid shutdown command was received via the shutdown port. Stopping the > Server instance. > > 16-Jul-2018 07:35:12.366 INFO [main] org.apache.coyote.AbstractProtocol.pause > Pausing ProtocolHandler ["http-nio-8080"] > > 16-Jul-2018 07:35:12.426 INFO [main] org.apache.coyote.AbstractProtocol.pause > Pausing ProtocolHandler ["ajp-nio-8009"] > > 16-Jul-2018 07:35:12.483 INFO [main] > org.apache.catalina.core.StandardService.stopInternal > Stopping service [Catalina] > > 16-Jul-2018 07:35:12.517 INFO [main] org.apache.coyote.AbstractProtocol.stop > Stopping ProtocolHandler ["http-nio-8080"] > > 16-Jul-2018 07:35:12.520 INFO [main] org.apache.coyote.AbstractProtocol.stop > Stopping ProtocolHandler ["ajp-nio-8009"] > > 16-Jul-2018 07:35:12.523 INFO [main] > org.apache.coyote.AbstractProtocol.destroy > Destroying ProtocolHandler ["http-nio-8080"] > > 16-Jul-2018 07:35:12.523 INFO [main] > org.apache.coyote.AbstractProtocol.destroy > Destroying ProtocolHandler ["ajp-nio-8009"] > > > > When I go to http://localhost:8000, I get “This site can’t be reached”. > > > > Same if I go to http://localhost:8080/. > > > > But… if I restart tomcat using the same command as above, except without > the ‘jpda’ argument to Catalina.sh, then 8080 is started fine, but not 8000 > (which Is to be expected). > > > > I checked to see if port 8000 is already busy by issueing this command: > > > > sudo lsof -iTCP -sTCP:LISTEN -n -P | grep 8000 > > > > But is shows no process listening on that port. And I know that this > command works because when I successfully start tomcat without ‘jpda’, if I > use this command to check for port 8080, I get: > > > > java 1925 desilets 60u IPv6 0xad510ad8630ef821 0t0 TCP > *:8080 (LISTEN) > > > Not sure what to try next… have pretty much run out of options at this > point. > > Any help will be greatly appreciated. > > Thx. > > Alain Désilets > National Research Council of Canad > -- "Ever tried. Ever failed. No matter. Try Again. Fail
Can't start Tomcat in debug mode
I am unable to start Tomcat in debug mode. I have searched and see that lots of people are having similar issues. I tried all the fixes that were proposed and none of them seem to work. Here is what I have at the moment. I have a file /Library/Tomcat/bin/setenv with the following content # Trying to start Tomcat in debug mode... # # CATALINA_OPTS="-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n" JPDA_ADDRESS=8000 JPDA_TRANSPORT=dtsocket JPDA_SUSPEND=n Note that I tried setting the JPDA environment both ways (using CATALINA_OPTS and JPDA_* vars) and the result is the same. To restart tomcat, I do the following command: echo "" > /Library/Tomcat/logs/catalina.out ; /Library/Tomcat/bin/shutdown.sh; sleep 2; /Library/Tomcat/bin/catalina.sh jpda start; echo "Restarted tomcat, catalina.out is:"; cat /Library/Tomcat/logs/catalina.out This produces the following output: Using CATALINA_BASE: /Library/Tomcat Using CATALINA_HOME: /Library/Tomcat Using CATALINA_TMPDIR: /Library/Tomcat/temp Using JRE_HOME: /Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home Using CLASSPATH: /Library/Tomcat/bin/bootstrap.jar:/Library/Tomcat/bin/tomcat-juli.jar Using CATALINA_BASE: /Library/Tomcat Using CATALINA_HOME: /Library/Tomcat Using CATALINA_TMPDIR: /Library/Tomcat/temp Using JRE_HOME: /Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home Using CLASSPATH: /Library/Tomcat/bin/bootstrap.jar:/Library/Tomcat/bin/tomcat-juli.jar Tomcat started. Restarted tomcat, catalina.out is: 16-Jul-2018 07:35:12.366 INFO [main] org.apache.catalina.core.StandardServer.await A valid shutdown command was received via the shutdown port. Stopping the Server instance. 16-Jul-2018 07:35:12.366 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"] 16-Jul-2018 07:35:12.426 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-nio-8009"] 16-Jul-2018 07:35:12.483 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina] 16-Jul-2018 07:35:12.517 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"] 16-Jul-2018 07:35:12.520 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["ajp-nio-8009"] 16-Jul-2018 07:35:12.523 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8080"] 16-Jul-2018 07:35:12.523 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["ajp-nio-8009"] When I go to http://localhost:8000, I get “This site can’t be reached”. Same if I go to http://localhost:8080/. But… if I restart tomcat using the same command as above, except without the ‘jpda’ argument to Catalina.sh, then 8080 is started fine, but not 8000 (which Is to be expected). I checked to see if port 8000 is already busy by issueing this command: sudo lsof -iTCP -sTCP:LISTEN -n -P | grep 8000 But is shows no process listening on that port. And I know that this command works because when I successfully start tomcat without ‘jpda’, if I use this command to check for port 8080, I get: java 1925 desilets 60u IPv6 0xad510ad8630ef821 0t0 TCP *:8080 (LISTEN) Not sure what to try next… have pretty much run out of options at this point. Any help will be greatly appreciated. Thx. Alain Désilets National Research Council of Canad
Re: nginx + Tomcat 9
Hi, I installed and configured HAProxy as a basic proxy but I'm facing the same issues with my application war: -when I upload a file > 60k the upload fails (hangs) -websocket stops working after 30 seconds Maybe I need to tweak tomcat? Giacomo Da: "Harpreet Sandhu" A: "users" Inviato: Venerdì, 13 luglio 2018 16:33:03 Oggetto: 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: > -- Questo messaggio stato analizzato con Libra ESVA ed risultato non infetto. Seguire il link qui sotto per segnalarlo come spam: