Sei sulla pagina 1di 5

1 CONFIGURING TERRACOTTA

1.1 TERRACOTTA HIGH AVAILABILITY


Terracotta Server is adopted to maintain the distributed cache for Integration Server Cluster. One
Terracotta Server is installed at each node within the cluster. These Terracotta Servers are configured
in a mirror group as shown in the following diagram.

Both Terracotta Servers are up and running at the same time, however, only 1 Server is in active mode
and other is in passive mode. Cached data is synchronized between both servers in real-time. When
active Terracotta Server is down, the passive one will turn into active mode immediately without losing
any data.

1.2 CONFIGURING JAVA_HOME PATH


1. Log on the Integration servers as <webMethods user>.
2. Go to user’s home directory.
3. Edit .bashrc and add the following line:
export JAVA_HOME=/opt/wm912/jvm/jvm

4. Save the file.

1.3 ADD TERRACOTTA LICENSE KEY


Add a valid Terracotta license key to all Integration Servers and Terracotta Servers.
Copy /opt/wm912/software/license/terracotta-license.key to the following folders
 /opt/wm912/Terracotta
 /opt/wm912/common/conf

1.4 CONFIGURE TERRACOTTA SERVER


1. Create tc-config.xml as per the sample below:

<?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">

<tc-properties>

<property value="true" name="ehcache.storageStrategy.dcv2.perElementTTITTL.enabled"/>

<property value="1024" name="logging.maxLogFileSize"/>

</tc-properties>

<servers>

<mirror-group group-name="HipUATGroup" election-time="5">

<server host="lthip01" name="LTHIP01" bind="lthip01">

<data>/opt/wm912/Terracotta/server-data</data>

<logs>/opt/wm912/Terracotta/server-logs</logs>

<index>/opt/wm912/Terracotta/server-index</index>

<tsa-port bind="lthip01">8510</tsa-port>

<jmx-port bind="lthip01">8520</jmx-port>

<tsa-group-port bind="lthip01">8530</tsa-group-port>

<management-port bind="lthip01">8540</management-port>

<authentication/>

<http-authentication>

<user-realm-file>/opt/wm912/Terracotta/realm.properties</user-realm-file>

</http-authentication>

<dataStorage size="2g">

<offheap size="2g"/>

<hybrid/>
</dataStorage>

</server>

<server host="lthip03" name="LTHIP03" bind="lthip03">

<data>/opt/wm912/Terracotta/server-data</data>

<logs>/opt/wm912/Terracotta/server-logs</logs>

<index>/opt/wm912/Terracotta/server-index</index>

<tsa-port bind="lthip03">8510</tsa-port>

<jmx-port bind="lthip03">8520</jmx-port>

<tsa-group-port bind="lthip03">8530</tsa-group-port>

<management-port bind="lthip03">8540</management-port>

<authentication/>

<http-authentication>

<user-realm-file>/opt/wm912/Terracotta/realm.properties</user-realm-file>

</http-authentication>

<dataStorage size="2g">

<offheap size="2g"/>

<hybrid/>

</dataStorage>

</server>

</mirror-group>

<update-check>

<enabled>false</enabled>

<period-days>10</period-days>

</update-check>

<garbage-collection>

<enabled>true</enabled>

<verbose>false</verbose>

<interval>3600</interval>

</garbage-collection>

<restartable enabled="false"/>
<client-reconnect-window>120</client-reconnect-window>

</servers>

<clients>

<logs>logs-%i</logs>

</clients>

</tc:tc-config>

2. Copy tc-config.xml to the /opt/wm912/Terracotta/server/bin

1.5 START AND SHUTDOWN TERRACOTTA


1. Start Terracotta Server on first node.
cd /opt/wm912/Terracotta/bin

nohup ./start-tc-server.sh –n <name> -f tc-config.xml &

Note: <name> is defined in tc-config.xml. (e.g. TSA01)

To view the startup log, navigate /opt/wm912/Terracotta/server-logs/terracotta-server.log.


You must see the following output indicating the state “ACTIVE-COORDINATOR”. See below
example:

2016-07-10 13:29:04,309 [main] INFO com.tc.l2.state.StateManagerImpl - Becoming State[ ACTIVE-


COORDINATOR ]

2016-07-10 13:29:04,309 [main] INFO com.terracottatech.console - Becoming State[ ACTIVE-COORDINATOR ]

2016-07-10 13:29:04,319 [main] INFO tc.operator.event - NODE : wmis01 Subsystem: CLUSTER_TOPOLOGY


Message: Moved to ACTIVE-COORDINATOR

2. Start Terracotta Server on second node.


cd /opt/wm912/Terracotta/bin

nohup ./start-tc-server.sh –n <name> -f tc-config.xml &

Note: <name> is defined in tc-config.xml (e.g. TSA01)

To view the startup log, navigate /opt/wm912/Terracotta/server-logs/terracotta-server.log.


You must see the following output indicating the state “PASSIVE-STANDBY”. See below
example:

2016-07-10 16:22:54,958 [WorkerThread(l2_state_message_handler_stage, 0)] INFO


com.tc.l2.state.StateManagerImpl - Moved to State[ PASSIVE-STANDBY ]
2016-07-10 16:22:54,958 [WorkerThread(l2_state_message_handler_stage, 0)] INFO
com.terracottatech.console - Moved to State[ PASSIVE-STANDBY ]

20165-07-10 16:22:54,958 [WorkerThread(l2_state_message_handler_stage, 0)] INFO tc.operator.event - NODE


: wmis02 Subsystem: CLUSTER_TOPOLOGY Message: Moved to PASSIVE-STANDBY

3. Shutdown Terracotta Server.


cd /opt/wm912/Terracotta/bin

./stop-tc-server.sh –n <name> -f tc-config.xml

Potrebbero piacerti anche