Project

General

Custom queries

Profile

Actions

Task #9323

closed

Task #9322: STAR sandbox -> TReqS project

Add Java Service Wrapper functionality

Added by Chambon Bernard about 10 years ago. Updated about 10 years ago.

Status:
Resolved
Priority:
Low
Assigned To:
Category:
-
Start date:
03/24/2011
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)

Subtasks 1 (0 open1 closed)

Bug #1520: Watchdog verboseRejected03/24/2011

Actions
Actions #2

Updated by Chambon Bernard about 10 years ago

JSW added to project, with some basic tests => ok

About tests
As unix service : start, stop, restart, status, dump => ok
Handling JVM behaviour : => ok

Tests details

o Hang de la JVM (kill -STOP pid), ok

...
DEBUG  | wrapper  | 2015/03/12 10:21:09 | Signal trapped.  Details:
DEBUG  | wrapper  | 2015/03/12 10:21:09 |   signal number=17 (SIGCHLD), source="unknown" 
DEBUG  | wrapper  | 2015/03/12 10:21:09 | Received SIGCHLD, checking JVM process status.
WARN   | wrapper  | 2015/03/12 10:21:09 | JVM process was still running after receiving a SIGCHLD signal.
DEBUG  | wrapperp | 2015/03/12 10:21:10 | send a packet PING : ping
DEBUG  | wrapperp | 2015/03/12 10:21:14 | send a packet PING : ping
DEBUG  | wrapperp | 2015/03/12 10:21:18 | send a packet PING : ping
DEBUG  | wrapperp | 2015/03/12 10:21:22 | send a packet PING : ping
DEBUG  | wrapperp | 2015/03/12 10:21:26 | send a packet PING : ping
DEBUG  | wrapperp | 2015/03/12 10:21:30 | send a packet PING : ping
DEBUG  | wrapperp | 2015/03/12 10:21:34 | send a packet PING : ping
DEBUG  | wrapperp | 2015/03/12 10:21:39 | send a packet PING : ping
ERROR  | wrapper  | 2015/03/12 10:21:40 | JVM appears hung: Timed out waiting for signal from JVM.
ERROR  | wrapper  | 2015/03/12 10:21:40 | JVM did not exit on request, terminated
INFO   | wrapper  | 2015/03/12 10:21:40 | JVM exited on its own while waiting to kill the application.
DEBUG  | wrapper  | 2015/03/12 10:21:40 | Signal trapped.  Details:
DEBUG  | wrapper  | 2015/03/12 10:21:40 |   signal number=17 (SIGCHLD), source="unknown" 
DEBUG  | wrapper  | 2015/03/12 10:21:40 | Received SIGCHLD, checking JVM process status.
STATUS | wrapper  | 2015/03/12 10:21:40 | JVM exited in response to signal SIGKILL (9).
DEBUG  | wrapper  | 2015/03/12 10:21:40 | JVM process exited with a code of 1, setting the wrapper exit code to 1.
DEBUG  | wrapperp | 2015/03/12 10:21:40 | server listening on port 32000.
DEBUG  | wrapper  | 2015/03/12 10:21:40 | JVM was only running for 50 seconds leading to a failed restart count of 1.
DEBUG  | wrapper  | 2015/03/12 10:21:40 | Waiting 2 seconds before launching another JVM.
DEBUG  | wrapper  | 2015/03/12 10:21:41 | Classpath element, wrapper.java.classpath.3, does not exist: lib/star-delivery-1.0-SNAPSHOT.jar
DEBUG  | wrapper  | 2015/03/12 10:21:41 | Command[0] : java

 o Crash of the JVM, 
   Done via SIGURS1, JVM will stop, a new one will be created (see swith from jvm1 to jvm2)

...
INFO   | jvm 1    | 2015/03/12 11:08:10 | Send a packet PING : ok
DEBUG  | wrapperp | 2015/03/12 11:08:10 | read a packet PING : ok
DEBUG  | wrapper  | 2015/03/12 11:08:10 | Got ping response from JVM
ERROR  | wrapper  | 2015/03/12 11:08:14 | JVM exited unexpectedly.
STATUS | wrapper  | 2015/03/12 11:08:15 | Launching a JVM...
INFO   | jvm 2    | 2015/03/12 11:08:15 | WrapperManager class initialized by thread: main  Using classloader: sun.misc.Launcher$AppClassLoader@68d767dc
INFO   | jvm 2    | 2015/03/12 11:08:15 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
INFO   | jvm 2    | 2015/03/12 11:08:15 |   Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.

 o Action on text detection 
   Done via message "Restart me now" on stdout

...    
INFO   | jvm 1    | 2015/03/18 10:31:46 | Restart me now.
STATUS | wrapper  | 2015/03/18 10:31:46 | Filter trigger matched.  Restarting JVM.
DEBUG  | wrapper  | 2015/03/18 10:31:46 | wrapperRestartProcess() called.
DEBUG  | wrapper  | 2015/03/18 10:31:46 | Sending stop signal to JVM
DEBUG  | wrapperp | 2015/03/18 10:31:46 | send a packet STOP : NULL
INFO   | jvm 1    | 2015/03/18 10:31:46 | Received a packet STOP : 
INFO   | jvm 1    | 2015/03/18 10:31:46 | Thread, Wrapper-Connection, handling the shutdown process.
INFO   | jvm 1    | 2015/03/18 10:31:46 | calling listener.stop()
INFO   | jvm 1    | 2015/03/18 10:31:46 | Waiting for WrapperListener.stop runner thread to complete.
INFO   | jvm 1    | 2015/03/18 10:31:46 | WrapperListener.stop runner thread started.
INFO   | jvm 1    | 2015/03/18 10:31:46 | WrapperSimpleApp: stop(0)
INFO   | jvm 1    | 2015/03/18 10:31:46 | WrapperListener.stop runner thread stopped.
INFO   | jvm 1    | 2015/03/18 10:31:46 | returned from listener.stop() -> 0
INFO   | jvm 1    | 2015/03/18 10:31:46 | shutdownJVM(0) Thread:Wrapper-Connection
...
STATUS | wrapper  | 2015/03/18 10:31:47 | Launching a JVM...
INFO   | jvm 2    | 2015/03/18 10:31:48 | WrapperManager class initialized by thread: main  Using classloader: sun.misc.Launcher$AppClassLoader@5bd44ae9
INFO   | jvm 2    | 2015/03/18 10:31:48 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
INFO   | jvm 2    | 2015/03/18 10:31:48 |   Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.
INFO   | jvm 2    | 2015/03/18 10:31:48 | 
INFO   | jvm 2    | 2015/03/18 10:31:48 | Wrapper Manager: JVM #2
INFO   | jvm 2    | 2015/03/18 10:31:48 | Running a 64-bit JVM.

Memo : caution with JSW version for what is possible or not (e.g. DUMP only if 3.3.6)

Actions

Also available in: Atom PDF