配置错误

时间:2014-07-11 12:38:22

标签: redhat terracotta

我正在尝试运行Terracotta服务器,而下面是配置文件。

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

然后我得到了以下错误。

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

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

任何人都可以帮我解决这个问题。

1 个答案:

答案 0 :(得分:3)

您正在运行Terracotta 3.7,但您的配置文件是为Terracotta 4.x设置的。升级Terracotta,或更新您的tc-config.xml。

看看documentation for configuring Terracotta 3.x。特别是:

  • tsa-port应该是dso-port
  • tsa-group-port应为l2-group-port
  • dataStorage应该在dso-&gt; persistence

旧版Terracotta还有其他一些细微差别,因此请熟悉适合您版本的结构,以确保完全按照自己的意愿配置。