|
From: Adam E. <ada...@dy...> - 2005-02-25 04:45:23
|
Hi all, We are trialling using the Java Service Wrapper for our product and so = far are very impressed. We do however have two major issues that appear = to manifest themselves mostly under Windows 2003 Server. To explain our issues, I'll first give some background on what our = application does. Our application consists of 5 java processes, plus one = we call the ServiceManager. The ServiceManager upon startup starts each = of the other 5 processes by calling Runtime.getRuntime().exec(). It then = continually checks that they are alive, and if not restarts them. It = also has a Runtime.getRuntime().addShutdownHook() to ensure that its = child processes are shutdown when it is shutdown. We are using the Java Service Wrapper (3.1.1) to wrap our ServiceManager = by simply specifying our classname in the conf file. Our problems are as = follows: 1. When certain users log off from the server (via Remote Desktop), = although the logs specify that the logged off signal is ignored, the = child processes (ran via Runtime.getRuntime().exec() are killed). e.g. INFO | wrapper | 2005/02/14 15:22:14 | User logged out. Ignored. INFO | jvm 1 | 2005/02/14 15:22:14 | 15:22:14,421 INFO = [ServiceRunner] Starting service scheduler INFO | jvm 1 | 2005/02/14 15:22:15 | 15:22:14,968 INFO = [ServiceRunner] Starting service authenticator INFO | jvm 1 | 2005/02/14 15:22:15 | 15:22:14,984 INFO = [ServiceRunner] Starting service freetext INFO | jvm 1 | 2005/02/14 15:22:15 | 15:22:15,015 INFO = [ServiceRunner] Starting service conversion The ServiceRunner INFO messages are from our ServiceManager which is = still running, but detecting the other service have shutdown so is = restarting them. This is a problem as we are a web app, and users logged into our system = will be kicked out as their sessions are tied to these running apps. Is there any way of preventing "child" processes of the wrapped service = from also being killed? 2. Every now and then, presumably when the server is under load, the JVM = is terminated. This presents two problems, firstly that it is happening, = and secondly that it doesn't call our shutdown hook, so the child = processes aren't killed, but then when it is restarted by the service = wrapper, the child processes are all started for a second time, leading = to catastropic consequences to our application! INFO | jvm 1 | 2005/02/16 09:44:07 | 09:44:07,659 INFO = [ServiceRunner] Starting service conversion ERROR | wrapper | 2005/02/17 08:13:29 | JVM appears hung: Timed out = waiting for signal from JVM. ERROR | wrapper | 2005/02/17 08:13:29 | JVM did not exit on request, = terminated STATUS | wrapper | 2005/02/17 08:13:34 | Launching a JVM... INFO | jvm 2 | 2005/02/17 08:13:35 | Wrapper (Version 3.1.1) = http://wrapper.tanukisoftware.org INFO | jvm 2 | 2005/02/17 08:13:35 |=20 INFO | jvm 2 | 2005/02/17 08:13:35 | 08:13:35,375 INFO = [RpcHandler] RPC: invoking start INFO | jvm 2 | 2005/02/17 08:13:35 | 08:13:35,375 INFO = [ServiceHandler] Reading configuration file INFO | jvm 2 | 2005/02/17 08:13:35 | 08:13:35,406 INFO = [ServiceRunner] Starting service resourcecentre INFO | jvm 2 | 2005/02/17 08:13:37 | 08:13:37,250 INFO = [ServiceRunner] Starting service resourcecentre INFO | jvm 2 | 2005/02/17 08:13:39 | 08:13:39,000 INFO = [ServiceRunner] Starting service resourcecentre INFO | jvm 2 | 2005/02/17 08:13:40 | 08:13:40,406 INFO = [ServiceRunner] Starting service freetext INFO | jvm 2 | 2005/02/17 08:13:40 | 08:13:40,734 INFO = [ServiceRunner] Starting service resourcecentre INFO | jvm 2 | 2005/02/17 08:13:42 | 08:13:42,578 INFO = [ServiceRunner] Starting service resourcecentre Is there any way to prevent the JVM appearing as hung when it isn't = really? Look forward to hearing back from anyone! Cheers, Adam Adam Eijdenberg DYTECH SOLUTIONS Pty. Ltd. ----------------------------------- Level 2, 25 Argyle Street GPO Box 642 Hobart TAS 7000 Ph: +61 3 6235 2222 Fax: +61 3 6235 2299 ada...@dy... www.dytech.com.au ----------------------------------- |