Hi community,
Then I follow the instruction to create a config-test.xml file with the following content. And start the server with the command: ./start-tc-server.sh -f ../../config-test.xml.
<?xml version="1.0" encoding="UTF-8"?>
<tc-config xmlns="
http://www.terracotta.org/config" xmlns:ohr="
http://www.terracotta.org/config/offheap-resource">
<services>
<service id="resources">
<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>
</service>
</services>
</tc-config>
However, I got the following error. Do you know what the issue it is? I can start the server by simply running ./start-tc-server.sh without any config file.
2022-09-12 15:37:59,516 INFO - Terracotta 5.8.5, as of 2021-12-16 at 22:21:34 UTC (Revision 3695ab2f870d94491c564e87c266555a7d1c096b from UNKNOWN)
2022-09-12 15:37:59,516 INFO - Extensions:
2022-09-12 15:37:59,522 INFO - PID is 67306
2022-09-12 15:37:59,826 INFO - Did not find configuration directory at: /Users/zhiheng_xie/terracotta/config
2022-09-12 15:37:59,826 INFO - Starting node from config file: ../../config-test.xml
2022-09-12 15:37:59,830 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)
2022-09-12 15:37:59,830 INFO - Invalid format: <unknown>. Supported formats: cfg, properties
2022-09-12 15:37:59,830 INFO - ExitState : CallbackOnExitState[Throwable: class org.terracotta.configuration.ConfigurationException; RestartNeeded: false]; AutoRestart: true
2022-09-12 15:37:59,831 INFO - Stopping server
2022-09-12 15:37:59,831 INFO - Logging directory is not set. Logging only to the console