|
From: jonathan l. <jon...@wa...> - 2006-05-26 22:03:39
|
I'm trying to lauch my java application at the startup of a debian. For the moment my app is only a loading an icone, in the system tray. It is working properly and I can start and stop it using ./mywrapper start and ./mywrapper stop. I merely followed the instructions here : http://wrapper.tanukisoftware.org/doc/english/launch-nix-boot-debian.html Creating the symbolic link in /etc/init.d ln -s /usr/lib/myapp/bin/myapp /etc/init.d/myapp The link is working. Then configuring the rc*.d update-rc.d myapp start 99 5 . stop 99 0 1 6 . This also working because as you can see below the wrapper is called and runned. However, it has a problem running the JVM. I even set the JAVA_HOME in the conf file but it's not working. If someone could help me, it would be great, thanks. This is my config file : # Java Application set.default.JAVA_HOME=/usr/lib/j2sdk1.5-sun set.JAVA_HOME=/usr/lib/j2sdk1.5-sun export JAVA_HOME wrapper.java.command=%JAVA_HOME%/bin/java # Java Main class. This class must implement the WrapperListener interface # or guarantee that the WrapperManager class is initialized. Helper # classes are provided to do this for you. See the Integration section # of the documentation for details. wrapper.java.mainclass=Main # Java Classpath (include wrapper.jar) Add class path elements as # needed starting from 1 wrapper.java.classpath.1=TestTray.jar wrapper.java.classpath.2=../lib/wrapper.jar wrapper.java.classpath.3=jdic.jar # Java Library Path (location of Wrapper.DLL or libwrapper.so) wrapper.java.library.path.1=../lib #wrapper.java.library.path.2=lib/libwrapper-linux-x86-32.so # Java Additional Parameters #wrapper.java.additional.1= This is the wrapper.log after the startup DEBUG | wrapper | 2006/05/25 17:27:58 | Command[0] : /usr/lib/j2sdk1.5-sun/bin/java DEBUG | wrapper | 2006/05/25 17:27:58 | Command[1] : -Djava.library.path=../lib DEBUG | wrapper | 2006/05/25 17:27:58 | Command[2] : -classpath DEBUG | wrapper | 2006/05/25 17:27:58 | Command[3] : TestTray.jar:../lib/wrapper.jar:jdic.jar DEBUG | wrapper | 2006/05/25 17:27:58 | Command[4] : -Dwrapper.key=SyGk9qLsm4ALr7Bs DEBUG | wrapper | 2006/05/25 17:27:58 | Command[5] : -Dwrapper.port=32000 DEBUG | wrapper | 2006/05/25 17:27:58 | Command[6] : -Dwrapper.jvm.port.min=31000 DEBUG | wrapper | 2006/05/25 17:27:58 | Command[7] : -Dwrapper.jvm.port.max=31999 DEBUG | wrapper | 2006/05/25 17:27:58 | Command[8] : -Dwrapper.debug=TRUE DEBUG | wrapper | 2006/05/25 17:27:58 | Command[9] : -Dwrapper.pid=3005 DEBUG | wrapper | 2006/05/25 17:27:58 | Command[10] : -Dwrapper.version=3.2.0 DEBUG | wrapper | 2006/05/25 17:27:58 | Command[11] : -Dwrapper.native_library=wrapper DEBUG | wrapper | 2006/05/25 17:27:58 | Command[12] : -Dwrapper.service=TRUE DEBUG | wrapper | 2006/05/25 17:27:58 | Command[13] : -Dwrapper.cpu.timeout=10 DEBUG | wrapper | 2006/05/25 17:27:58 | Command[14] : -Dwrapper.jvmid=4 DEBUG | wrapper | 2006/05/25 17:27:58 | Command[15] : Main DEBUG | wrapper | 2006/05/25 17:27:58 | Command[16] : --id DEBUG | wrapper | 2006/05/25 17:27:58 | Command[17] : 51 DEBUG | wrapper | 2006/05/25 17:27:58 | Command[18] : --address DEBUG | wrapper | 2006/05/25 17:27:58 | Command[19] : bachibouzouk DEBUG | wrapper | 2006/05/25 17:27:58 | Command[20] : --home DEBUG | wrapper | 2006/05/25 17:27:58 | Command[21] : ./ DEBUG | wrapper | 2006/05/25 17:27:58 | Command[22] : netmon-conf.xml STATUS | wrapper | 2006/05/25 17:27:58 | Launching a JVM... INFO | jvm 4 | 2006/05/25 17:27:58 | WrapperManager class initialized by thread: main Using classloader: sun.misc.Launcher$AppClassLoader@198dfaf INFO | jvm 4 | 2006/05/25 17:27:58 | Wrapper (Version 3.2.0) http://wrapper.tanukisoftware.org INFO | jvm 4 | 2006/05/25 17:27:58 | INFO | jvm 4 | 2006/05/25 17:27:58 | Wrapper Manager: JVM #4 INFO | jvm 4 | 2006/05/25 17:27:58 | Running a 32-bit JVM. INFO | jvm 4 | 2006/05/25 17:27:58 | Wrapper Manager: Registering shutdown hook INFO | jvm 4 | 2006/05/25 17:27:58 | Wrapper Manager: Using wrapper INFO | jvm 4 | 2006/05/25 17:27:58 | Load native library. One or more attempts may fail if platform specific libraries do not exist. INFO | jvm 4 | 2006/05/25 17:27:58 | Loaded native library: libwrapper-linux-x86-32.so INFO | jvm 4 | 2006/05/25 17:27:58 | Calling native initialization method. INFO | jvm 4 | 2006/05/25 17:27:58 | Inside native WrapperManager initialization method INFO | jvm 4 | 2006/05/25 17:27:58 | Java Version : 1.5.0_06-b05 Java HotSpot(TM) Client VM INFO | jvm 4 | 2006/05/25 17:27:58 | Java VM Vendor : Sun Microsystems Inc. INFO | jvm 4 | 2006/05/25 17:27:58 | INFO | jvm 4 | 2006/05/25 17:27:58 | WrapperManager.start(Main@12a54f9, args["--id", "51", "--address", "bachibouzouk", "--home", "./", "netmon-conf.xml"]) called by thread: main INFO | jvm 4 | 2006/05/25 17:27:58 | Open socket to wrapper...Wrapper-Connection INFO | jvm 4 | 2006/05/25 17:27:58 | Failed attempt to bind using local port 31000 INFO | jvm 4 | 2006/05/25 17:27:58 | Failed attempt to bind using local port 31001 INFO | jvm 4 | 2006/05/25 17:27:58 | Failed attempt to bind using local port 31002 INFO | jvm 4 | 2006/05/25 17:27:58 | Opened Socket from 31003 to 32000 INFO | jvm 4 | 2006/05/25 17:27:58 | Send a packet KEY : SyGk9qLsm4ALr7Bs INFO | jvm 4 | 2006/05/25 17:27:58 | handleSocket(Socket[addr=/127.0.0.1,port=32000,localport=31003]) DEBUG | wrapperp | 2006/05/25 17:27:58 | accepted a socket from 127.0.0.1 on port 31003 DEBUG | wrapperp | 2006/05/25 17:27:58 | read a packet KEY : SyGk9qLsm4ALr7Bs DEBUG | wrapper | 2006/05/25 17:27:58 | Got key from JVM: SyGk9qLsm4ALr7Bs DEBUG | wrapperp | 2006/05/25 17:27:58 | send a packet LOW_LOG_LEVEL : 1 DEBUG | wrapperp | 2006/05/25 17:27:58 | send a packet PING_TIMEOUT : 30 DEBUG | wrapperp | 2006/05/25 17:27:58 | send a packet PROPERTIES : (Property Values) DEBUG | wrapper | 2006/05/25 17:27:58 | Start Application. DEBUG | wrapperp | 2006/05/25 17:27:58 | send a packet START : start INFO | jvm 4 | 2006/05/25 17:27:59 | Received a packet LOW_LOG_LEVEL : 1 INFO | jvm 4 | 2006/05/25 17:27:59 | Wrapper Manager: LowLogLevel from Wrapper is 1 INFO | jvm 4 | 2006/05/25 17:27:59 | Received a packet PING_TIMEOUT : 30 INFO | jvm 4 | 2006/05/25 17:27:59 | Wrapper Manager: PingTimeout from Wrapper is 30000 INFO | jvm 4 | 2006/05/25 17:27:59 | Received a packet PROPERTIES : (Property Values) INFO | jvm 4 | 2006/05/25 17:27:59 | Monitoring of the JVM thread count will be delayed for 1 seconds. INFO | jvm 4 | 2006/05/25 17:27:59 | Received a packet START : start INFO | jvm 4 | 2006/05/25 17:27:59 | calling listener.start() INFO | jvm 4 | 2006/05/25 17:27:59 | start DEBUG | wrapper | 2006/05/25 17:27:59 | Signal trapped. Details: DEBUG | wrapper | 2006/05/25 17:27:59 | signal number=17 (SIGCHLD), source="unknown" DEBUG | wrapper | 2006/05/25 17:27:59 | Received SIGCHLD, calling wait(). DEBUG | wrapper | 2006/05/25 17:27:59 | wait() returned, child process should be gone. DEBUG | wrapperp | 2006/05/25 17:27:59 | socket read no code (closed?). DEBUG | wrapper | 2006/05/25 17:27:59 | JVM process is gone. ERROR | wrapper | 2006/05/25 17:27:59 | JVM exited while starting the application. DEBUG | wrapperp | 2006/05/25 17:27:59 | server listening on port 32000. DEBUG | wrapper | 2006/05/25 17:27:59 | JVM was only running for 0 seconds leading to a failed restart count of 4 |