Syntax Error in the eMessage Connector Configuration File
SCENARIO
There is a typo or error in the eMessage Connector's configuration file such that it is no longer a valid Typesafe Config file. If the file is an encrypted configuration file, an issue with the configuration of the encryption may also exist.
SYMPTOM
The following exceptions appear in the log:
2020-06-09 10:58:04.425 [main] INFO c.t.connectionserver.ConfigProvider - Loading configuration
2020-06-09 10:58:04.535 [main] ERROR c.t.connectionserver.ConfigProvider - Error loading config
java.lang.RuntimeException: Error encountered when loading configuration.
This error was probably caused by a misconfiguration with the encrypted config file.
at com.thingworx.connectionserver.ConfigProvider.getOrLoadConfig(ConfigProvider.java:52)
at com.thingworx.connectionserver.ConnectionServer.createControlPlane(ConnectionServer.java:94)
at com.thingworx.connectionserver.ConnectionServer.start(ConnectionServer.java:111)
at com.thingworx.connectionserver.ConnectionServer.main(ConnectionServer.java:198)
Caused by: com.typesafe.config.ConfigException$Parse:
[path-to]/emessage.conf: 161: [Error message related to configuration]
at com.typesafe.config.impl.ConfigDocumentParser$ParseContext.parseError(ConfigDocumentParser.java:201)
at com.typesafe.config.impl.ConfigDocumentParser$ParseContext.parseError(ConfigDocumentParser.java:197)
SOLUTION
Check the unencrypted version of the configuration file to be sure it does not have any syntax errors:
◦ Try loading a sample configuration file and make sure it makes it past the Loading configuration log line without showing errors. Other errors will show up because it is not set up for your environment.
◦ The stack trace will likely show you a message or line number related to where the syntax error begins. In the stack trace above, the error is at line 161, as shown in the message, emessage.conf: 161 [Error message related to configuration]