How to validate site.config syntax
Configuration attributes for the Outbound Contact Client (OCC) are stored in the Peripheral Monitor site.config file. Be sure to use proper syntax when modifying this file. Syntax errors prevent the application from starting or functioning as expected.
Diagnosing a site.config syntax error
A site.confg syntax error may exist if you receive an Error 1067: The process terminated unexpectedly error, or if there is an erl_crash.dump file in the Peripheral Monitor working directory.
When viewing the contents of the erl_crash.dump file in a text editor the first few lines can quickly confirm if there is a problem with the syntax of the site.config file.
Validating site.config syntax
After modifying the site.config file a simple test can be run to validate the syntax of the file. If the test fails, syntax errors are present in the site.config file. They will need to be found and corrected. If the test passes, syntax errors in the site.config file can be ruled out as cause for OCC startup failures.
To perform a site.config validation test, the following procedure must be performed on a host with Erlang installed. Erlang is installed automatically with VHT Callback® software.
- Open Control Panel > Programs and Features to verify Erlang OTP is installed.
- Open a command prompt.
- Type erl and press Enter to run an Eshell (Erlang Shell).
- On line 1> Type Test =.
- Include a space before the equals character.
- Paste the complete contents of the site.config file after the equals character. If a syntax error exists in the pasted content the error message is generated.
- If an error is not returned, type Test. and press Enter. An exact copy of the site.config file contents will be returned, validating the syntax of the site.config file is correct.
Resolving syntax errors
The error message references a line number and contextual before/after messaging to help localize the syntax error in the site.config file. The syntax error could be on, immediately preceding, or immediately following the line number referenced in the error.
Open the site.config file and verify the following:
- all opened brackets are closed
- all attribute values other than numeric strings are enclosed in double quotes
- all commas denote and terminate list elements
- a dot/period completes the file
After verifying the syntax, re-run the syntax test to confirm no additional syntax errors exist.