RE: Any procrun gurus here?
Jeff, There's no XML interface, but you can put the options in environment variables individually or use the procrun manager to enter them instead. Source code to procrun is in the jakarta commons-daemon project. Best regards Robert Longson -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 15 September 2005 23:30 To: tomcat-user@jakarta.apache.org Subject: Any procrun gurus here? Aha! The *3* dashes before Classpath were the major culprit. (Is there any way to specify all of these parameters via an XML file?) Now it's running my main(), but the service exits immediately, apparently because my main doesn't do anything. I guess I'll go take another look at what Tomcat's Bootstrap.java does. -Jeff - Forwarded by J. Jeff Roberts/Lex/Lexmark on 09/15/2005 06:29 PM - |-+ | | J. Jeff Roberts | | || | | 09/15/2005 04:53 | | | PM | | || |-+ --| | | | To: tomcat-user@jakarta.apache.org | | cc: | | Subject: Any procrun gurus here? | --| Pardon the cross-post, but I was hoping there might be some procrun knowledge on this list. Thanks, -Jeff - Forwarded by J. Jeff Roberts/Lex/Lexmark on 09/15/2005 04:52 PM - |-+ | | J. Jeff Roberts | | || | | 09/15/2005 04:52 | | | PM | | || |-+ --| | | | To: commons-user@jakarta.apache.org | | cc: | | Subject: [daemon] Crash (now just an error) on service Start - does this look familiar? | --| OK, here's more information, in hopes that more detail will help narrow down what I'm missing. When I start Tomcat myself with Tomcat5.exe, I pass these parameters: tomcat5.exe //IS//Tomcat5 --Startup=auto --DisplayName=Lexmark Solutions Application Server --Jvm=C:\Program Files\Lexmark\Solutions\jre\bin\client\jvm.dll --JvmOptions=-Dcatalina.home=C:\Program Files\Lexmark\Solutions\tomcat;-Djava.endorsed.dirs=C:\Program Files\Lexmark\Solutions\tomcat\common\endorsed;-Djava.io.tmpdir=C:\Program Files\Lexmark\Solutions\tomcat\temp;-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager --Classpath=C:\Program Files\Lexmark\Solutions\tomcat\bin\bootstrap.jar --JvmMs=512 --JvmMx=512 --StdError=auto --StdOutput=auto --LogPath=C:\Program Files\Lexmark\Solutions\tomcat\logs --StartMode=jvm --StartClass=org.apache.catalina.startup.Bootstrap --StartParams=start --StopMode=jvm --StopClass=org.apache.catalina.startup.Bootstrap --StopParams=stop --Install=C:\Program Files\Lexmark\Solutions\tomcat\bin\tomcat5.exe Now I'm trying to wrap my own service. At first I was getting an Access Violation when I started the service. Then I went and got Bootstrap.java from the Tomcat source distribution, pared it down the bare minimum and copied it into our build so that it's at the classpath below when I run the following command line. procrun //IS//BootStrap --Startup=auto --LogLevel=debug --DisplayName=BootStrap --Jvm=C:\Program Files\Lexmark\Solutions\jre\bin\client\jvm.dll ---Classpath=C:\Program Files
Any procrun gurus here?
Pardon the cross-post, but I was hoping there might be some procrun knowledge on this list. Thanks, -Jeff - Forwarded by J. Jeff Roberts/Lex/Lexmark on 09/15/2005 04:52 PM - |-+ | | J. Jeff Roberts | | || | | 09/15/2005 04:52 | | | PM | | || |-+ --| | | | To: commons-user@jakarta.apache.org | | cc: | | Subject: [daemon] Crash (now just an error) on service Start - does this look familiar? | --| OK, here's more information, in hopes that more detail will help narrow down what I'm missing. When I start Tomcat myself with Tomcat5.exe, I pass these parameters: tomcat5.exe //IS//Tomcat5 --Startup=auto --DisplayName=Lexmark Solutions Application Server --Jvm=C:\Program Files\Lexmark\Solutions\jre\bin\client\jvm.dll --JvmOptions=-Dcatalina.home=C:\Program Files\Lexmark\Solutions\tomcat;-Djava.endorsed.dirs=C:\Program Files\Lexmark\Solutions\tomcat\common\endorsed;-Djava.io.tmpdir=C:\Program Files\Lexmark\Solutions\tomcat\temp;-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager --Classpath=C:\Program Files\Lexmark\Solutions\tomcat\bin\bootstrap.jar --JvmMs=512 --JvmMx=512 --StdError=auto --StdOutput=auto --LogPath=C:\Program Files\Lexmark\Solutions\tomcat\logs --StartMode=jvm --StartClass=org.apache.catalina.startup.Bootstrap --StartParams=start --StopMode=jvm --StopClass=org.apache.catalina.startup.Bootstrap --StopParams=stop --Install=C:\Program Files\Lexmark\Solutions\tomcat\bin\tomcat5.exe Now I'm trying to wrap my own service. At first I was getting an Access Violation when I started the service. Then I went and got Bootstrap.java from the Tomcat source distribution, pared it down the bare minimum and copied it into our build so that it's at the classpath below when I run the following command line. procrun //IS//BootStrap --Startup=auto --LogLevel=debug --DisplayName=BootStrap --Jvm=C:\Program Files\Lexmark\Solutions\jre\bin\client\jvm.dll ---Classpath=C:\Program Files\Lexmark\Solutions\ApacheAgent\lib\log4j.properties;C:\Program Files\Lexmark\Solutions\ApacheAgent\lib\framework-1.0.jar;C:\Program Files\Lexmark\Solutions\ApacheAgent\lib\log4j-1.2.8.jar;.; --JvmMs=512 --JvmMx=512 --StdError=auto --StdOutput=auto --LogPath=C:\Program Files\Lexmark\Solutions\ApacheAgent\logs --StartMode=jvm --StartClass=com.lexmark.workflow.framework.tools.Bootstrap --StartParams=start --StopMode=jvm --StopClass=com.lexmark.workflow.framework.tools.Bootstrap --StopParams=stop --Install=C:\Program Files\Lexmark\Solutions\ApacheAgent\procrun.exe Now I don't crash when I try to start the service, but I this message pops up when I try to start it from the Services applet: Windows could not start the BootStrap on Local Computer. For more information, review the System Event Log. If this is a non-Microsoft service, contact the service vendor, and refer to service-specific error code 0. My jakarta_service_20050915.log contains these lines after I try to start the service: [2005-09-15 16:47:12] [1204 prunsrv.c] [debug] Procrun log initialized [2005-09-15 16:47:12] [info] Running Service... [2005-09-15 16:47:12] [1047 prunsrv.c] [debug] Inside ServiceMain... [2005-09-15 16:47:12] [info] Starting service... [2005-09-15 16:47:12] [408 javajni.c] [debug] Jvm Option[0] -Xrs [2005-09-15 16:47:12] [408 javajni.c] [debug] Jvm Option[1] -Djava.class.path= [2005-09-15 16:47:12] [408 javajni.c] [debug] Jvm Option[2] vfprintf [2005-09-15 16:47:12] [408 javajni.c] [debug] Jvm Option[3] -Xms512m [2005-09-15 16:47:12] [408 javajni.c] [debug] Jvm Option[4] -Xmx512m [2005-09-15 16:47:12] [466 javajni.c] [error] FindClass com/lexmark/workflow/fr amework/tools/Bootstrap failed [2005-09-15 16:47:12] [908 prunsrv.c] [error] Failed loading main com/lexmark/w orkflow/framework/tools/Bootstrap class [2005-09-15 16:47:12] [1131 prunsrv.c] [error] ServiceStart returned 3 [2005-09-15 16:47:12] [info] Run
Any procrun gurus here?
Aha! The *3* dashes before Classpath were the major culprit. (Is there any way to specify all of these parameters via an XML file?) Now it's running my main(), but the service exits immediately, apparently because my main doesn't do anything. I guess I'll go take another look at what Tomcat's Bootstrap.java does. -Jeff - Forwarded by J. Jeff Roberts/Lex/Lexmark on 09/15/2005 06:29 PM - |-+ | | J. Jeff Roberts | | || | | 09/15/2005 04:53 | | | PM | | || |-+ --| | | | To: tomcat-user@jakarta.apache.org | | cc: | | Subject: Any procrun gurus here? | --| Pardon the cross-post, but I was hoping there might be some procrun knowledge on this list. Thanks, -Jeff - Forwarded by J. Jeff Roberts/Lex/Lexmark on 09/15/2005 04:52 PM - |-+ | | J. Jeff Roberts | | || | | 09/15/2005 04:52 | | | PM | | || |-+ --| | | | To: commons-user@jakarta.apache.org | | cc: | | Subject: [daemon] Crash (now just an error) on service Start - does this look familiar? | --| OK, here's more information, in hopes that more detail will help narrow down what I'm missing. When I start Tomcat myself with Tomcat5.exe, I pass these parameters: tomcat5.exe //IS//Tomcat5 --Startup=auto --DisplayName=Lexmark Solutions Application Server --Jvm=C:\Program Files\Lexmark\Solutions\jre\bin\client\jvm.dll --JvmOptions=-Dcatalina.home=C:\Program Files\Lexmark\Solutions\tomcat;-Djava.endorsed.dirs=C:\Program Files\Lexmark\Solutions\tomcat\common\endorsed;-Djava.io.tmpdir=C:\Program Files\Lexmark\Solutions\tomcat\temp;-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager --Classpath=C:\Program Files\Lexmark\Solutions\tomcat\bin\bootstrap.jar --JvmMs=512 --JvmMx=512 --StdError=auto --StdOutput=auto --LogPath=C:\Program Files\Lexmark\Solutions\tomcat\logs --StartMode=jvm --StartClass=org.apache.catalina.startup.Bootstrap --StartParams=start --StopMode=jvm --StopClass=org.apache.catalina.startup.Bootstrap --StopParams=stop --Install=C:\Program Files\Lexmark\Solutions\tomcat\bin\tomcat5.exe Now I'm trying to wrap my own service. At first I was getting an Access Violation when I started the service. Then I went and got Bootstrap.java from the Tomcat source distribution, pared it down the bare minimum and copied it into our build so that it's at the classpath below when I run the following command line. procrun //IS//BootStrap --Startup=auto --LogLevel=debug --DisplayName=BootStrap --Jvm=C:\Program Files\Lexmark\Solutions\jre\bin\client\jvm.dll ---Classpath=C:\Program Files\Lexmark\Solutions\ApacheAgent\lib\log4j.properties;C:\Program Files\Lexmark\Solutions\ApacheAgent\lib\framework-1.0.jar;C:\Program Files\Lexmark\Solutions\ApacheAgent\lib\log4j-1.2.8.jar;.; --JvmMs=512 --JvmMx=512 --StdError=auto --StdOutput=auto --LogPath=C:\Program Files\Lexmark\Solutions\ApacheAgent\logs --StartMode=jvm --StartClass=com.lexmark.workflow.framework.tools.Bootstrap --StartParams=start