我的应用程序使用terracotta / ehcache进行休眠二级缓存以及“自定义”应用程序缓存,当在本地运行terracotta服务器并使用开发人员控制台连接它时,我可以看到我的应用程序以及各种缓存和统计信息。当我将相同的设置部署到不同的服务器时,它似乎正在工作但是当我将开发人员控制台连接到远程服务器时,我能够在拓扑节点下的服务器阵列中看到服务器,但我没有“我的应用程序”节点就像我在本地运行时一样。这是正确的,你是否在远程连接或搞乱配置时看不到这个?
<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-6.xsd">
<system>
<configuration-model>production</configuration-model>
</system>
<servers>
<server host="xxx.xxx.xxx.xxx" name="MyWorkLife Test">
<data>/home/mwltest/Terracotta/server-data</data>
<logs>/home/mwltest/Terracotta/server-logs</logs>
<index>/home/mwltest/Terracotta/server-index</index>
<statistics>/home/mwltest/Terracotta/server-statistics</statistics>
<dso-port bind="127.0.0.1">9510</dso-port>
<jmx-port bind="xxx.xxx.xxx.xxx">9520</jmx-port>
<!-- <authentication/> -->
<dso>
<client-reconnect-window>120</client-reconnect-window>
<persistence>
<mode>permanent-store</mode>
</persistence>
<garbage-collection>
<enabled>true</enabled>
<verbose>false</verbose>
<interval>3600</interval>
</garbage-collection>
</dso>
</server>
<update-check>
<enabled>false</enabled>
</update-check>
</servers>
<clients>
<logs>logs-%i</logs>
</clients>
</tc:tc-config>
答案 0 :(得分:0)
在我的情况下,赤土陶器服务器重启确实有类似症状的帮助。我检查了你的配置......没什么特别的。以防我附加我的配置供您参考(我使用镜像组)。
另外我注意到你使用的是<configuration-model>production</configuration-model>
,我没有。
尝试使用我的配置(没有您描述的问题),这里是:
<tc:tc-config xsi:schemaLocation="http://www.terracotta.org/schema/terracotta-6.xsd" xmlns:tc="http://www.terracotta.org/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tc-properties>
<property name="l2.l1reconnect.enabled" value="true"/>
<property name="l2.l1reconnect.timeout.millis" value="5000"/>
<property name="sigar.enabled" value="false"/>
<property name="search.use.commit.thread" value="false"/>
<property name="search.lucene.use.ram.directory" value="true"/>
<property name="search.query.wait.for.txns" value="false"/>
<property name="logging.maxLogFileSize" value="100"/>
<property name="logging.maxBackups" value="10"/>
</tc-properties>
<servers>
<!--Sets where the Terracotta server can be found. Replace the value of host with the server's IP address.-->
<server host="xxx.myhost.com" name="server1">
<data>%(user.home)/terracotta/server1-data</data>
<logs>%(user.home)/terracotta/server1-logs</logs>
<index>%(user.home)/terracotta/server1-index</index>
<statistics>%(user.home)/terracotta/statistics1</statistics>
<dso>
<client-reconnect-window>120</client-reconnect-window>
<persistence>
<!--<mode>permanent-store</mode>-->
<mode>temporary-swap-only</mode>
<!--<offheap>
<enabled>false</enabled>
<maxDataSize>450m</maxDataSize>
</offheap>-->
</persistence>
<garbage-collection>
<enabled>true</enabled>
<verbose>false</verbose>
<interval>300</interval>
</garbage-collection>
</dso>
<dso-port>9510</dso-port>
<jmx-port>9520</jmx-port>
<l2-group-port>9530</l2-group-port>
</server>
<server host="yyy.myhost.com" name="server2">
<data>%(user.home)/terracotta/server2-data</data>
<logs>%(user.home)/terracotta/server2-logs</logs>
<index>%(user.home)/terracotta/server2-index</index>
<statistics>%(user.home)/terracotta/statistics2</statistics>
<dso>
<client-reconnect-window>120</client-reconnect-window>
<persistence>
<!--<mode>permanent-store</mode>-->
<mode>temporary-swap-only</mode>
<!--<offheap>
<enabled>false</enabled>
<maxDataSize>450m</maxDataSize>
</offheap>-->
</persistence>
<garbage-collection>
<enabled>true</enabled>
<verbose>false</verbose>
<interval>300</interval>
</garbage-collection>
</dso>
<dso-port>9510</dso-port>
<jmx-port>9520</jmx-port>
<l2-group-port>9530</l2-group-port>
</server>
<mirror-groups>
<mirror-group group-name="groupA">
<members>
<member>server1</member>
<member>server2</member>
</members>
<ha>
<mode>networked-active-passive</mode>
<networked-active-passive>
<election-time>5</election-time>
</networked-active-passive>
</ha>
</mirror-group>
</mirror-groups>
</servers>
<clients>
<!--<logs>%(user.home)/terracotta/client-logs/%D</logs>-->
<logs>%(user.home)/terracotta/client-logs/logs-%i.%D</logs>
</clients>
</tc:tc-config>
答案 1 :(得分:0)
感谢您的帮助,我已经设法让它工作,似乎有点耐心是答案。应用程序显示(超过一分钟!)需要一段时间。对不起,如果我浪费了任何人的时间,再次感谢您的帮助