Terracotta Server does not read config

66 views Asked by At

I want to evaluate clustered ehcache. For that purpose, I try to follow the official tutorial on https://www.ehcache.org/documentation/3.4/clustered-cache.html to setup a rather minimal terracota server on my local linux server.

I.e. I downloaded the ehcache-clsutered-3.10.0-kit, unpacked it and created a tc-server-config.xml in <path/to/terracotta/kit>/server/bin with the following content (minimal config directly from tutorial page):

<?xml version="1.0" encoding="UTF-8"?>
<tc-config xmlns="http://www.terracotta.org/config"
           xmlns:ohr="http://www.terracotta.org/config/offheap-resource">
  <plugins>
    <config>
      <ohr:offheap-resources>
        <ohr:resource name="primary-server-resource" unit="MB">128</ohr:resource>   
        <ohr:resource name="secondary-server-resource" unit="MB">96</ohr:resource>  
      </ohr:offheap-resources>
    </config>
  </plugins>
</tc-config>

I execture the skript via bash as follows:

cd <path/to/terracotta/kit>/server/bin
./start-tc-server.sh -f ./tc-config.xml

Unfortunately I get the following error:

$ ./start-tc-server.sh -f ./tc-config.xml
2023-08-22 13:55:22,119 INFO - Terracotta 5.8.5, as of 2021-12-16 at 22:21:34 UTC (Revision 3695ab2f870d94491c564e87c266555a7d1c096b from UNKNOWN)
2023-08-22 13:55:22,338 INFO - Extensions:
2023-08-22 13:55:22,368 INFO - PID is 700847
2023-08-22 13:55:23,000 INFO - Did not find configuration directory at: /home/<User>/terracotta/config
2023-08-22 13:55:23,000 INFO - Starting node from config file: ./tc-config.xml
2023-08-22 13:55:23,010 ERROR - error during configuration
java.lang.IllegalArgumentException: Invalid format: <unknown>. Supported formats: cfg, properties
        at org.terracotta.dynamic_config.api.service.ClusterFactory.create(ClusterFactory.java:75)
        at org.terracotta.dynamic_config.server.configuration.startup.ConfigFileCommandLineProcessor.process(ConfigFileCommandLineProcessor.java:60)
        at org.terracotta.dynamic_config.server.configuration.startup.ConfigRepoCommandLineProcessor.process(ConfigRepoCommandLineProcessor.java:96)
        at org.terracotta.dynamic_config.server.configuration.startup.MainCommandLineProcessor.process(MainCommandLineProcessor.java:47)
        at org.terracotta.dynamic_config.server.configuration.DynamicConfigConfigurationProvider.lambda$initialize$1(DynamicConfigConfigurationProvider.java:141)
        at org.terracotta.dynamic_config.server.configuration.DynamicConfigConfigurationProvider.withMyClassLoader(DynamicConfigConfigurationProvider.java:254)
        at org.terracotta.dynamic_config.server.configuration.DynamicConfigConfigurationProvider.initialize(DynamicConfigConfigurationProvider.java:82)
        at com.tc.config.ServerConfigurationManager.initialize(ServerConfigurationManager.java:74)
        at com.tc.server.Bootstrap.createServer(Bootstrap.java:85)
        at com.tc.server.ServerFactory.createServer(ServerFactory.java:46)
        at com.tc.server.TCServerMain.createServer(TCServerMain.java:64)
        at com.tc.server.TCServerMain.startServer(TCServerMain.java:45)
        at com.tc.server.TCServerMain.main(TCServerMain.java:37)
2023-08-22 13:55:23,012 INFO - Invalid format: <unknown>. Supported formats: cfg, properties
2023-08-22 13:55:23,012 INFO - ExitState : CallbackOnExitState[Throwable: class org.terracotta.configuration.ConfigurationException; RestartNeeded: false]; AutoRestart: true
2023-08-22 13:55:23,014 INFO - Stopping server
2023-08-22 13:55:23,014 INFO - Logging directory is not set. Logging only to the console

I also tried to put the config file in the default location /home//terracotta/config/tc-server-config.xml, but no. I am really not sure how to interpret the error message. Grateful for any help.

versions:: java 17; ehcache: 3.10.0

0

There are 0 answers