Search code examples
redhatterracotta

Configuration Error


Im Trying to Run Terracotta server and Below is the Configuration file.

<?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-9.xsd">
      <servers>
        <server host="localhost" name="master">
          <!-- Specify the path where the server should store its data. -->
          <data>/x01/terracotta/masterServerData</data>
           <!-- Specify the port where the server should listen for client 
           traffic. -->
           <tsa-port>9510</tsa-port>
           <jmx-port>9520</jmx-port>
           <tsa-group-port>9530</tsa-group-port>
           <!-- Enable BigMemory on the server. -->
           <dataStorage size="4g">
              <offheap size="2g"/> 
              <!-- Hybrid storage is optional. -->
              <hybrid/> 
           </dataStorage>
         </server>
        <!-- Add the restartable element for Fast Restartability (optional). -->
        <restartable enabled="true"/>
      </servers>
      <clients>
        <logs>logs-%i</logs>
      </clients>
    </tc:tc-config>

Then I got Following Error.

Fatal Terracotta startup exception:

*******************************************************************************
The configuration data in the base configuration from file at '/x01/terracotta/terracotta-3.7.7/tc-config.xml' does not obey the Terracotta schema:
  [0]: Line 11, column 12: Expected elements 'authentication http-authentication index logs data-backup statistics dso-port jmx-port l2-group-port dso security' instead of 'tsa-port' here in element server
  [1]: Line 13, column 12: Expected elements 'authentication http-authentication index logs data-backup statistics dso-port l2-group-port dso security' instead of 'tsa-group-port' here in element server
  [2]: Line 15, column 12: Expected elements 'authentication http-authentication index logs data-backup statistics dso-port l2-group-port dso security' instead of 'dataStorage' here in element server
  [3]: Line 22, column 9: Expected elements 'server mirror-groups ha update-check' instead of 'restartable' here in element servers

*******************************************************************************

Can Anyone Please help me with this.


Solution

  • You are running Terracotta 3.7, but your configuration file is setup for Terracotta 4.x. Either upgrade Terracotta, or update your tc-config.xml.

    Take a look at the documentation for configuring Terracotta 3.x. In particular:

    • tsa-port should be dso-port
    • tsa-group-port should be l2-group-port
    • dataStorage should be under dso->persistence

    There are several other subtle differences in the older version of Terracotta so get familiar with the appropriate structure for your version to make sure you get it configured exactly as you want.