0

テラコッタと 2 つの tomcat を単一サーバーでセッション クラスタリングしたいと考えています。私は次の指示から:

http://artur.ejsmont.org/blog/content/how-to-setup-terracotta-session-clustering-and-replication-for-apache-tomcat-6

これは私の tc-config.xml です

<?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>
   <server name="nodea" host="localhost">
     <data>/home/meruvian/mydatafolder</data>
     <logs>/home/meruvian/mylogsfolder</logs>
     <l2-group-port>9530</l2-group-port>
   </server>
   <server name="nodeb" host="localhost">
     <data>/home/meruvian/mydatafolder</data>
     <logs>/home/meruvian/mylogsfolder</logs>
     <l2-group-port>9530</l2-group-port>
   </server>
 </servers>
 <clients>
   <logs>/var/log/myclientlogsfolder</logs>
       <modules>
       <module name="tim-tomcat-6.0" version="2.2.0"/>
   </modules>
 </clients>
 <application>
   <dso>
     <instrumented-classes>
       <include>
         <class-expression>*..*</class-expression>
       </include>
       <exclude>org.apache.coyote..*</exclude>
       <exclude>org.apache.catalina..*</exclude>
       <exclude>org.apache.jasper..*</exclude>
       <exclude>org.apache.tomcat..*</exclude>
     </instrumented-classes>
     <web-applications>
       <web-application>sessionapp</web-application>
     </web-applications>
    </dso>
 </application>
</tc:tc-config>

次に、コマンドを実行しようとすると:

/start-tc-server.sh -f ~/Terracotta/terracotta-3.6.2/tc-config.xml 

しかし、次のようなエラーメッセージが表示されます:

Fatal Terracotta 起動例外:

*******************************************************************************
You have not specified a name for your Terracotta server, and there are 2 servers defined in the Terracotta configuration file. The script can not automatically choose between the following server names: nodea, nodeb. Pass the desired server name to the script using the -n flag.
*******************************************************************************

何の意味

<web-application>sessionapp</web-application>

私のアプリのコンテキストパスですか?

tomcat + terracotta でセッションをクラスター化するために、誰でもこれを解決するのを手伝ってくれますか?

ありがとう

4

1 に答える 1

0

私は決してテラコッタの権威ではありませんが、私によると、ここには2つの問題があります。

  1. ポート指定なしで、ローカルホストで実行されている2台のサーバーを指定しました。どちらもポート9510(dsoポート)を使用しようとするため、問題が発生します。別のdsoポートを指定する必要があります。
  2. ポート構成を修正すると仮定すると、両方のサーバーがローカルホストで実行されているため、terracottaは起動しようとしているサーバーを認識する必要があります。nodeaを開始するには、次のコマンドを使用します。

    /start-tc-server.sh -f ~/Terracotta/terracotta-3.6.2/tc-config.xml -n nodea
    

nodebについても同様です。それが役立つかどうかを確認してください。

于 2012-08-01T06:10:52.320 に答える