[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]
Messages posted by: masterpc  XML
Profile for masterpc -> Messages posted by masterpc [2]
Author Message
I used these URLs for test.

I'm planning to use a load balancer for production level.

It can be a problem?


Thanks.

Hi,
I'm a newbie to terracotta.
I'm trying to deploy terracotta for session clustering for two tomcats.

Each tomcat is installed on a different server.

My web app is based on Spring and Acegi(http://www.acegisecurity.org/) framework.

All that I want is sharing user information between two tomcats.
However,
when I tried to test like..
http://192.168.1.150:8080/login.jsp
http://192.168.1.160:8080/login.jsp

Each tomcat created an individual session for each connection.
Therefore, even if I logged in on 192.168.1.150, there was no information about logged user on 192.168.1.160.

What shoud I do for solving this problem?

The procedures I have done
--
1. installed terracotta on /opt/terracotta on each server

2. /etc/bashrc

export JAVA_HOME=/usr/local/jdk1.6.0_01
export PATH=$JAVA_HOME/bin:$PATH

export TC_INSTALL_DIR=/opt/terracotta
export TC_HOME=/opt/terracotta
 


3. created dso-boot jar on each server

4. tc-config-tomcat.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-3.xsd">
<servers>
<server host="192.168.1.150">
<data>/opt/terracotta/server-data</data>
<logs>/opt/terracotta/server-logs</logs>
</server>
</servers>
<clients>
<logs>/opt/terracotta/client-logs</logs>
</clients>
<application>
<dso>
<instrumented-classes>
<include>
<class-expression>*..*</class-expression>
</include>
<exclude>org.apache.coyote..*</exclude>
<exclude>org.apache.catalina..*</exclude>
<exclude>org.apache.jasper..*</exclude>
<exclude>org.apache.tomcat..*</exclude>
</instrumented-classes>

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


5. $TOMCAT_HOME/bin/tcstartup.sh on 192.168.1.150

TC_SERVER=localhost
TC_CONFIG_PATH="${TC_SERVER}:9510"
. $TC_HOME/bin/dso-env.sh -q
export JAVA_OPTS="${TC_JAVA_OPTS}"
./startup.sh
 


6. $TOMCAT_HOME/bin/tcstartup.sh on 192.168.1.160

TC_SERVER=192.168.1.150
TC_CONFIG_PATH="${TC_SERVER}:9510"
. $TC_HOME/bin/dso-env.sh -q
export JAVA_OPTS="${TC_JAVA_OPTS}"
./startup.sh
 


7. run terracotta on 192.168.1.150
$TC_INSTALL_DIR/bin/start-tc-server.sh -f tc-config-tomcat.xml

8. run each tomcat
$TOMCAT_HOME/bin/tcstartup.sh on 192.168.1.150
$TOMCAT_HOME/bin/tcstartup.sh on 192.168.1.160

Any idea?

Thanks in advance.
 
Profile for masterpc -> Messages posted by masterpc [2]
Go to:   
Powered by JForum 2.1.7 © JForum Team