I have two server.
Server 1:
- install Terracotta.
- config tc-config.xml
Code:
<?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">
<servers>
<!-- Sets where the Terracotta server can be found. Replace the value of host with the server's IP address. -->
<server host="192.168.2.202" name="Server1" bind="192.168.2.202">
<data>/home/administrator/terracotta/server-data</data>
<logs>/home/administrator/terracotta/server-logs</logs>
<dso-port bind="192.168.2.202">9510</dso-port>
<jmx-port bind="192.168.2.202">9520</jmx-port>
<l2-group-port bind="192.168.2.202">9530</l2-group-port>
</server>
</servers>
<!-- Sets where the generated client logs are saved on clients. -->
<clients>
<logs>/home/administrator/terracotta/client-logs</logs>
</clients>
<tc-properties>
<property name="productkey.path" value="/home/administrator/Terracotta/terracotta-ee-3.6.2/terracotta-license.key" />
</tc-properties>
</tc:tc-config>
- copy terracotta-license.key
Server 2:
- Run Tomcat7
- Config conten.xml
Code:
<Context>
<Valve className="org.terracotta.session.TerracottaTomcat70xSessionValve" tcConfigUrl="192.168.2.202:9510"/>
</Context>
-copy terracotta-license.key to $TOMCAT/lib
-copy file session and runtime to /lib
Log start terracotta:administrator@tset:~/Terracotta/terracotta-3.6.2/bin$ ./start-tc-server.sh -f /home/administrator/Terracotta/terracotta-3.6.2/tc-config.xml
2012-06-22 11:31:07,921 INFO - Terracotta 3.6.2, as of 20120412-135519 (Revision 20065 by cruise@rh5vmo113.terracotta.lan from 3.6.2)
2012-06-22 11:31:08,298 INFO - Successfully loaded base configuration from file at '/home/administrator/Terracotta/terracotta-3.6.2/tc-config.xml'.
2012-06-22 11:31:08,339 INFO - Log file: '/home/administrator/terracotta/server-logs/terracotta-server.log'.
2012-06-22 11:31:11,062 INFO - Available Max Runtime Memory: 490MB
2012-06-22 11:31:13,367 INFO - JMX Server started. Available at URL[service:jmx:jmxmp://0.0.0.0:9520]
2012-06-22 11:31:19,087 INFO - Becoming State[ ACTIVE-COORDINATOR ]
2012-06-22 11:31:19,147 INFO - Terracotta Server instance has started up as ACTIVE node on 0:0:0:0:0:0:0:0:9510 successfully, and is now ready for work.
But when start tomcat the error:
Code:
2012-06-22 05:04:18,077 INFO - Terracotta Enterprise 3.6.2, as of 20120412-134224 (Revision 16702-20065 by cruise@rh5vmo112.terracotta.lan from 3.6.2)
2012-06-22 05:04:18,532 INFO - Successfully loaded base configuration from server at '192.168.2.202:9510'.
2012-06-22 05:04:18,609 INFO - Terracotta license loaded from resource terracotta-license.key
Capabilities: DCV2, authentication, ehcache, ehcache monitor, ehcache offheap, operator console, quartz, quartz manager, quartz where, roots, search, server array offheap, server striping, sessions
Date of Issue: 2012-05-30
Edition: FX
Expiration Date: 2012-09-30
License Number: Download Trial License - Accept
License Type: Trial
Licensee: Download Trial License - Accept
Max Client Count: 50
Product: Enterprise Suite
ehcache.maxOffHeap: 250G
terracotta.serverArray.maxOffHeap: 250G
2012-06-22 05:04:18,651 INFO - Successfully loaded base configuration from file at '/usr/local/liferay/tomcat-7.0.23/temp/tc-config6857860190747673364.xml'.
2012-06-22 05:04:18,680 INFO - Log file: '/home/administrator/terracotta/client-logsr/terracotta-client.log'.
2012-06-22 05:04:20,504 ERROR - An Enterprise client can not connect to an Opensource Server, Connection refused.
2012-06-22 05:04:20,504 INFO - L1 Exiting...
com.tc.exception.TCRuntimeException: Uncaught exception in stage
at com.tc.async.impl.StageImpl$WorkerThread.run(StageImpl.java:164)
Caused by: java.lang.RuntimeException: An Enterprise client can not connect to an Opensource Server, Connection refused.
at com.tc.object.handler.ClientCoordinationHandler.handleEvent(ClientCoordinationHandler.java:28)
at com.tc.async.impl.StageImpl$WorkerThread.run(StageImpl.java:145)
Please help me. Sorry for bad english
Thank.