|
From: Leif M. <le...@ta...> - 2004-06-07 22:56:02
|
Sunil,
From the debug output, it looks like you have the main class
specified as
org.tanukisoftware.wrapper.test.Main
Which is the test application that ships with the Wrapper. It looks
like you
have added the jars for your application to the classpath, but in most cases
you should be removing the wrappertest.jar file, as your application will
most likely not use it.
For Integration Method #1:
You will also need to change the mainclass to WrapperSimpleApp
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
Then specify you main class as the first parameter to that helper class:
wrapper.app.parameter.1={Your main class}
From your previous messages, I had gotten the impression that you have
read the docs, but make sure you have read over the integration section.
http://wrapper.tanukisoftware.org/doc/english/integrate.html
If you also post your wrapper.conf then I can probably point out
anything
else that is wrong.
Cheers,
Leif
Annam, Sunil wrote:
>Leif,
>
>Wrapper.debug=true is enabled.
>The first statement in my code is
> if (args.length < 1) {
> System.out.println(" MobileGateway not started!" +
> "Usage: java newproxyserver/Controller "
>+
> "<Properties file name>.");
>
> System.exit(0);
> }
>
> try {
> //Get the 'MG_HOME' env. variable.
> mgHome = System.getProperty("MG_HOME", "..") + "/";
> System.out.println("MG_HOME: " + mgHome);
> ....
> ....
> }catch(...)
> {
> }
>
>I am not getting any of the println in console output or wrapper.log.
>
>Here is the output from wrapper.log
>
>STATUS | wrapper | 2004/06/07 08:30:06 | --> Wrapper Started as Console
>DEBUG | wrapperp | 2004/06/07 08:30:06 | server listening on port
>32001.
>DEBUG | wrapper | 2004/06/07 08:30:06 | Command[0] :
>/usr/j2sdk1.4.2/bin/java
>DEBUG | wrapper | 2004/06/07 08:30:06 | Command[1] :
>-DMG_HOME=/home/linux/mgateway
>DEBUG | wrapper | 2004/06/07 08:30:06 | Command[2] :
>-Djava.library.path=../lib
>DEBUG | wrapper | 2004/06/07 08:30:06 | Command[3] : -classpath
>DEBUG | wrapper | 2004/06/07 08:30:06 | Command[4] :
>../lib/wrapper.jar:../lib/wrappertest.jar:newproxyserver:../lib/jaxrpc.j
>ar:../lib/axis.jar:../lib/dom.jar:../lib/commons-logging.jar:../lib/jdom
>-b8.jar:../lib/sax.jar:../lib/tt-bytecode.jar:superwaba:waba:.
>DEBUG | wrapper | 2004/06/07 08:30:06 | Command[5] :
>-Dwrapper.key=pmP31wOrwbdgEDHy
>DEBUG | wrapper | 2004/06/07 08:30:06 | Command[6] :
>-Dwrapper.port=32001
>DEBUG | wrapper | 2004/06/07 08:30:06 | Command[7] :
>-Dwrapper.debug=TRUE
>DEBUG | wrapper | 2004/06/07 08:30:06 | Command[8] :
>-Dwrapper.use_system_time=TRUE
>DEBUG | wrapper | 2004/06/07 08:30:06 | Command[9] :
>-Dwrapper.version=3.1.0
>DEBUG | wrapper | 2004/06/07 08:30:06 | Command[10] :
>-Dwrapper.native_library=wrapper
>DEBUG | wrapper | 2004/06/07 08:30:06 | Command[11] :
>-Dwrapper.cpu.timeout=10
>DEBUG | wrapper | 2004/06/07 08:30:06 | Command[12] :
>-Dwrapper.jvmid=1
>DEBUG | wrapper | 2004/06/07 08:30:06 | Command[13] :
>org.tanukisoftware.wrapper.test.Main
>STATUS | wrapper | 2004/06/07 08:30:06 | Launching a JVM...
>INFO | jvm 1 | 2004/06/07 08:30:09 | Initializing...
>INFO | jvm 1 | 2004/06/07 08:30:10 | WrapperManager class
>initialized by thread: main Using classloader:
>sun.misc.Launcher$AppClassLoader@7b7072
>INFO | jvm 1 | 2004/06/07 08:30:10 | Wrapper Manager: JVM #1
>INFO | jvm 1 | 2004/06/07 08:30:10 | Wrapper Manager: Registering
>shutdown hook
>INFO | jvm 1 | 2004/06/07 08:30:10 | Wrapper Manager: Using wrapper
>INFO | jvm 1 | 2004/06/07 08:30:11 | Loaded native library:
>libwrapper.so
>INFO | jvm 1 | 2004/06/07 08:30:11 | Calling native initialization
>method.
>INFO | jvm 1 | 2004/06/07 08:30:11 | Inside native WrapperManager
>initialization method
>INFO | jvm 1 | 2004/06/07 08:30:11 | Java Version :
>1.4.2-beta-b19 Java HotSpot(TM) Client VM
>INFO | jvm 1 | 2004/06/07 08:30:11 | Java VM Vendor : Sun
>Microsystems Inc.
>INFO | jvm 1 | 2004/06/07 08:30:11 |
>INFO | jvm 1 | 2004/06/07 08:30:11 | Wrapper (Version 3.1.0)
>http://wrapper.tanukisoftware.org
>INFO | jvm 1 | 2004/06/07 08:30:11 |
>INFO | jvm 1 | 2004/06/07 08:30:11 |
>WrapperManager.start(org.tanukisoftware.wrapper.test.Main@867e89,
>args[]) called by thread: main
>INFO | jvm 1 | 2004/06/07 08:30:11 | Open socket to wrapper...
>INFO | jvm 1 | 2004/06/07 08:30:11 | Opened Socket
>INFO | jvm 1 | 2004/06/07 08:30:11 | Send a packet KEY :
>pmP31wOrwbdgEDHy
>INFO | jvm 1 | 2004/06/07 08:30:11 |
>handleSocket(Socket[addr=/127.0.0.1,port=32001,localport=1369])
>DEBUG | wrapperp | 2004/06/07 08:30:11 | accepted a socket from
>127.0.0.1 on port 1369
>DEBUG | wrapperp | 2004/06/07 08:30:11 | read a packet KEY :
>pmP31wOrwbdgEDHy
>DEBUG | wrapper | 2004/06/07 08:30:11 | Got key from JVM:
>pmP31wOrwbdgEDHy
>DEBUG | wrapperp | 2004/06/07 08:30:11 | send a packet LOW_LOG_LEVEL :
>1
>DEBUG | wrapperp | 2004/06/07 08:30:11 | send a packet PING_TIMEOUT :
>18000
>DEBUG | wrapper | 2004/06/07 08:30:11 | Start Application.
>DEBUG | wrapperp | 2004/06/07 08:30:11 | send a packet START : start
>INFO | jvm 1 | 2004/06/07 08:30:11 | Received a packet
>LOW_LOG_LEVEL : 1
>INFO | jvm 1 | 2004/06/07 08:30:11 | Wrapper Manager: LowLogLevel
>from Wrapper is 1
>INFO | jvm 1 | 2004/06/07 08:30:11 | Received a packet PING_TIMEOUT
>: 18000
>INFO | jvm 1 | 2004/06/07 08:30:11 | Wrapper Manager: PingTimeout
>from Wrapper is 18000000
>INFO | jvm 1 | 2004/06/07 08:30:11 | Received a packet START :
>start
>INFO | jvm 1 | 2004/06/07 08:30:11 | calling listener.start()
>INFO | jvm 1 | 2004/06/07 08:30:11 | start()
>INFO | jvm 1 | 2004/06/07 08:30:16 | Warning: Cannot convert string
>"-monotype-arial-regular-r-normal--*-140-*-*-p-*-iso8859-1" to type
>FontStruct
>INFO | jvm 1 | 2004/06/07 08:30:16 | Setting the console title not
>supported on UNIX platforms.
>INFO | jvm 1 | 2004/06/07 08:30:17 | Unable to open the action
>server socket: Address already in use
>INFO | jvm 1 | 2004/06/07 08:30:17 | returned from listener.start()
>INFO | jvm 1 | 2004/06/07 08:30:17 | Send a packet STARTED :
>DEBUG | wrapperp | 2004/06/07 08:30:17 | read a packet STARTED :
>DEBUG | wrapper | 2004/06/07 08:30:17 | JVM signalled that it was
>started.
>DEBUG | wrapperp | 2004/06/07 08:30:17 | send a packet PING : ping
>INFO | jvm 1 | 2004/06/07 08:30:18 | Received a packet PING : ping
>INFO | jvm 1 | 2004/06/07 08:30:18 | Send a packet PING : ok
>DEBUG | wrapperp | 2004/06/07 08:30:18 | read a packet PING : ok
>DEBUG | wrapper | 2004/06/07 08:30:18 | Got ping response from JVM
>
>//======================================================================
>====
>
>
>
>-----Original Message-----
>From: Leif Mortenson [mailto:le...@ta...]
>Sent: Sunday, June 06, 2004 11:23 PM
>To: Annam, Sunil; wra...@li...
>Subject: Re: where ot find output of System.out.println
>
>Sunil,
>Please post questions to the wrapper-user mailing list rather than
>sending them to me
>directly. It makes them searchable for others having the same problem
>in the future
>and also makes it possible for others to answer the questions.
>
>See below.
>
>Annam, Sunil wrote:
>
>
>
>>Leif,
>>
>>Thanks for the reply.
>>I was running on UNIX. But I don't have library for 64 bit HPUX.
>>Therefore, to understand concept of Wrapper, I am trying to test
>>
>>
>another
>
>
>>server application that is running on SuSe linux.
>>
>>When the pServer starts, it does the following
>>mgHome = System.getProperty("MG_HOME", "..") + "/";
>>System.out.println("MG_HOME: " + mgHome);
>>
>>
>>
>>
>That message should be showing up in the wrapper.log file regardless of
>whether
>or not the MG_HOME system property is being set correctly.
>
>Could you set the wrapper.debug=true property and then post the
>generated
>wrapper.log file for a single run. This will give me a lot more
>information about
>exactly what is going on.
>
>
>
>>I am not seeing MG_HOME string in console output and wrapper.log.
>>So I was wondering where the output goes. My applicatiosn creates a log
>>file in $MG_HOME\logs but it is not there if I run it through wrapper.
>>In wrapper.conf, I have "set.MG_HOME=/home/linux/pServer".
>>
>>
>>
>>
>I am not clear exactly how you are specifying the location of the log
>file in your
>JVM. You can not reference a variable within the JVM using $JVM_HOME.
>You will have to do something like:
>System.out.println( "Path: " + System.getProperty( "MG_HOME" ) + "/logs"
>);
>
>In order to make that system property available, you will have to pass
>it to the JVM.
>Environment variables are not visible from the JVM on their own:
>
>set.MG_HOME=/home/linux/pServer
>wrapper.java.additional.1=-DMG_HOME=%MG_HOME%
>
>The first will set the environment variable and the second will define
>the system
>property when the JVM is launched.
>
>
>
>>As I said before, after I start my application through wrapper, I go to
>>other terminal window and see 'pServer status'. It tells me "pServer
>>service is running (27780)".
>>
>>
>>
>>
>How are you launching the Wrapper? If you are using the sh script that
>
>comes
>with the Wrapper, could you try running it with the 'console' command
>rather
>than 'start'? This will run the Wrapper in the current console and make
>
>it easier
>to see the output that is being sent to the Wrapper process.
>
>It will also make it clear that the JVM is indeed still running.
>
>
>
>>In addition to that, when clients try to make connection with server,
>>they could not find the server.
>>
>>
>>
>>
>This makes me wonder if the JVM is actually running. What do you see if
>
>you run
>'ps -fax' You should see a tree of the processes running on your
>system. Look for
>the Wrapper and its JVM.
>
>The script that ships with the Wrapper can also be used to check the
>status of
>the Wrapper process by running it with the 'status' command.
>
>Cheers,
>Leif
>
>
>
>>-----Original Message-----
>>From: Leif Mortenson [mailto:le...@ta...]
>>Sent: Saturday, May 29, 2004 3:15 AM
>>To: Annam, Sunil
>>Subject: Re: where ot find output of System.out.println
>>
>>Sunil,
>> You are running on UNIX correct? The shell script takes one of a
>>number of
>>commands. If you launch it using the 'console' command then the
>>Wrapper will be
>>launched in the current shell and you will be able to see all of your
>>println messages
>>in the console just as if you had run Java manually. Another copy of
>>the console
>>output will show up in the wrapper.log file. You will have to look at
>>your
>>wrapper.conf to see where you have configured its location.
>>
>> When you run with the 'start' command however, the Wrapper is run
>>
>>
>as
>
>
>>a detached
>>daemon process and you will get the shell prompt back right after the
>>Wrapper is
>>launched. In this case, the console output is suppressed as it does
>>not have a place
>>to go. All of the output is still available in the wrapper.log file
>>just as above however.
>>
>> The logging done by your application should not have been affected
>>by the
>>Wrapper. How are you doing the logging? When running with the
>>
>>
>Wrapper
>
>
>>the
>>user directory of the JVM process is set to the location of the shell
>>script by default.
>>Is it possible that it is not in the location you are expecting?
>>
>>Cheers,
>>Leif
>>
>>Annam, Sunil wrote:
>>
>>
>>
>>
>>
>>>I was able to configure wrapper.conf and other files. Now when I do
>>>"pServer status" it says that "pServer service is running (27780)".
>>>
>>>When run independently, pServer logs activity in a log file and prints
>>>some statements using System.out.println on console. Running pServer
>>>thru wrapper does not create log file and no messages on console.
>>>
>>>Where should I look for System.out.println messages?
>>>
>>>Thanks,
>>>
>>>Sunil
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by: GNOME Foundation
>Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event.
>GNOME Users and Developers European Conference, 28-30th June in Norway
>http://2004/guadec.org
>_______________________________________________
>Wrapper-user mailing list
>Wra...@li...
>https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
>
>
|