I use v3.1.2 to start my application as a service and sometimes as a console application with great success.
Recently I tried to upgrade to v3.2.3 to use some newer features and saw the following problem.
My service always fails to start as a console application and sometimes as a service on server class machines.
It works fine on desktop machines.
Secondly, on the server class machines setting wrapper.debug=TRUE seems to almost always allow console application to start up successfully.
The above observations and the following output (FAILURE and SUCCESS scenarios with wrapper.debug=TRUE) seems to point to some kind of timing/synchronization issue.
FAILURE SCENARIO
INFO | jvm 2 | 2008/03/10 15:22:37 | WrapperManager class initialized by thread: main Using classloader: sun.misc.Launcher$AppClassLoader@92e78c
INFO | jvm 2 | 2008/03/10 15:22:37 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
INFO | jvm 2 | 2008/03/10 15:22:37 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
INFO | jvm 2 | 2008/03/10 15:22:37 |
INFO | jvm 2 | 2008/03/10 15:22:37 | Wrapper Manager: JVM #2
INFO | jvm 2 | 2008/03/10 15:22:37 | Running a 32-bit JVM.
INFO | jvm 2 | 2008/03/10 15:22:37 | Wrapper Manager: Registering shutdown hook
INFO | jvm 2 | 2008/03/10 15:22:37 | Wrapper Manager: Using wrapper
INFO | jvm 2 | 2008/03/10 15:22:37 | Load native library. One or more attempts may fail if platform specific libraries do not exist.
INFO | jvm 2 | 2008/03/10 15:22:37 | Loading native library failed: wrapper-windows-x86-32.dll Cause: java.lang.UnsatisfiedLinkError: no wrapper-windows-x86-32 in java.library.path
INFO | jvm 2 | 2008/03/10 15:22:37 | Loaded native library: wrapper.dll
INFO | jvm 2 | 2008/03/10 15:22:37 | Calling native initialization method.
INFO | jvm 2 | 2008/03/10 15:22:37 | Initializing WrapperManager native library.
INFO | jvm 2 | 2008/03/10 15:22:37 | Java Executable: D:\Jre\1.5.0_14\bin\java.exe
INFO | jvm 2 | 2008/03/10 15:22:37 | Windows version: 5.2.3790
INFO | jvm 2 | 2008/03/10 15:22:37 | Java Version : 1.5.0_14-b03 Java HotSpot(TM) Client VM
INFO | jvm 2 | 2008/03/10 15:22:37 | Java VM Vendor : Sun Microsystems Inc.
INFO | jvm 2 | 2008/03/10 15:22:37 |
INFO | jvm 2 | 2008/03/10 15:22:37 | Control event monitor thread started.
INFO | jvm 2 | 2008/03/10 15:22:37 | Startup runner thread started.
INFO | jvm 2 | 2008/03/10 15:22:37 | WrapperManager.start([ServiceName], args["ServiceArgs"]) called by thread: main
INFO | jvm 2 | 2008/03/10 15:22:37 | Communications runner thread started.
INFO | jvm 2 | 2008/03/10 15:22:37 | Open socket to wrapper...Wrapper-Connection
INFO | jvm 2 | 2008/03/10 15:22:37 | Opened Socket from 31000 to 32002
INFO | jvm 2 | 2008/03/10 15:22:37 | Send a packet KEY : ZXg04grlCEi7IYRs
INFO | jvm 2 | 2008/03/10 15:22:37 | handleSocket(Socket[addr=/127.0.0.1,port=32002,localport=31000])
ERROR | wrapper | 2008/03/10 15:22:37 | Unable to send the start command to the JVM.
INFO | jvm 2 | 2008/03/10 15:22:37 | Received a packet LOW_LOG_LEVEL : 1
INFO | jvm 2 | 2008/03/10 15:22:37 | Wrapper Manager: LowLogLevel from Wrapper is 1
INFO | jvm 2 | 2008/03/10 15:22:37 | Received a packet PING_TIMEOUT : 0
INFO | jvm 2 | 2008/03/10 15:22:37 | PingTimeout from Wrapper is 0
INFO | jvm 2 | 2008/03/10 15:22:37 | Received a packet PROPERTIES : (Property Values)
INFO | jvm 2 | 2008/03/10 15:22:37 | Closing socket.
INFO | jvm 2 | 2008/03/10 15:22:37 | Open socket to wrapper...Wrapper-Connection
INFO | jvm 2 | 2008/03/10 15:22:37 | Opened Socket from 31000 to 32002
INFO | jvm 2 | 2008/03/10 15:22:37 | Send a packet KEY : ZXg04grlCEi7IYRs
INFO | jvm 2 | 2008/03/10 15:22:37 | handleSocket(Socket[addr=/127.0.0.1,port=32002,localport=31000])
ERROR | wrapper | 2008/03/10 15:22:37 | JVM did not exit on request, terminated
SUCCESS SCENARIO
INFO | jvm 4 | 2008/03/10 15:22:56 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
INFO | jvm 4 | 2008/03/10 15:22:56 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
INFO | jvm 4 | 2008/03/10 15:22:56 |
INFO | jvm 4 | 2008/03/10 15:22:56 | Wrapper Manager: JVM #4
INFO | jvm 4 | 2008/03/10 15:22:56 | Running a 32-bit JVM.
INFO | jvm 4 | 2008/03/10 15:22:56 | Wrapper Manager: Registering shutdown hook
INFO | jvm 4 | 2008/03/10 15:22:56 | Wrapper Manager: Using wrapper
INFO | jvm 4 | 2008/03/10 15:22:56 | Load native library. One or more attempts may fail if platform specific libraries do not exist.
INFO | jvm 4 | 2008/03/10 15:22:56 | Loading native library failed: wrapper-windows-x86-32.dll Cause: java.lang.UnsatisfiedLinkError: no wrapper-windows-x86-32 in java.library.path
INFO | jvm 4 | 2008/03/10 15:22:56 | Loaded native library: wrapper.dll
INFO | jvm 4 | 2008/03/10 15:22:56 | Calling native initialization method.
INFO | jvm 4 | 2008/03/10 15:22:56 | Initializing WrapperManager native library.
INFO | jvm 4 | 2008/03/10 15:22:56 | Java Executable: D:\Jre\1.5.0_14\bin\java.exe
INFO | jvm 4 | 2008/03/10 15:22:56 | Windows version: 5.2.3790
INFO | jvm 4 | 2008/03/10 15:22:56 | Java Version : 1.5.0_14-b03 Java HotSpot(TM) Client VM
INFO | jvm 4 | 2008/03/10 15:22:56 | Java VM Vendor : Sun Microsystems Inc.
INFO | jvm 4 | 2008/03/10 15:22:56 |
INFO | jvm 4 | 2008/03/10 15:22:56 | Control event monitor thread started.
INFO | jvm 4 | 2008/03/10 15:22:56 | Startup runner thread started.
INFO | jvm 4 | 2008/03/10 15:22:56 | WrapperManager.start([ServiceName], args["ServiceArgs"]) called by thread: main
INFO | jvm 4 | 2008/03/10 15:22:56 | Communications runner thread started.
INFO | jvm 4 | 2008/03/10 15:22:56 | Open socket to wrapper...Wrapper-Connection
INFO | jvm 4 | 2008/03/10 15:22:56 | Opened Socket from 31000 to 32001
INFO | jvm 4 | 2008/03/10 15:22:56 | Send a packet KEY : s4KggKV10Jfh9DFL
INFO | jvm 4 | 2008/03/10 15:22:56 | handleSocket(Socket[addr=/127.0.0.1,port=32001,localport=31000])
INFO | jvm 4 | 2008/03/10 15:22:56 | Received a packet LOW_LOG_LEVEL : 1
INFO | jvm 4 | 2008/03/10 15:22:56 | Wrapper Manager: LowLogLevel from Wrapper is 1
INFO | jvm 4 | 2008/03/10 15:22:56 | Received a packet PING_TIMEOUT : 0
INFO | jvm 4 | 2008/03/10 15:22:56 | PingTimeout from Wrapper is 0
INFO | jvm 4 | 2008/03/10 15:22:56 | Received a packet PROPERTIES : (Property Values)
INFO | jvm 4 | 2008/03/10 15:22:56 | Received a packet START : start
INFO | jvm 4 | 2008/03/10 15:22:56 | calling WrapperListener.start()
INFO | jvm 4 | 2008/03/10 15:22:56 | Waiting for WrapperListener.start runner thread to complete.
INFO | jvm 4 | 2008/03/10 15:22:56 | WrapperListener.start runner thread started.