Author |
Message |
|
Thanks!
|
|
|
Is there any way to know the size about the session data?
|
|
|
Yes
|
|
|
Hi kbhasin,
it is very exciting that my problem is solved now,because I add this file art.xml file into %JETTY_HOME%/contexts ,and it works now.
thanks for your help.
Joy.
|
|
|
By the way, I am curious: how did you identify that the sessions are being clustered between 52 and 13 but not 12?
first,I run my terracotta server(192.168.0.12) and clients(12,52,13),at first the session data is null .then I access http://192.168.0.12:8080/art and I can success to access it can also can success to connect to the servers(192.168.0.12),but the sessions data is null still.
second ,I shutdown the client of 192.168.0.12,then access http://192.168.0.13:8080/art,the servers can success to shared the session data,the same as another client of 192.168.0.52.
Is this way has something wrong?
|
|
|
May I input any image in this forum??If can,I want to show you the terracotta server's admin console .below is the output of the server's console:
Code:
2007-08-03 14:20:25,335 [TCComm Selector Thread 1 (listen 0:0:0:0:0:0:0:0:9510)] INFO com.tc.net.protocol.transport.ServerMessageTransport - ConnectionID(0.c5c4efb1f7da4d708ba1cabb09d90de5): Attaching new connection: com.tc.net.core.TCConnectionJDK14@4926325: connected: true, closed: false local=192.168.0.12:9510 remote=192.168.0.13:58387 connect=[Fri Aug 03 14:20:25 HKT 2007] idle=72ms
2007-08-03 14:20:25,375 [WorkerThread(jmxremote_tunnel_stage,0)] INFO com.tc.management.remote.protocol.terracotta.ClientTunnelingEventHandler - L1[ChannelID=[0]] notified us that their JMX server is now available
2007-08-03 14:20:25,399 [WorkerThread(client_handshake_stage,0)] INFO com.tc.objectserver.handshakemanager.ServerClientHandshakeManager - Client connected ChannelID=[0]
2007-08-03 14:22:43,763 [TCComm Selector Thread 1 (listen 0:0:0:0:0:0:0:0:9510)] INFO com.tc.net.protocol.transport.ServerMessageTransport - ConnectionID(1.c5c4efb1f7da4d708ba1cabb09d90de5): Attaching new connection: com.tc.net.core.TCConnectionJDK14@17243666: connected: true, closed: false local=192.168.0.12:9510 remote=192.168.0.12:38579 connect=[Fri Aug 03 14:22:43 HKT 2007] idle=50ms
2007-08-03 14:22:43,775 [WorkerThread(jmxremote_tunnel_stage,0)] INFO com.tc.management.remote.protocol.terracotta.ClientTunnelingEventHandler - L1[ChannelID=[1]] notified us that their JMX server is now available
2007-08-03 14:22:43,812 [WorkerThread(client_handshake_stage,0)] INFO com.tc.objectserver.handshakemanager.ServerClientHandshakeManager - Client connected ChannelID=[1]
2007-08-03 14:47:14,772 [TCComm Selector Thread 1 (listen 0:0:0:0:0:0:0:0:9510)] INFO com.tc.net.protocol.transport.ServerMessageTransport - ConnectionID(2.c5c4efb1f7da4d708ba1cabb09d90de5): Attaching new connection: com.tc.net.core.TCConnectionJDK14@4621250: connected: true, closed: false local=192.168.0.12:9510 remote=192.168.0.52:4978 connect=[Fri Aug 03 14:47:14 HKT 2007] idle=49ms
2007-08-03 14:47:14,786 [WorkerThread(jmxremote_tunnel_stage,0)] INFO com.tc.management.remote.protocol.terracotta.ClientTunnelingEventHandler - L1[ChannelID=[2]] notified us that their JMX server is now available
2007-08-03 14:47:14,804 [WorkerThread(client_handshake_stage,0)] INFO com.tc.objectserver.handshakemanager.ServerClientHandshakeManager - Client connected ChannelID=[2]
thanks.
|
|
|
Hi kbhasin,
all the three (52,12 and 13) are pointing to 192.168.0.12 Terracotta Server.
make sure that the load balancer is configured to distribute load between all three clients.
how to do that?
|
|
|
Hi,
Now the example Cart can work well between my three terracotta clients.
but my application of art.war doesn't work.It means that I put my application into two clients of 192.168.0.52 and 192.168.0.13 and they works well,while it doesn't works that means can't shared the session data when it run on 192.168.0.12 on which the terracotta server run.
would you mind give me some advise or something else?
thanks .
Joy.
|
|
|
Hi tgautier,
thanks for your advise,we will do this while we solve this problem and build up our environment.
Joy.
|
|
|
Hi kbhasin,
I'm sorry that I have make a mistake to show my command that use to run my terracotta client,this is the correct command for the 192.168.0.52:
Code:
java -Xbootclasspath/p:"D:\caizhe\software\terracotta-2.4.0\bin\..\lib\dso-boot\dso-boot-hotspot_win32_150_11.jar" -Dtc.install-root="D:\caizhe\software\terracotta-2.4.0\bin\.." -Dtc.config="192.168.0.12:9510" -jar start.jar contrib/terracotta/src/main/resources/jetty.xml
btw,thanks for give me the example to specify two terracotta server like this
-Dtc.config =192.168.0.12:9510,192.168.0.5:9510
thanks.
|
|
|
Hi ,
I run two terracotta servers(192.168.0.5 and 192.168.0.12) on two CentOS,and run two terracotta clients(192.168.0.12 ,192.168.0.13 ) on three CentOS ,while another terracotte client(192.168.0.52) run on windows xp.Here is my tc-config-jetty.xml :
Code:
<servers>
<server host="192.168.0.5" name="gz-samba">
<dso-port>9510</dso-port>
<jmx-port>9520</jmx-port>
<data>/var/data/terracotta/jetty/gz-samba </data>
<logs>/var/log/terracotta/jetty/gz-samba</logs>
<l2-group-port>9530</l2-group-port>
<dso>
<persistence>
<mode>permanent-store</mode>
</persistence>
</dso>
</server>
<server host="192.168.0.12" name="dev02">
<dso-port>9510</dso-port>
<jmx-port>9520</jmx-port>
<data>/var/data/terracotta/jetty/dev02</data>
<logs>/var/log/terracotta/jetty/dev02</logs>
<l2-group-port>9530</l2-group-port>
<dso>
<persistence>
<mode>permanent-store</mode>
</persistence>
</dso>
</server>
<ha>
<mode>networked-active-passive</mode>
<networked-active-passive>
<election-time>5</election-time>
</networked-active-passive>
</ha>
</servers>
<clients>
<logs>%(user.home)/terracotta/client-logs</logs>
<modules>
<module name="clustered-jetty-6.1" version="1.0.0"/>
<module name="clustered-apache-struts-1.1" version="1.1.0"/>
</modules>
</clients>
<web-applications>
<web-application>Cart</web-application>
</web-applications>
then I run my tc_server(192.168.0.12) with this command:
Code:
#!/bin/sh
rm -rf /var/data/terracotta/jetty/*
/usr/local/terracotta/bin/start-tc-server.sh -f /usr/local/terracotta/conf/tc-config-jetty.xml -n dev02
and I run my tc_client(192.168.0.13) with this command,the same as the 192.168.0.12
Code:
#!/bin/sh
TERRACOTTA_HOME="/usr/local/terracotta"
JETTY_HOME="/usr/local/jetty"
export TERRACOTTA_HOME JETTY_HOME
java -Xbootclasspath/p:$TERRACOTTA_HOME/lib/dso-boot/dso-boot-hotspot_linux_150_11.jar -Dtc.install-root=$TERRACOTTA_HOME -Dtc.config=192.168.0.12:9510 -jar $JETTY_HOME/start.jar $JETTY_HOME/etc/jetty.xml
and then I run another tc_client who run on windows xp(192.168.0.52) with this command:
Code:
java -Xbootclasspath/p:"D:\caizhe\software\terracotta-2.4.0\bin\..\lib\dso-boot\dso-boot-hotspot_win32_150_11.jar" -Dtc.install-root="D:\caizhe\software\terracotta-2.4.0\bin\.." -Dtc.config="192.168.0.5:9510" -jar start.jar contrib/terracotta/src/main/resources/jetty.xml
Here is my problem:if I access this URL(http://192.168.0.52:9081/Cart),the terracotta server works well,that is my client who run on 192.168.0.52 whose operator system is windows xp can connect to the terracotta server and the server can shared this client's session data.while I access another URL(http://192.168.0.13:8080/Cart),althought I can access this URL and can success to connect to the same terracotta server which 192.168.0.52 connected,the terracotta server could not shared 192.168.0.13's sessions data.
please help me.
thank in advance.
Joy
|
|
|
OK,thanks.
|
|
|
Hi gkeim,
this is my solution:
config the servers like this:
Code:
<servers>
<server host="192.168.0.12" name="server1">
<dso-port>9510</dso-port>
<jmx-port>9520</jmx-port>
<data>data/server-data</data>
<logs>logs/server-logs</logs>
<l2-group-port>9530</l2-group-port>
<dso>
<persistence>
<mode>permanent-store</mode>
</persistence>
</dso>
</server>
<!--<server host="192.168.0.13" name="server2">
<dso-port>9510</dso-port>
<jmx-port>9520</jmx-port>
<data>data/server-data</data>
<logs>logs/server2-logs</logs>
<l2-group-port>9530</l2-group-port>
<dso>
<persistence>
<mode>permanent-store</mode>
</persistence>
</dso>
</server>-->
<ha>
<mode>networked-active-passive</mode>
<networked-active-passive>
<election-time>5</election-time>
</networked-active-passive>
</ha>
</servers>
config the clients like this:
Code:
<system>
<configuration-model>production</configuration-model>
</system>
<servers>
<server host="192.168.0.12">
<data>data/server-data</data>
<logs>logs/server-logs</logs>
</server>
</servers>
and then modify this file start.sh like this:
Code:
TC_SERVER=192.168.0.12
TC_CONFIG_PATH="${TC_SERVER}:9510"
. "${TC_INSTALL_DIR}"/bin/dso-env.sh -q
but now I got into another problem that after I use the jdk6,my terracotta client can not success to connect to the terracotta server of 192.168.0.12
why?
thanks.
Joy
|
|
|
my problem is solved.
thanks.
|
|
|
Hi zeeiyer,
althought I have been config the mode and set the config java-system property as -Dtc.config=192.168.0.12:9510 for my terracotta client,it sounds
like doesn't work.
Can you give me some example?
192.168.0.12 is a terracotta server,and 192.168.0.52 is a terracotta client.
thanks
Joy
|
|
|