[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
How to check logs  XML
Forum Index -> General Go to Page: 1, 2 Next 
Author Message
Aryaan

journeyman

Joined: 07/29/2008 17:10:02
Messages: 13
Offline

Hi
I am new to terracotta and trying to run some tests with weblogic on UNIX. My questiuon is how do we check logs and status of terracotta when there is no GUI support. I tried to server logs and statistics but they look like binary files.
Aryaan
hhuynh

cherubim

Joined: 06/16/2006 11:54:06
Messages: 761
Offline

There's quite good GUI support actually. Try bin/admin.sh.
gkeim

ophanim

Joined: 12/05/2006 10:22:37
Messages: 685
Location: Terracotta, Inc.
Offline

I think he means that the server host is headless. The server and client logs are just standard textual log files. Are you saying you can't determine their location?

Gary Keim (terracotta developer) Want to post to this forum? Join the Terracotta Community
Aryaan

journeyman

Joined: 07/29/2008 17:10:02
Messages: 13
Offline

I don't see any client log, Does that mean there is no client communicating with terracotta server. In tc-config.xml the location for the client log is specified with
<clients>
<logs>%(user.home)/terracotta/client-logs</logs>
</clients>
hhuynh

cherubim

Joined: 06/16/2006 11:54:06
Messages: 761
Offline

%(user.home)/terracotta/client-logs = ~/terracotta/client-logs

so look under your home folder. You'll see the client log there (of course only when your client ran correctly) You can feel free to change the path of the logs to anywhere you want also.

Even you operating on a headless box, you can run the Admin Console (bin/admin.sh) on your own box and connect to the server in another box. This will greatly help you look at the cluster while it's running (how many clients, what your shared objects look like, etc)
Aryaan

journeyman

Joined: 07/29/2008 17:10:02
Messages: 13
Offline

Ok
Let me post the tc-config.xml
************************************************************
<?xml version="1.0" encoding="UTF-8"?>

<tc:tc-config xmlns:tc="http://www.terracotta.org/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.terracotta.org/schema/terracotta-4.xsd">


<server host="113.128.128.220" name="terracotta_Server_01">
<data>%(user.home)/terracotta/server-data</data>
<logs>%(user.home)/terracotta/server-logs</logs>
<dso-port>9510</dso-port>
<jmx-port>9520</jmx-port>
</server>
</servers>


<clients>
<logs>%(user.home)/terracotta/client-logs</logs>
</clients>

<application>
<dso>

<instrumented-classes>
<!-- Start by including all classes for instrumentation.
<include>
<class-expression>com.sample.retailiconsole.aims.test..*</class-expression>
</include>

<exclude>weblogic..*</exclude>
<exclude>com.rsa..*</exclude>
</instrumented-classes>
<roots>
<root>
<field-name>com.sample.retailiconsole.aims.test.BooksSingleton._instance</field-name>
</root>
</roots>

<web-applications>
<web-application>olibweb</web-application>
</web-applications>
</dso>
</application>
/tc:tc-config>

Here's what I put in startWL script
TC_INSTALL_DIR=/usr/opt/terracotta-2.6.2
TC_CONFIG_PATH=$TC_INSTALL_DIR/tc-config-weblogic.xml
${TC_INSTALL_DIR}/bin/dso-env.sh -q
export JAVA_OPTS="$TC_JAVA_OPTS$JAVA_OPTS"

and Here's what I get when I start Weblogic Server
2008-07-30 11:15:51,844 INFO - Terracotta 2.6.2, as of 20080626-150605 (Revision 8952 by cruise@rh4mo0 from 2.6)
2008-07-30 11:15:53,555 INFO - Configuration loaded from the file at '/usr/opt/terracotta-2.6.2/tc-config-weblogic.xml'.
Starting Admin Server AdminServer in pre ...
INFO: Starting WeblogicAdmin with action START for pre : Wed Jul 30 11:16:00 CDT 2008
INFO: Server Process for AdminServer in pre is not running..
INFO: Server Process for AdminServer in pre not running ... Starting server
INFO: Started Weblogic server AdminServer in pre Successfully. PID 18786
INFO: Started Weblogic server AdminServer in pre Successfully.
INFO: Finished WeblogicAdmin for pre with status 0 : Wed Jul 30 11:17:13 CDT 2008
Admin Server in pre started successfully ..
Starting Managed Server pre_srv_01 in pre ...
INFO: Starting WeblogicAdmin with action START for pre : Wed Jul 30 11:17:13 CDT 2008
INFO: Server Process for pre_srv_01 in pre is not running..
INFO: Server Process for pre_srv_01 in pre not running ... Starting server
INFO: Started Weblogic server pre_srv_01 in pre Successfully. PID 19013
INFO: Started Weblogic server pre_srv_01 in pre Successfully.
INFO: Finished WeblogicAdmin for pre with status 0 : Wed Jul 30 11:19:08 CDT 2008
Starting Managed Server pre_srv_02 in pre ...
INFO: Starting WeblogicAdmin with action START for pre : Wed Jul 30 11:19:10 CDT 2008
INFO: Server Process for pre_srv_02 in pre is not running..
INFO: Server Process for pre_srv_02 in pre not running ... Starting server
INFO: Started Weblogic server pre_srv_02 in pre Successfully. PID 19224
INFO: Started Weblogic server pre_srv_02 in pre Successfully.
INFO: Finished WeblogicAdmin for pre with status 0 : Wed Jul 30 11:20:50 CDT 2008

*************************************************************
Looking at the message I assume weblogic is able to comminicate with terracotta but I don't see client logs which is bothering me.
I can not run admin tool because I have text only access to unix machines


tgautier

seraphim

Joined: 06/05/2006 12:19:26
Messages: 1781
Offline

Aryaan wrote:

I can not run admin tool because I have text only access to unix machines
 


The admin tool can run locally on any PC you might be using and connect to the server remotely over a JMX connection - so if you can connect to that unix machine over a TCP connection you should be able to connect to your server.

As for your logs, you need to look in the home directory of the user that is running the server process.
[WWW]
Aryaan

journeyman

Joined: 07/29/2008 17:10:02
Messages: 13
Offline

tgautier
I am able to connect to server on unix using Terracotta Administrator Console and it looks like client is not connecting with terracotta server. I am using weblogic 9.2 on sunOS. weblogic is configured to have admin server and two server instances pre_srv_01 and pre_srv_02. Server section of the tc-config-weblogic.xml is like
<servers>
<server host="113.256.128.220" name="113.256.128.220:9510">
<data>%(user.home)/terracotta/server-data</data>
<logs>%(user.home)/terracotta/server-logs</logs>
<dso-port>9510</dso-port>
<jmx-port>9520</jmx-port>
</server>
</servers>
and here is what I have added to admin server stratup script

TC_INSTALL_DIR=/usr/opt/terracotta-2.6.2
TC_CONFIG_PATH=$TC_INSTALL_DIR/tc-config-weblogic.xml
${TC_INSTALL_DIR}/bin/dso-env.sh -q
export JAVA_OPTS="$TC_JAVA_OPTS $JAVA_OPTS"

I don't see any exception but its not connected to Terracotta, another things which proves it is it doesn't generate client log on terracotta server machine. Do you see anything surprizing in the configuration

Thanks for the help

Aryaan


gkeim

ophanim

Joined: 12/05/2006 10:22:37
Messages: 685
Location: Terracotta, Inc.
Offline

The client logs will be on the client machine, relative to the location of the config file. You'll need to make sure the managed servers are being started with the proper Terracotta settings. Your admin server probably doesn't need to have Terracotta activated, but your managed servers do. Terracotta doesn't tightly integrate with the Weblogic Admin Server like you seem to think. Terracotta must be installed on each managed server host and each managed server needs to get the same Terracotta startup treatment that you're currently giving the admin server.

Gary Keim (terracotta developer) Want to post to this forum? Join the Terracotta Community
Aryaan

journeyman

Joined: 07/29/2008 17:10:02
Messages: 13
Offline

I changed startweblogic script file for managed servers but apparently its not able to resolve DSO_BOOT_JAR. Here's what I changed in startWeblogic
TC_INSTALL_DIR=/usr/opt/terracotta-2.6.2
TC_CONFIG_PATH=$TC_INSTALL_DIR/tc-config-weblogic.xml
${TC_INSTALL_DIR}/bin/dso-env.sh -q
JAVA_OPTIONS="$JAVA_OPTIONS $ADM_JAVA_OPTIONS $DEFAULT_JAVA_OPTIONS $TC_JAVA_OPTS"
and this is how I start Weblogic

nohup ${JAVA_HOME}/bin/java ${JAVA_VM} ${MEM_ARGS} $GC_OPTIONS $JAVA_OPTIONS -classpath $CLASSPATH -Dweblogic.Domain=$DMN_NAME -Dweblogic.Name=$SERVER_NAME
-Dbea.home=$BEA_HOME -Dweblogic.management.username=$ADMIN_USER -Dweblogic.management.password=$USER_PASSWORD -Dweblogic.ProductionModeEnabled=$STARTMODE -D
java.security.policy==$WL_HOME/server/lib/weblogic.policy -Dweblogic.management.discover=true weblogic.Server &

Console after weblogic startup
Starting Admin Server AdminServer in pre ...
INFO: Server Process for AdminServer in pre is not running..
INFO: Server Process for AdminServer in pre not running ... Starting server
INFO: Started Weblogic server AdminServer in pre Successfully. PID 18763
INFO: Started Weblogic server AdminServer in pre Successfully.
INFO: Finished WeblogicAdmin for pre with status 0 : Thu Jul 31 13:26:12 CDT 2008
Admin Server in pre started successfully ..
Starting Managed Server pre_srv_01 in pre ...
INFO: Starting WeblogicAdmin with action START for pre : Thu Jul 31 13:26:12 CDT 2008
2008-07-31 13:26:14,274 INFO - Terracotta 2.6.2, as of 20080626-150605 (Revision 8952 by cruise@rh4mo0 from 2.6)
2008-07-31 13:26:15,811 INFO - Configuration loaded from the file at '/usr/opt/terracotta-2.6.2/tc-config-weblogic.xml'.
INFO: Server Process for pre_srv_01 in pre is not running..
INFO: Server Process for pre_srv_01 in pre not running ... Starting server
INFO: Started Weblogic server pre_srv_01 in pre Successfully. PID 18979
INFO: Started Weblogic server pre_srv_01 in pre Successfully.
INFO: Finished WeblogicAdmin for pre with status 0 : Thu Jul 31 13:28:42 CDT 2008
Starting Managed Server pre_srv_02 in pre ...
INFO: Starting WeblogicAdmin with action START for pre : Thu Jul 31 13:28:44 CDT 2008
2008-07-31 13:28:46,265 INFO - Terracotta 2.6.2, as of 20080626-150605 (Revision 8952 by cruise@rh4mo0 from 2.6)
2008-07-31 13:28:47,881 INFO - Configuration loaded from the file at '/usr/opt/terracotta-2.6.2/tc-config-weblogic.xml'.
INFO: Server Process for pre_srv_02 in pre is not running..
INFO: Server Process for pre_srv_02 in pre not running ... Starting server
INFO: Started Weblogic server pre_srv_02 in pre Successfully. PID 19266
INFO: Started Weblogic server pre_srv_02 in pre Successfully.
INFO: Finished WeblogicAdmin for pre with status 0 : Thu Jul 31 13:30:56 CDT 2008


Regrads
Aryaan

Aryaan

journeyman

Joined: 07/29/2008 17:10:02
Messages: 13
Offline

Finally it started working but some more environment variables needed to set.
DSO_BOOT_JAR_NAME=dso-boot-hotspot_solaris_150_13.jar
TC_SERVER=113.256.128.220
DSO_BOOT_JAR="$TC_INSTALL_DIR/lib/dso-boot/$DSO_BOOT_JAR_NAME"
TC_JAVA_OPTS="-Xbootclasspath/p:$DSO_BOOT_JAR -Dtc.install-root=$TC_INSTALL_DIR"
TC_JAVA_OPTS="$TC_JAVA_OPTS -Dtc.config=$TC_CONFIG_PATH"
TC_JAVA_OPTS="$TC_JAVA_OPTS -Dtc.server=$TC_SERVER"

Thanks for the help

Regards
Aryaan
tgautier

seraphim

Joined: 06/05/2006 12:19:26
Messages: 1781
Offline

Just curious, the dso-env.sh script was supposed to set these settings, did you find that it was not working correctly?
[WWW]
gkeim

ophanim

Joined: 12/05/2006 10:22:37
Messages: 685
Location: Terracotta, Inc.
Offline

This is what you need:

. ${TC_INSTALL_DIR}/bin/dso-env.sh -q

^ Note the dot

Gary Keim (terracotta developer) Want to post to this forum? Join the Terracotta Community
tgautier

seraphim

Joined: 06/05/2006 12:19:26
Messages: 1781
Offline

gkeim wrote:
This is what you need:

. ${TC_INSTALL_DIR}/bin/dso-env.sh -q

^ Note the dot
 


Maybe we should make it more explicit:
source ${TC_INSTALL_DIR}/bin/dso-env.sh -q

[WWW]
Aryaan

journeyman

Joined: 07/29/2008 17:10:02
Messages: 13
Offline

. didn't work. It got executed without . but then it didn't set those env variables.
 
Forum Index -> General Go to Page: 1, 2 Next 
Go to:   
Powered by JForum 2.1.7 © JForum Team