|
From: Annam, S. <sun...@ea...> - 2004-06-07 15:08:54
|
Leif,
Wrapper.debug=3Dtrue is enabled.
The first statement in my code is=20
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 =3D 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=3D/home/linux/mgateway
DEBUG | wrapper | 2004/06/07 08:30:06 | Command[2] :
-Djava.library.path=3D../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=3DpmP31wOrwbdgEDHy
DEBUG | wrapper | 2004/06/07 08:30:06 | Command[6] :
-Dwrapper.port=3D32001
DEBUG | wrapper | 2004/06/07 08:30:06 | Command[7] :
-Dwrapper.debug=3DTRUE
DEBUG | wrapper | 2004/06/07 08:30:06 | Command[8] :
-Dwrapper.use_system_time=3DTRUE
DEBUG | wrapper | 2004/06/07 08:30:06 | Command[9] :
-Dwrapper.version=3D3.1.0
DEBUG | wrapper | 2004/06/07 08:30:06 | Command[10] :
-Dwrapper.native_library=3Dwrapper
DEBUG | wrapper | 2004/06/07 08:30:06 | Command[11] :
-Dwrapper.cpu.timeout=3D10
DEBUG | wrapper | 2004/06/07 08:30:06 | Command[12] :
-Dwrapper.jvmid=3D1
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 |=20
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 |=20
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=3D/127.0.0.1,port=3D32001,localport=3D1369])
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 :=20
DEBUG | wrapperp | 2004/06/07 08:30:17 | read a packet STARTED :=20
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
//=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
=3D=3D=3D=3D
-----Original Message-----
From: Leif Mortenson [mailto:le...@ta...]=20
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=20
sending them to me
directly. It makes them searchable for others having the same problem=20
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 =3D System.getProperty("MG_HOME", "..") + "/";
>System.out.println("MG_HOME: " + mgHome);
> =20
>
That message should be showing up in the wrapper.log file regardless of=20
whether
or not the MG_HOME system property is being set correctly.
Could you set the wrapper.debug=3Dtrue property and then post the
generated
wrapper.log file for a single run. This will give me a lot more=20
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=3D/home/linux/pServer".
> =20
>
I am not clear exactly how you are specifying the location of the log=20
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=20
it to the JVM.
Environment variables are not visible from the JVM on their own:
set.MG_HOME=3D/home/linux/pServer
wrapper.java.additional.1=3D-DMG_HOME=3D%MG_HOME%
The first will set the environment variable and the second will define=20
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)".=20
> =20
>
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.
> =20
>
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=20
system. Look for
the Wrapper and its JVM.
The script that ships with the Wrapper can also be used to check the=20
status of
the Wrapper process by running it with the 'status' command.
Cheers,
Leif
>-----Original Message-----
>From: Leif Mortenson [mailto:le...@ta...]=20
>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=20
>number of
>commands. If you launch it using the 'console' command then the=20
>Wrapper will be
>launched in the current shell and you will be able to see all of your=20
>println messages
>in the console just as if you had run Java manually. Another copy of=20
>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=20
>Wrapper is
>launched. In this case, the console output is suppressed as it does=20
>not have a place
>to go. All of the output is still available in the wrapper.log file=20
>just as above however.
>
> The logging done by your application should not have been affected=20
>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=20
>script by default.
>Is it possible that it is not in the location you are expecting?
>
>Cheers,
>Leif
>
>Annam, Sunil wrote:
>
> =20
>
>>I was able to configure wrapper.conf and other files. Now when I do=20
>>"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?=20
>>
>>Thanks,
>>
>>Sunil
>>
>> =20
>>
>
> =20
>
|