Hello, this is my first post in this list. I'm not an expert so I apologize for any mistake in the description of the problem.
Scenario -> Hardware: SunFire V210 (sparc) -> OS: Solaris 9 -> Common daemons version: I'm using the JSVC source code included with Tomcat 5.0.16 release. Main problem: I compile jsvc source code following the indications in http://jakarta.apache.org/tomcat/tomcat-5.0-doc/setup.html without errors. I run jsvc with the following command $CATALINA_HOME/bin/jsvc -user tomcat -Djava.endorsed.dirs=$CATALINA_HOME/common/endorsed -cp $CATALINA_HOME/bin/bootstrap.jar -outfile /export/logs/tomcat/catalina.out -errfile /export/logs/tomcat/catalina.err -pidfile $CATALINA_HOME/bin/jsvc.pid org.apache.catalina.startup.Bootstrap The Tomcat server started and the user change is made. No problems here. The problem is in the shoutdown. When I kill the process with the command kill #process_number_in_jsvc.pid the server stops but if I have a look to the errfile (catalina.err) I see that in the last line "jsvc error: Service exit with a return value of 143". And the most important thing is that tomcat didn't stop correctly. When I have a look to tomcat's log there are no references to the shutdown, the last line is "INFO: Server startup in 8109 ms" (usually when you stop Tomcat without using JSVC there are always some lines in the log describing the shtdown process). I try to track the program with debug mode. I also add a print line after waitpid() in the parent process to know the status value before processing it with wstat macros. Here it is, I hope it can be helpful: $CATALINA_HOME/bin/jsvc -verbose -debug -jvm server -home /usr/local/java -user tomcat -Djava.endorsed.dirs=$CATALINA_HOME/common/endorsed -cp $CATALINA_HOME/bin/bootstrap.jar -outfile /export/logs/tomcat/catalina.out -errfile /export/logs/tomcat/catalina.err -pidfile $CATALINA_HOME/bin/jsvc.pid org.apache.catalina.startup.Bootstrap jsvc debug: +-- DUMPING PARSED COMMAND LINE ARGUMENTS -------------- jsvc debug: | Detach: True jsvc debug: | Show Version: No jsvc debug: | Show Help: No jsvc debug: | Check Only: Disabled jsvc debug: | Run as service: No jsvc debug: | Install service: No jsvc debug: | Remove service: No jsvc debug: | JVM Name: "server" jsvc debug: | Java Home: "/usr/local/java" jsvc debug: | PID File: "/usr/local/tomcat/bin/jsvc.pid" jsvc debug: | User Name: "tomcat" jsvc debug: | Extra Options: 3 jsvc debug: | "-verbose" jsvc debug: | "-Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed" jsvc debug: | "-Djava.class.path=/usr/local/tomcat/bin/bootstrap.jar" jsvc debug: | Class Invoked: "org.apache.catalina.startup.Bootstrap" jsvc debug: | Class Arguments: 0 jsvc debug: +------------------------------------------------------- jsvc debug: user changed to 'tomcat' jsvc debug: User 'tomcat' validated jsvc debug: Attempting to locate Java Home in /usr/local/java jsvc debug: Attempting to locate VM configuration file /usr/local/java/jre/lib/jvm.cfg jsvc debug: Found VM configuration file at /usr/local/java/jre/lib/jvm.cfg jsvc debug: Found VM client definition in configuration jsvc debug: Checking library /usr/local/java/jre/lib/sparc/client/libjvm.so jsvc debug: Found VM hotspot definition in configuration jsvc debug: Checking library /usr/local/java/jre/lib/sparc/hotspot/libjvm.so jsvc debug: Checking library /usr/local/java/lib/sparc/hotspot/libjvm.so jsvc debug: Cannot locate library for VM hotspot (skipping) jsvc debug: Found VM server definition in configuration jsvc debug: Checking library /usr/local/java/jre/lib/sparc/server/libjvm.so jsvc debug: Found VM classic definition in configuration jsvc debug: Checking library /usr/local/java/jre/lib/sparc/classic/libjvm.so jsvc debug: Checking library /usr/local/java/lib/sparc/classic/libjvm.so jsvc debug: Cannot locate library for VM classic (skipping) jsvc debug: Java Home located in /usr/local/java jsvc debug: +-- DUMPING JAVA HOME STRUCTURE ------------------------ jsvc debug: | Java Home: "/usr/local/java" jsvc debug: | Java VM Config.: "/usr/local/java/jre/lib/jvm.cfg" jsvc debug: | Found JVMs: 2 jsvc debug: | JVM Name: "client" jsvc debug: | "/usr/local/java/jre/lib/sparc/client/libjvm.so" jsvc debug: | JVM Name: "server" jsvc debug: | "/usr/local/java/jre/lib/sparc/server/libjvm.so" jsvc debug: +------------------------------------------------------- [EMAIL PROTECTED]:/usr/local/tomcat/bin# more jsvc.pid 16253 [EMAIL PROTECTED]:/usr/local/tomcat/bin# kill 16253 [EMAIL PROTECTED]:/usr/local/tomcat/bin# more /export/logs/tomcat/catalina.err jsvc debug: Using specific JVM in /usr/local/java/jre/lib/sparc/server/libjvm.so jsvc debug: Attemtping to load library /usr/local/java/jre/lib/sparc/server/libjvm.so jsvc debug: JVM library /usr/local/java/jre/lib/sparc/server/libjvm.so loaded jsvc debug: JVM library entry point found (0xFEEE6F5C) jsvc debug: +-- DUMPING JAVA VM CREATION ARGUMENTS ----------------- jsvc debug: | Version: 10002 jsvc debug: | Ignore Unrecognized Arguments: False jsvc debug: | Extra options: 3 jsvc debug: | "-verbose" (0x00000000) jsvc debug: | "-Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed" (0x00000000) jsvc debug: | "-Djava.class.path=/usr/local/tomcat/bin/bootstrap.jar" (0x00000000) jsvc debug: +------------------------------------------------------- jsvc debug: Java VM created successfully jsvc debug: Class org/apache/commons/daemon/support/DaemonLoader found jsvc debug: Native methods registered jsvc debug: Checking daemon jsvc debug: Daemon checked successfully jsvc debug: Daemon loaded successfully jsvc debug: user changed to 'tomcat' jsvc debug: Daemon started successfully jsvc debug: Waiting for a signal to be delivered jsvc debug: Caught SIGTERM: Scheduling a shutdown jsvc debug: Shutdown or reload requested: exiting jsvc error: STATUS VALUE AFTER waitpid: 36608 jsvc error: Service exit with a return value of 143 [EMAIL PROTECTED]:/usr/local/tomcat/bin# Other problems: I have found also other minor problems: -> I have the same core dump problem with jsvc -help that was describe in http://www.mail-archive.com/[EMAIL PROTECTED]/msg05127.html I solve it creating a jvm.cfg file with this content: [EMAIL PROTECTED]:/usr/local/java/jre/lib# more jvm.cfg # # @(#)jvm.cfg 1.10 00/08/01 # # Copyright 1999 by Sun Microsystems, Inc., # 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. # All rights reserved. # # List of JVMs that can be used as the first option to java, javac, etc. # Order is important -- first in this list is the default JVM. # -client -hotspot -server -classic The good point is that 1.3 and 1.4 Jvm.cfg files are in different places so you can have both at the same time. -> I get also a core dump is I use the debug option alone. Example, this command fails: [EMAIL PROTECTED]:/usr/local/tomcat/bin# $CATALINA_HOME/bin/jsvc -debug -user tomcat -Djava.endorsed.dirs=$CATALINA_HOME/common/endorsed -cp $CATALINA_HOME/bin/bootstrap.jar -outfile /export/logs/tomcat/catalina.out -errfile /export/logs/tomcat/catalina.err -pidfile $CATALINA_HOME/bin/jsvc.pid org.apache.catalina.startup.Bootstrap jsvc debug: +-- DUMPING PARSED COMMAND LINE ARGUMENTS -------------- jsvc debug: | Detach: True jsvc debug: | Show Version: No jsvc debug: | Show Help: No jsvc debug: | Check Only: Disabled jsvc debug: | Run as service: No jsvc debug: | Install service: No jsvc debug: | Remove service: No jsvc debug: | JVM Name: "Error de segmentaci�n (se ha creado un `core') The last line means "Segmentation fault, core dumped in Spanish. If I use the -jvm and the -home options I don't get that core dump. I think there is some probblem in the arguments parssing, perhaps in the optional() function. Sorry for this long e-mail, but I think that the debug information was necessary. Ignacio Javier Clerigo Vecino --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
