Java at startup

From: Dave Stewart (dstewart@AQUAFLO.COM)
Date: Mon Oct 20 2003 - 20:30:08 EDT


Hi List!

Be nice to me, I'm new to the list and to AIX as well. ;-)

I have a e-commerce application server written in Java, which is
deployed on one of our AIX servers. I created a startup script for it,
which simply uses a 1.3 JRE to start the app (instead of using the
still installed 1.1.8 version of Java). I can run this script manually
from the command line without troubles.

What I want to do is have the machine start this app for me
automagically when the machine is booted and (if possible) have it
restart the app if it becomes unresponsive. I thought if I put the
command to run the app in the inittab file (using mkitab), that would
do the trick, since I think that is the last stage of the boot process.
Unfortunately, it's not working. The line in the inittab file looks
like this (it's the last line in the inittab file):

dsjavawsdaemon:2:respawn:/u/dave/startWebServices
>/u/dave/jwsdaemonerror.log 2>&1

I've been having trouble even discerning what it's trouble is, but it
looks like it's stumbling on the manifest file in the .jar itself (the
last lines in the jwsdaemonerror.log file reads: "FFailed to load
Main-Class manifest attribute from
FactsWSJServer.jar"). Why this would cause a problem is beyond me (I
can run the script manually and it will work, just inittab seems to
have trouble with it) and why I'm begging you for input (any input
would be appreciated!).

Note that I typically can see a zombie process on the machine after the
failure (it goes away, then comes back. Nice Halloween trick when the
dead keeps rising from the grave! This behavior seems obvious to me
though, since the process isn't started successfully the system keeps
trying to respawn it.)

Particulars:
Machine: IBM RS 6000 Model E20
OS: AIX 4.3.3
Java: JRE 1.3.1 (from Sun)

FYI, the startup script file looks like this (I've tried it with and
without the "exec", it doesn't seem to matter either way.):

> #!/bin/sh
>
> exec /u/dave/jre131/jre/bin/java -verbose -jar FactsWSJServer.jar &
> ps | grep "java"

Dave Stewart
Aqua-flo Supply (Goleta)
dstewart@aquaflo.com

No trees were harmed during the production of this email,
but a large number of electrons were terribly inconvenienced....



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:17:17 EDT