Error Invalid Database Configuration With SystemLink User Data Service

Updated Jul 18, 2024

Reported In

Software

  • SystemLink Server

Issue Details

  • The User Data service on my SystemLink Server always fails to start. How can I fix it?
  • The SystemLink User Data service always errors. In the Skyline logs, I see an error reporting that there is an Invalid database configuration. What causes this?
  • I see the below two errors in my SystemLink log files:

UserData | ERROR - Unable to connect to Mongo database. Please check UserData.json in the Config directory: Unable to authenticate using sasl protocol mechanism SCRAM-SHA-256.

UserData | ERROR - UserData.InvalidDatabaseConfiguration: Invalid database configuration. Please check UserData.json in the Config directory.

Solution

This error occurs when the contents of the User Data configuration file (UserData.json) are incorrect or corrupt. Follow the steps below to resolve it.
 
  1. On the SystemLink Server PC, navigate to C:\ProgramData\National Instruments\Skyline\Config.
  2. Open the UserData.json file in any text editor.
  3. Modify the file so that it resembles the following image.
    • Note: it is not necessary to change the value of WhitelistedApiKey. As long as the key name exists, the value can be kept the same.

Correct UserData JSON.jpg
  1. Save the file and close it.
  2. Open a Command Prompt as an administrator.
    • Do this by searching "Command Prompt" in the Start Menu. Right-click the application and select Run as administrator.
  3. Type cd "C:\Program Files\National Instruments\Shared\Skyline" and press Enter.
    • This changes the current directory to the location of SystemLink's MongoDB executable.
  4. Type mongodbconfig.exe -v configureService UserData "C:\ProgramData\National Instruments\Skyline\Config\UserData.json" and press Enter.
    • This command forces SystemLink to recreate the UserData.json file with the correct user and password information.
  5. Once the command completes, launch NI SystemLink Server Configuration and restart the services.