Chris, >After Tomcat is started, can you run this command on >the server running both httpd and Tomcat?
>$ sudo netstat -plan | grep 8009 The problem is my prod server (centos 5), so I will switch back to 8.5.9 and when it hangs I can run the command. Also I do have a backup server (centos 7) which I will also update to 8.5.9 and see if I get the same issue which will allow more testing also. Cheers. Greg On 20 December 2016 at 14:10, Christopher Schultz < ch...@christopherschultz.net> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > Greg, > > On 12/20/16 3:21 AM, Greg Huber wrote: > >> If you are using httpd + mod_jk, why are you bothering with APR > >> and tcnative on the Tomcat side? > > > > It complains in the log file so I do what it says. If I don't need > > it it saves me having to compile it all the time. > > You get complaints about the APR library not being installed? Yeah, > just comment-out the APRLifecycleListener in conf/server.xml. > > >> What if you use the NIO connector instead of APR? > > > > Have always run tomcat with apache and mod_jk has always worked. I > > could look at NIO if all else fails. > > No matter what kind of protocol you use (HTTP, AJP13), you can still > choose the I/O strategy (APR, NIO, NIO2). The pure-Java blocking I/O > connector (BIO) was removed in 8.5.x and 9.0.x, so that's no longer an > option. > > >> Can you post your <Connector> configuration? > > > > I do not modify anything here. > > > > My setup: > > > > workers.properties: > > > > worker.list=worker1 worker.worker1.type=ajp13 > > worker.worker1.host=localhost worker.worker1.port=8009 > > worker.worker1.lbfactor=50 worker.worker1.socket_keepalive=1 > > > > tomcat.conf > > > > ... JkWorkersFile "/etc/httpd/conf.d/workers.properties" # Set the > > log file JkLogFile "/etc/httpd/logs/mod_jk.log" JkShmFile > > "/etc/httpd/logs/jk-runtime-status.log" JkLogLevel info > > JkLogStampFormat "[%a %b %d %H:%M:%S %Y]" .... <VirtualHost *:80> > > ... JkMount / worker1 JkMount /* worker1 </VirtualHost> > > That looks okay to me, though it doesn't look like you actually need > httpd in the mix, here. I'll just assume that you are fronting Tomcat > for a good reason and not "because that's how it's supposed to be done." > > > setenv.sh : > > > > export CATALINA_OPTS="$CATALINA_OPTS -Xms256m" export > > CATALINA_OPTS="$CATALINA_OPTS -Xmx768m" > > Off-topic hint: if you are going to give your JVM 768M, you may as > well do it all at once and set -Xms == -Xmx. > > > export CATALINA_OPTS="$CATALINA_OPTS -Xss256k" > > > > export CATALINA_OPTS="$CATALINA_OPTS -XX:+UseParallelGC" > > > > export CATALINA_OPTS="$CATALINA_OPTS -XX:MaxGCPauseMillis=1500" > > > > export CATALINA_OPTS="$CATALINA_OPTS -XX:GCTimeRatio=9" > > > > export CATALINA_OPTS="$CATALINA_OPTS -server" > > > > export CATALINA_OPTS="$CATALINA_OPTS -XX:+DisableExplicitGC" > > > > > > Not sure where these exports came from but they seem to work up to > > 8.5.x > > They control the JVM, not Tomcat. If you are administering this Tomcat > instance, I urge you to learn more about what they do. Mysteries don't > help administrators do their jobs. > > > The last start/stop catalina.out : > > > > 17-Dec-2016 15:21:51.022 INFO [main] > > org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded > > APR based Apache Tomcat Native library 1.2.10 using APR version > > 1.5.2. 17-Dec-2016 15:21:51.022 INFO [main] > > org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR > > capabilities: IPv6 [true], sendfile [true], accept filters [false], > > random [true]. 17-Dec-2016 15:21:51.023 INFO [main] > > org.apache.catalina.core.AprLifecycleListener.lifecycleEvent > > APR/OpenSSL configuration: useAprConnector [false], useOpenSSL > > [true] 17-Dec-2016 15:21:51.036 INFO [main] > > org.apache.catalina.core.AprLifecycleListener.initializeSSL > > OpenSSL successfully initialized (OpenSSL 1.0.2j 26 Sep 2016) > > 17-Dec-2016 15:21:52.967 INFO [main] > > org.apache.coyote.AbstractProtocol.init Initializing > > ProtocolHandler ["http-nio-8080"] 17-Dec-2016 15:21:53.124 INFO > > [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector > > Using a shared selector for servlet write/read 17-Dec-2016 > > 15:21:53.160 INFO [main] org.apache.coyote.AbstractProtocol.init > > Initializing ProtocolHandler ["ajp-nio-8009"] > > So, you've got an HTTP connector on port 8080 and an AJP connector on > port 8009. You aren't using TLS at all, so you can definitely let the > APR LifecycleListener go and stop re-compiling libtcnative for each > release. It looks like you also aren't using your connector on port > 8080, so you can disable that, too. You likely have JVM threads that > are sitting idle all the time. > > Oh, and you're already using NIO. :) > > > 17-Dec-2016 15:23:08.320 INFO [main] > > org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler > > [http-nio-8080] 17-Dec-2016 15:23:08.341 INFO [main] > > org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler > > [ajp-nio-8009] > > Looks like these guys started-up okay. > > > 17-Dec-2016 15:23:08.342 INFO [main] > > org.apache.catalina.startup.Catalina.start Server startup in 75173 > > ms > > Okay. > > > 17-Dec-2016 15:59:45.589 INFO [Thread-7] > > org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler > > ["http-nio-8080"] 17-Dec-2016 15:59:45.805 INFO [Thread-7] > > org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler > > ["ajp-nio-8009"] > > A few minutes later, you stop the server. > > I don't see any problems, here, except that you are saying you are > getting connection failures. > > After Tomcat is started, can you run this command on the server > running both httpd and Tomcat? > > $ sudo netstat -plan | grep 8009 > > - -chris > -----BEGIN PGP SIGNATURE----- > Comment: GPGTools - http://gpgtools.org > Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ > > iQIcBAEBCAAGBQJYWTvjAAoJEBzwKT+lPKRYTP8P/Rw7FhZ6mQEm8JRibfUdEWA3 > qg9gD+2ueIFXkvxfrhIQy1/xfPpmnDIB+X89pSZo+gq9hk9uxPJgneZKGW/K4qD8 > sICqi/S6mcEQOGHUYHwdTE9p0lFQwoijZ6O9ViWqcbgTndoYuDCWSNp+3ZMOCeYS > IFOZbeUlJyLtMOv1aGnP3LSpi38yHUTLRhBd2/kf5C47+C8iwggN1z6yIRS+vIVb > odzI1RR5hPxG4Sy6VNRusiyPowBsMtQ7U0EUdU2abW9X8FD0h8XYx6Qg1NCRUfIU > R5OM0SFDu52zbNy1fweZ5P3yW7sOHQ6ocVnrENPoCjJnW05rR8PoGmtKEqDMZJf4 > mgbNnB2zb/Eu+RfQaeqjnOB7ch0BxHJE78GfRQSPJ78F+DVHxFCpYNuSA5R+16vE > aj/sQMPFf/G2r1GDqgGykxVkkQqBBfPcpGDVbVIHQ2sUiNwW4zya1o3jV2lHNjFd > tqnDZg1UWuljBLL/Cm273ueja0t50KCLAr88ZsmFiVCUOktmgjBYzT+pRDCkeLha > s8c2Zc1dRr3Qh9ve/LBwVydMO8ZtFw2fGAejSvhhukXbuUNPeMw1PN4pSPRQpgbL > NHna5qiziTzXn8yrfJihM2fgontqqP5MtPo0v6JbRhyAcgy8boCz+0llnjxVxBfN > eLQxC/coibB4KP0ZhsH5 > =LR38 > -----END PGP SIGNATURE----- > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >