首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在单个服务器上对Tomcat + terracotta进行会话聚类

在单个服务器上对Tomcat + terracotta进行会话聚类
EN

Stack Overflow用户
提问于 2012-07-03 04:26:52
回答 1查看 1.4K关注 0票数 0

我想在单个服务器上使用terracotta和2 tomcat进行会话聚类。(I)遵照下列指示:

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

这是我的tc-config.xml

代码语言:javascript
复制
<?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>

然后,当我尝试执行命令时:

代码语言:javascript
复制
/start-tc-server.sh -f ~/Terracotta/terracotta-3.6.2/tc-config.xml 

但我得到的错误信息如下:

致命Terracotta启动异常:

代码语言:javascript
复制
*******************************************************************************
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.
*******************************************************************************

什么意思

代码语言:javascript
复制
<web-application>sessionapp</web-application>

这是我的应用程序的连接路径吗?

有人能帮我解决这个问题,用tomcat + terracotta集群会话吗?

谢谢

EN

回答 1

Stack Overflow用户

发布于 2012-08-01 06:10:52

我绝不是兵马俑的权威,但据我所知,这里有两个问题:

  1. 您已经指定了在本地主机上运行的两个服务器,没有端口规范。两者都将尝试占用端口9510 (dso端口),这将导致一个问题。您需要指定不同的dso端口。
  2. 假设您确实修复了端口配置,那么您的两个服务器都在本地主机上运行,所以terracotta需要知道您要启动的服务器。使用此命令启动nodea: /start-tc-server.sh -f ~/Terracotta/terracotta-3.6.2/tc-config.xml -n nodea

同样适用于nodeb。看看这是否有帮助。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/11304455

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档