Solution
This error occurs when the configuration file for the
NotebookExecution service is incorrect or missing. Follow the steps below to resolve it.
- On the SystemLink Server PC, navigate to C:\ProgramData\National Instruments\Skyline\Config.
- 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.
- If the file exists, move it to a different location on disk (as a backup).
- 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": ""
}
}
- Save the file as NotebookExecution.json in C:\ProgramData\National Instruments\Skyline\Config.
- From the Start Menu, search for Command Prompt. Right-click it and select Run as administrator.
- Enter the following commands to generate a valid WhitelistedApiKey for the NotebookExecution service.
- cd "C:\Program Files\National Instruments\Shared\Skyline\Security" then press Enter.
- 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.
- Once complete, open the NotebookExecution.json file and verify that a WhitelistedApiKey value now exists.
- In Command Prompt, enter the following commands to create a valid password and connection string within the file.
- cd "C:\Program Files\National Instruments\Shared\Skyline" and then press Enter.
- mongodbconfig.exe -v configureService NotebookExecution "C:\ProgramData\National Instruments\Skyline\Config\NotebookExecution.json" and then press Enter.
- Once the command has completed, close Command Prompt.
- Launch the NI SystemLink Server Configuration application.
- From the NI SystemLink Service Manager tab, click Restart. The NotebookExecution service should now be fixed.