Name: nt126004 Date: 11/20/2001
java version "1.4.0-beta3"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta3-b84)
Java HotSpot(TM) Client VM (build 1.4.0-beta3-b84, mixed mode)
- su
- start terminal session on Unix
- start the rmid daemon by executing:
nohup /opt/jdk1.4.0/bin/rmid -J-Djava.security.policy=/etc/inet/rmid.policy -log /var/log/rmid > /var/log/rmid.log 2>&1 &
- close terminal
- start another terminal and check if the rmid daemon is still running, which
it isn't
This behaviour I've seen before when adding a shutdown hook to the JVM, in that
case the signal mask seems to be changed (bugid #4412451). This bug has not
been resolved since reporting in feb. by us.
I figured it out, when doing the test above you should execute the
command as root user. The activation deamon seems to run fine with other
users.
The best way to test (closing shells seems to take a few seconds
sometimes) is to tail the log file you generate.
start terminal as root
nohup rmid -J-Djava.security.policy=mypolicy.policy -log /tmp/rmid >/tmp/rmid.log 2>&1 &
ps -ef | grep rmid (shows rmid)
tail -f /tmp/rmid.log
Ctrl C
ps -ef | grep rmid (rmid gone)
I can remember this problem with signal masks for root user happened to
crash our banking application at our customers site when tailing log
files, but that had to do with registering a shutdown handler in JDK 1.3.0
Some extra information with regard to this problem. Why I thought non
root users also had problems with the activation deamon being killed was
because we have a /etc/init.d/rmid script that can be used by all
developers and is executed at boor time of our server.
the actual command was:
#!/bin/sh
# Start/stop RMI activation deamon
JAVA="/opt/jdk1.4.0"
LOGDIR="/var/log/rmid"
case "$1" in
'start')
su - diva -c "nohup ${JAVA}/bin/rmid
-J-Djava.security.policy=/etc/inet/rmid.policy -l
og ${LOGDIR} > /var/log/rmid.log 2>&1 &"
;;
This requires every person executing /etc/init.d/rmid to log in as the
diva user (our general purpose user) by supplying the password. However
when root executes this script it doesn't have to log in as diva user,
handy during reboot :-)
When executing this script as root user, the deamon will be killed with
tail -f or a kill of the shell.
Today I also noticed at work with a JDK 1.3.0 rmid and a JDK 1.4.0
activatable (Jini) service (reggie e.g.) a tail -f on the rmid log
resulted in a kill of the reggie service and a restart by the activation
deamon, very weird. i noticed this because the pid changed of reggie, we
sometimes encounterd some strange behaviour, but now we know why. I have
to test this a few times more because I can't reproduce it now, but it
seems there are some strange things going on (depending on the user
executing a command) that consume a lot of time to track down :-(
(Review ID: 134731)
======================================================================
- duplicates
-
JDK-4412451 Shutdown Hook called when nohup is used to launch process
-
- Closed
-