Question

My application uses terracotta/ehcache for hibernate 2nd level cache as well as 'custom' application caching, when running the terracotta server locally and connecting to it with the developer console I can see my application and the various caches and stats. When I deploy the same setup to a different server, it seems to be working but when I connect the developer console to the remote server, I am able to see a server in the server array under the Topology node, but I do not have a 'My Application' node as I do when running it locally. Is this correct, are you not able to see this when connecting remotely or have a messed up the configuration?

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

enter image description here

enter image description here

Was it helpful?

Solution 2

Thank you for all the help, I have managed to get it working, it seems a little patience is the answer. It takes quite a while before the application shows up (over a minute!). Sorry if I wasted anyone's time and thanks again for trying to help

OTHER TIPS

In my case terracotta server restart did help with a similar symptoms. I have checked your configuration...nothing special there. Just in case I'm attaching my config for your reference (I use mirror group). Also I noticed that you use <configuration-model>production</configuration-model> which I don't.

Try using my config (that works without issues you described), here it is:

<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>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top