Hello,
We are having problems getting tomcat to work with JSVC on RHEL 7.1 (maipo).
We found out that Tomcat restarts do not always result in expected
behaviour. The pattern of this unexpected behavior (Service exit with a
return value of 143) is random. This random pattern might depend on the
deploy-time of Tomcat during startup.
The problem might lay within the daemon functionality using JSVC.
We have tried this one two machines;
- Fedora 20 desktop -> everything works fine
- RHEL 7.1 virtual machine -> random fails
Tried versions of tomcat 8 include 18 and 24.
We did see other people with this exact problem and error code, but these
problems existed for tomcat 5 to 7.
We could not find information regarding tomcat 8 yet.
Our findings are as follows:
systemctl start tomcat fail (143)
systemctl stop tomcat fail (143)
systemctl restart tomcat fail (143)
etc/init.d/tomcat start pass
etc/init.d/tomcat stop pass
etc/init.d/tomcat restart fail (143)(note: combined stop/start)
CATALINA_HOME/bin/daemon.sh start pass
CATALINA_HOME/bin/daemon.sh stop pass
General note for all stop commands: Every time this "Server startup" is
not finished, each stop command results in the 143 exit.
The two methods of starting tomcat: init.d and systemctl are:
###########init.d############
#!/bin/bash
CATALINA_HOME="/opt/apache-tomcat/apache-tomcat-8.0.24"
start() {
sh $CATALINA_HOME/bin/daemon.sh start
}
stop() {
sh $CATALINA_HOME/bin/daemon.sh stop
}
case $1 in
start|stop) $1;;
restart) stop; start;;
*) echo "Run as $0 <start|stop|restart>"; exit 1;;
esac
###########end of init.d############
###########systemctl############
[Unit]
Description=Apache Tomcat Server
[Install]
WantedBy=multi-user.target
[Service]
Type=oneshot
ExecStart=/opt/apache-tomcat/apache-tomcat-8.0.24/bin/daemon.sh start
ExecStop=/opt/apache-tomcat/apache-tomcat-8.0.24/bin/daemon.sh stop
User=adsswebserver
Group=adsswebserver
###########end of systemctl############
Server version: Apache Tomcat/8.0.24
Server built: Jul 1 2015 20:19:55 UTC
Server number: 8.0.24.0
OS Name: Linux
OS Version: 3.10.0-229.7.2.el7.x86_64
Architecture: amd64
Java Home: /usr/java/jdk1.8.0_20/jre
JVM Version: 1.8.0_20-b26
JVM Vendor: Oracle Corporation
CATALINA_BASE: /opt/apache-tomcat/apache-tomcat-8.0.24
CATALINA_HOME: /opt/apache-tomcat/apache-tomcat-8.0.24
Command line argument:
-Djava.util.logging.config.file=/opt/apache-tomcat/apache-tomcat-8.0.24//conf/logging.properties
Command line argument:
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
Command line argument: -Djava.endorsed.dirs=
Command line argument:
-Dcatalina.base=/opt/apache-tomcat/apache-tomcat-8.0.24/
Command line argument:
-Dcatalina.home=/opt/apache-tomcat/apache-tomcat-8.0.24
Command line argument:
-Djava.io.tmpdir=/opt/apache-tomcat/apache-tomcat-8.0.24//temp
Command line argument: -Dcommons.daemon.process.id=13312
Command line argument: -Dcommons.daemon.process.parent=13311
Command line argument: -Dcommons.daemon.version=1.0.15-dev
Command line argument: abort
Any advice would be appreciated.
--
With kind regards,
Robert Jacobs