0

So I am having an issue with Tomcat7 on centos/rhel On this server we have 2 tomcat instances and to separate them we bind the HTTP and HTTPS connectors to an IP address. What seems to be happening on a server reboot is the connectors do not initialize because they cannot bind to the IP address. My working theory at this point is because the networking service has not come up all the way and the IP's are not available.

The networking init script has a startup priority of 10 the tomcat init scripts have a startup priority of 70

Also we used this same kind of configuration with tomcat 5 but instead of using init script we just linked the catalina.sh file to /etc/rc3.d/S99tomcat to start the tomcat instances. We did not have this issue with that configuration, but we would like to stick with the init scripts.

Here is an example of the tomcat HTTPS connector

<Connector port="443" address="128.1.2.150" maxHttpHeaderSize="65536"
        maxThreads="150" minSpareThreads="25"
                compression="on"
                compressionMinSize="2048"
                noCompressionUserAgents="gozilla,traviata"
                compressableMimeType="text/html,text/xml"
        enableLookups="false" disableUploadTimeout="true"
        keystoreFile="/usr/local/tomcat/ssl/keystore2015"
        keystorePass="tech1994"
         SSLEnabled="true"
        acceptCount="100" scheme="https" secure="true"
    clientAuth="false" sslProtocol="TLS"/>

Here is the top of the init script with the chkconfig settings

# Tomcat 7 start/stop/status init.d script
# Initially forked from: https://gist.github.com/valotas/1000094
# @author: Miglen Evlogiev <bash@miglen.com>
#
# Release updates:
# Updated method for gathering pid of the current proccess
# Added usage of CATALINA_BASE
# Added coloring and additional status
# Added check for existence of the tomcat user
# Added termination proccess
#chkconfig: 234 70 80

So I tested out adding the following to the script

#Required-Start: $network

This did not work. I did a service network stop. Then started tomcat and it still came up. Anyone have some other ideas?

Deldran
  • 11
  • 3

0 Answers0