|
From: Leif M. <le...@ta...> - 2005-12-06 05:59:01
|
Alec,
From your wrapper.log, it looks like you have implemented the
WrapperListener
in your QuentinWrapper class and are using integration method #3. The
problem is that
your WrapperListener.start method is not implemented correctly. It is
critical that that
method return null or an Integer exit code within a short period of
time. If your
application has a main loop then it must be started in a background thread.
You can do this easily by simply starting the thread and returning,
but a
"more correct" way to it is to have your WrapperListener.start method
start the
main thread and then wait until it has entered a valid running state.
This gives your
application the chance to return an error code if there are any startup
failures.
By failing on startup instead of exiting later with an error, the
Windows service
will fail as it is starting rather than stopping after having been
started. This can
make a big difference if your service is required by other services.
Cheers,
Leif
Ale...@Qu... wrote:
> Hello again,
>
> I have managed to get my App to start up and run under the Java Service
> Wrapper. It starts up very nicely, and I can see that it is running: it
> outputs to a log file and provides HTTP access to its internal "console".
> However, after 30 seconds the Java wrapper decides that it is not
> responding to pings and forcibly terminates it. I have tried setting
> wrapper.request_thread_dump_on_failed_jvm_exit=TRUE to see whether any
> threads are tangled inside the system, but unfortunately there are too
> many threads running and the thread dump has not completed before the
> Wrapper terminates the JVM, cutting the thread dump off in mid flow.
>
> During the 30 seconds that the App is not responding to pings, CPU load
> settles down to 0 about 5 seconds after startup is completed, so that I
> know the ping is not being locked out by CPU overload.
>
> Can anybody suggest where I should look for the missing ping?
>
> Log from a single failed run is listed below.
>
> Alec Cawley
>
>
> STATUS | wrapper | 2005/12/01 14:12:31 | --> Wrapper Started as Console
> DEBUG | wrapper | 2005/12/01 14:12:31 | Using system timer.
> DEBUG | wrapperp | 2005/12/01 14:12:31 | server listening on port 32000.
> STATUS | wrapper | 2005/12/01 14:12:31 | Launching a JVM...
> DEBUG | wrapper | 2005/12/01 14:12:31 | command:
> "c:\j2sdk1.4.2_08\bin\java" -Xms128m -Xmx512m
> -Djava.library.path="F:\\dlls" -classpath
> "F:\\QuentinManager.jar;F:\\jars\wrapper-3.1.2.jar;F:\\jars\jacorb.jar;F:\\jars\mysql-connector-java-3.1.8-bin.jar;F:\\jars\jug-1.1.2.jar;F:\\jars\avalon-framework-4.1.5.jar;F:\\jars\logkit-1.2.jar"
> -Dwrapper.key="IcYMfSZTqNdo3jtq" -Dwrapper.port=32000
> -Dwrapper.debug="TRUE" -Dwrapper.use_system_time="TRUE"
> -Dwrapper.version="3.1.2" -Dwrapper.native_library="wrapper"
> -Dwrapper.cpu.timeout="10" -Dwrapper.jvmid=1
> com.quantel.QuentinManager.QuentinWrapper quentin.properties
> DEBUG | wrapper | 2005/12/01 14:12:31 | JVM started (PID=2124)
> INFO | jvm 1 | 2005/12/01 14:12:32 | WrapperManager class initialized
> by thread: main Using classloader:
> sun.misc.Launcher$AppClassLoader@e80a59
> INFO | jvm 1 | 2005/12/01 14:12:32 | Wrapper Manager: JVM #1
> INFO | jvm 1 | 2005/12/01 14:12:32 | Wrapper Manager: Registering
> shutdown hook
> INFO | jvm 1 | 2005/12/01 14:12:32 | Wrapper Manager: Using wrapper
> INFO | jvm 1 | 2005/12/01 14:12:32 | Loaded native library:
> wrapper.dll
> INFO | jvm 1 | 2005/12/01 14:12:32 | Calling native initialization
> method.
> INFO | jvm 1 | 2005/12/01 14:12:32 | Initializing WrapperManager
> native library.
> INFO | jvm 1 | 2005/12/01 14:12:32 | Java Executable:
> c:\j2sdk1.4.2_08\bin\java.exe
> INFO | jvm 1 | 2005/12/01 14:12:32 | Windows version: 5.0.2195
> INFO | jvm 1 | 2005/12/01 14:12:32 | Java Version : 1.4.2_08-b03
> Java HotSpot(TM) Client VM
> INFO | jvm 1 | 2005/12/01 14:12:32 | Java VM Vendor : Sun
> Microsystems Inc.
> INFO | jvm 1 | 2005/12/01 14:12:32 |
> INFO | jvm 1 | 2005/12/01 14:12:32 | Wrapper (Version 3.1.2)
> http://wrapper.tanukisoftware.org
> INFO | jvm 1 | 2005/12/01 14:12:32 |
> INFO | jvm 1 | 2005/12/01 14:12:32 |
> WrapperManager.start(com.quantel.QuentinManager.QuentinWrapper@186db54,
> args["quentin.properties"]) called by thread: main
> INFO | jvm 1 | 2005/12/01 14:12:32 | Open socket to wrapper...
> INFO | jvm 1 | 2005/12/01 14:12:32 | Opened Socket
> INFO | jvm 1 | 2005/12/01 14:12:32 | Send a packet KEY :
> IcYMfSZTqNdo3jtq
> INFO | jvm 1 | 2005/12/01 14:12:32 |
> handleSocket(Socket[addr=/127.0.0.1,port=32000,localport=4003])
> DEBUG | wrapper | 2005/12/01 14:12:32 | Pause reading child output to
> share cycles.
> DEBUG | wrapperp | 2005/12/01 14:12:32 | accepted a socket from 127.0.0.1
> on port 4003
> DEBUG | wrapperp | 2005/12/01 14:12:32 | read a packet KEY :
> IcYMfSZTqNdo3jtq
> DEBUG | wrapper | 2005/12/01 14:12:32 | Got key from JVM:
> IcYMfSZTqNdo3jtq
> DEBUG | wrapperp | 2005/12/01 14:12:32 | send a packet LOW_LOG_LEVEL : 1
> DEBUG | wrapperp | 2005/12/01 14:12:32 | send a packet PING_TIMEOUT : 30
> DEBUG | wrapper | 2005/12/01 14:12:32 | Start Application.
> DEBUG | wrapperp | 2005/12/01 14:12:32 | send a packet START : start
> INFO | jvm 1 | 2005/12/01 14:12:32 | Received a packet LOW_LOG_LEVEL
> : 1
> INFO | jvm 1 | 2005/12/01 14:12:33 | Wrapper Manager: LowLogLevel
> from Wrapper is 1
> DEBUG | wrapper | 2005/12/01 14:12:33 | Pause reading child output to
> share cycles.
> INFO | jvm 1 | 2005/12/01 14:12:33 | Received a packet PING_TIMEOUT :
> 30
> DEBUG | wrapper | 2005/12/01 14:12:34 | Pause reading child output to
> share cycles.
> INFO | jvm 1 | 2005/12/01 14:12:34 | Wrapper Manager: PingTimeout
> from Wrapper is 30000
> INFO | jvm 1 | 2005/12/01 14:12:34 | Received a packet START : start
> INFO | jvm 1 | 2005/12/01 14:12:34 | calling listener.start()
> INFO | jvm 1 | 2005/12/01 14:12:34 | Not headless
> INFO | jvm 1 | 2005/12/01 14:12:34 | 01-Dec-2005 14:12:32 : SEVERE :
> QuentinManager C3.0.18.16
> INFO | jvm 1 | 2005/12/01 14:12:34 | 01-Dec-2005 14:12:33 : SEVERE :
> Invalid format 10000 in format table
> ERROR | wrapper | 2005/12/01 14:13:01 | Startup failed: Timed out
> waiting for signal from JVM.
> ERROR | wrapper | 2005/12/01 14:13:01 | JVM did not exit on request,
> terminated
> DEBUG | wrapper | 2005/12/01 14:13:02 | JVM was only running for 30
> seconds leading to a failed restart count of 1.
> FATAL | wrapper | 2005/12/01 14:13:02 | There were 1 failed launches in
> a row, each lasting less than 300 seconds. Giving up.
> FATAL | wrapper | 2005/12/01 14:13:02 | There may be a configuration
> problem: please check the logs.
> STATUS | wrapper | 2005/12/01 14:13:02 | <-- Wrapper Stopped
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems? Stop! Download the new AJAX search engine that makes
> searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> _______________________________________________
> Wrapper-user mailing list
> Wra...@li...
> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
>
|