Systemlink Notebook Execution Service Unable to Find Configuration

Updated Sep 24, 2024

Reported In

Software

  • SystemLink Server
  • SystemLink Jupyter Notebook Add-On

Issue Details

  • Within the NI SystemLink Server Configuration application, the NotebookExecution service always errors. How can I fix it?
  • The SystemLink NotebookExecution service fails to start. Within the Skyline logs, I see the below error. What does this mean?
NotebookExecution | ERROR - systemlink.messagebus.managed_service_base - Skyline.UnexpectedException: Unable to find the configuration for the "NotebookExecution" service.

NotebookExecution error.PNG

Solution

This error occurs when the configuration file for the NotebookExecution service is incorrect or missing. Follow the steps below to resolve it.
 
  1. On the SystemLink Server PC, navigate to C:\ProgramData\National Instruments\Skyline\Config.
  2. Verify whether a NotebookExecution.json file is present.
    • If it is missing, this is the cause for the error.
    • If the file is present, it will be missing some data. A correct NotebookExecution.json file should contain data similar to below.
NotebookExecution JSON data.PNG
 
  1. If the file exists, move it to a different location on disk (as a backup).
  2. Create a new JSON file with the following contents.
 
{
   "NotebookExecution" : {
      "Mongo.Database" : "ninotebookexecution",
      "Mongo.Host" : null,
      "Mongo.Password" : null,
      "Mongo.Port" : 0,
      "Mongo.Roles" : "[{\"Mongo.Database\" : \"ninotebookexecution\", \"Mongo.Role\" : \"dbOwner\"}]",
      "Mongo.User" : "ninotebookexecution",
      "MaxWorkers": "4",
      "WhitelistedApiKey": ""
   }
}
 
  1. Save the file as NotebookExecution.json in C:\ProgramData\National Instruments\Skyline\Config.
  2. From the Start Menu, search for Command Prompt. Right-click it and select Run as administrator.

Run as Admin.PNG
 
  1. Enter the following commands to generate a valid WhitelistedApiKey for the NotebookExecution service.
    1. cd "C:\Program Files\National Instruments\Shared\Skyline\Security" then press Enter.
    2. NationalInstruments.AuthConfig.exe --user-service-config="C:\ProgramData\National Instruments\Skyline\Config\Security.Keys.json" --client-config="C:\ProgramData\National Instruments\Skyline\Config\NotebookExecution.json" --service-name=NotebookExecution then press Enter.

generate API Key.PNG
 
  1. Once complete, open the NotebookExecution.json file and verify that a WhitelistedApiKey value now exists.
  2. In Command  Prompt, enter the following commands to create a valid password and connection string within the file.
    1. cd "C:\Program Files\National Instruments\Shared\Skyline" and then press Enter.
    2. mongodbconfig.exe -v configureService NotebookExecution "C:\ProgramData\National Instruments\Skyline\Config\NotebookExecution.json" and then press Enter.

Command Prompt.PNG
 
  1. Once the command has completed, close Command Prompt.
  2. Launch the NI SystemLink Server Configuration application.
  3. From the NI SystemLink Service Manager tab, click Restart. The NotebookExecution service should now be fixed.

Restart services.PNG