[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]
Samples Installed... Now How to Run On Multiple Machines?  XML
Forum Index -> Terracotta for Web Sessions
Author Message
joereger

neo

Joined: 12/06/2006 09:41:44
Messages: 1
Offline

Hi!

The samples run successfully on a single machine... thanks for the great working making that so easy! I'm now trying to get them to run and cluster on multiple machines. I've installed Sessions on a second machine and edited the <server name="192.168.1.103"> line in tc-config.xml but the sample apps are not clustering. In the JMX console of each server I see the local clients but never the remote ones.

What are the steps required to run Sessions + Tomcat 5.5 + WAR across multiple machines, starting from the Terracotta Sessions distro (on Windows, if possible)?

Thanks,

Joe
gkeim

ophanim

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

Note that Configurator wasn't designed for this purpose so assuming that you are running the Terracotta server and web-containers with scripts that are based on the ones the Configurator uses...

There's some sort of problem specifying an IP address as the server name attribute. Set the server name attribute to some arbitrary, well, name and set the host attribute to the IP address:

<server name="host1" host="192.168.1.103">

Next, when you start your web-container you'll need to specify the following system property so the cookies are mapped to the server host's domain instead of the host itself:

-Dcom.terracotta.session.cookie.domain=.mydomain.lan

You will need to use URLs that specify the fully-qualified domain name of your web-container hosts:

http://host1.mydomain.lan:9081/Cart
http://host2.mydomain.lan:9081/Cart

Finally, you'll want to use a single browser to verify things are working because cookies aren't shared across browsers.

Note that use of a load-balancer would obviate the need to use the above system property since you would be concentrating access through a single host. Our Terracotta for Spring product includes a simple load-balancer in the webflow sample.



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

consul

Joined: 12/04/2006 13:08:21
Messages: 340
Offline

Hello joereger,

You can start the Terracotta Server on one of the machines using the following on the command line:

%TC_INSTALL_DIR%\sessions\bin\start-tc-server.bat -f <path-to-tc-config.xml>

The tc-config.xml for the samples can be found at %TC_INSTALL_DIR%\sessions\sandbox\ and the sample wars are located in %TC_INSTALL_DIR%\sessions\sandbox\tomcat5.5\9081 or 9082. You might have to copy these wars in your tomcat webapps directory if you haven't done so already.

Next you will need to start the Tomcat instances.
Please refer to our documentation here - http://www.terracotta.org/confluence/display/docs/Terracotta+Product+Documentation to start a Tomcat instance on two or more separate machines.

Regards,
Kunal Bhasin.

Regards,

Kunal Bhasin,
Terracotta, Inc.

Be a part of the Terracotta community: Join now!
 
Forum Index -> Terracotta for Web Sessions
Go to:   
Powered by JForum 2.1.7 © JForum Team