-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 7/24/2015 12:59 AM, Robert Jacobs wrote:
> 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.2
4//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.
> 

A couple of quick notes, although it's early and I may be barking up
the wrong tree.

In your init.d script for restart, I don't see any wait time between
the start and stop commands. Does daemon.sh stop return immediately,
or does it not return until the Tomcat (jsvc) process is stopped?

In your systemd script, I didn't see the following line under [Unit]:

After=syslog.target network.target

You may not need syslog.target, but I would suspect that you need
network.target.

. . . just my (1 AM) 2 cents
/mde/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBAgAGBQJVsfQbAAoJEEFGbsYNeTwtRDoH/RJidKt4psPDe+mIzoKLclwK
YxlE8JWLfb55+OWRukLjzp42n5CMzmw7jujQOgzJxb8XyP9pEYokKG1OdG1+Mubn
b5JaZg/G0N6KHn7tzhwPD6CGs9lmnJhR7NKgu3K8ZYbu3Fjxi7OVEYf4G9F9VXIk
x91P2C6n2Ky88XnHA0gVHfPZw4D+xRKxsw7dx4BAIhnmt2NfH/ea8Jdw7fzgHnSh
fI1XpbtzNVkMrLvby07i784zzRaSa9JZjwuSF+nA+AuGMmb63wJf2TDoDMnKq5aP
8TFAsvUr8zGZNdz0QkdXElwHkzpDaOn9mj5ZHBJb9pu9v+B2f4N/9V/Rn0jnVt4=
=FB1d
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to